Tuesday, February 16, 2010

Creating background process using shell script

I faced a similar issue where trying to use '&' did not help to create a background process.

Finally I came to know of a command called screen which helps to create different type of sessions.

instead of using
'cmd &'

try using
'screen -d -m -s cmd'

in your script. This creates a detached session which runs in parallel as a separate process which can later be visited using the name given for the session.

There are many other options, look into 'man screen'.

Note: This command in the script works even when you have remote logged into the machine which has the script.

Saturday, February 13, 2010

Configure VNC

To change password
>vncpasswd

To start the server
>vncserver

To kill
>vncserver -kill

To start vncserver with diff geometry
>vncserver -geometry x
and are the resolution of the machine which runs the vnc client

To modify the configuration of vnc
> cd .vnc

xstartup file in this folder has the startup configuration for vnc

have only these lines uncommented/added
vncconfig -iconic &
/etc/X11/xinit/xinitrc &

and start the vncserver with the required geometry

VMClassLoader problem while executing jar file using gij

Check the version of the java .

This error mainly arises because of version compatibility.

If you have compiled using higher version of java (say java 1.6 or 1.5) and try to execute in an environment with java 1.4, you may get this error.

use the below command to find the java version in your sys
>java -version

If this is not the same as the compiled version of your code then try to install the required version through manual install and execute from the bin directory.