Tuesday, February 24, 2009

Using VNC Server on Opensolaris

To set the VNC server password:
vncpasswd

To start VNC server:
vncserver
note the display number, i.e.: myserver:1 = display 1


Connect to the VNC server:

From the VNC client, use the following syntax: servername:display number.  I.E.: for a server called "myserver" with VNC server running on display 1:
myserver:1

To stop VNC server:
vncserver -kill :[display number]
i.e.: to stop display 1:
vncserver -kill :1

Enable gnome desktop:

Using your favourite text editor edit the/.vnc/xstartup file in your home folder:
vi ~/.vnc/xstartup
disable TWM (Timeless Window Manager) by commenting out:
#twm &
Add the following lines at the end:
unset SESSION_MANAGER
gnome-session & 
"unset SESSION_MANAGER" disables gnomes check for other session managers.  "gnome-session &" starts the gnome desktop.


My xstartup file:
#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# twm &
unset SESSION_MANAGER
gnome-session &

No comments:

Post a Comment