Xstartup settings for accessing Solaris Desktop through VNC

Monday, October 19, 2009

Sometimes I find that if I start VNC Server with the default xstartup settings, I often end up landing on a terminal instead of the Solaris desktop (Java Desktop Session), for those of you having the same problem (can't access Solaris desktop through VNC), here is one possible solution which worked for me.

1. cd <HOME>/.vnc, where <HOME> is your home directory.

2. Edit xstartup file.

2.1. The settings which brought me the command line instead of Solaris JDS.
bash-3.00$ cat xstartup
#!/bin/sh
PATH=:/pkg/X11/bin:/import/pkg/X11/bin
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
bash-3.00$
2.2 Replace the contents of xstartup to the one shown below (I commented out some lines, but you may retain these)
bash-3.00$ cat xstartup
#!/bin/sh
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
bash-3.00$
2.3 Restart VNC Server

Kill the VNC Server process with the old xstartup settings (ps -ef | grep Xvnc, then use kill -9 <Xvnc-pid>), remove
<HOME>/.vnc/passwd, start another VNC Server using the vncserver command.

3 comments:

Anonymous said...

good post. this exactly what i needed. only one thing
you can use "vnconfig -kill" command, rather than unix kill command

Prasanna Seshadri said...

Thanks for that tip, glad that this post was useful to you.

Anonymous said...

Thanks Prasanna....


Copyright © 2016 Prasanna Seshadri, www.prasannatech.net, All Rights Reserved.
No part of the content or this site may be reproduced without prior written permission of the author.