Nov 15, 2008

solve "Communications link failure" in matlab

Recently while i was working on my project in matlab. I got the following error.
Connection failed: Communications link failure

Last packet sent to the server was 0 ms ago.
??? No constructor 'com.mathworks.toolbox.database.closeTheDatabaseConnection' with matching
signature found.


After I lost 2 hrs of my time, I remembered I had gone through the same error in Hibernate/mysql.

The solution is so simple:
Just comment out the following line in my.cnf(the mysql configuration file). :)
skip-networking

so that it looks like this:
#skip-networking


Finally restart the service mysql.

To know why see my earlier post:http://howtoxyz.blogspot.com/2008/09/solve-commysqljdbccommunicationsexcepti.html

Nov 11, 2008

Run GUI application as another user.

I knew that if there is some flaw in irc-client it will leave a security loop in the system. And the attacker get the privilege of the user running the irc-client. And you know what it will lead to.
So specially to run the X-chat (a irc client), I created another user irc with very less privilege.

Then I tried running the xchat as follows:
suraj $ su irc
Password:
irc$ xchat
No protocol specified

(xchat:6966): Gtk-WARNING **: cannot open display: :0.0


Hum.. There occured a problem. The app couldn't get handle to the grapics display.

So here is the solution:
$ sudo apt-get install sux

and run
$ sux irc xchat
Password:


Provide the password of the user irc and see the application launching.