Setting up VNC server on Solaris
Introduction
Solaris, my love! You who never have packages and are never very convenient to use! In short, my difficult love! And yes, VNC server is doable! Recompiling manually is too difficult and time-consuming, so I opted for packages. But even that isn’t all roses!
Installation
Method 1
Add this line to your profile:
PATH=$PATH:/usr/openwin/bin:/usr/X11/bin
Method 2
For prerequisites, you need pkg-get! Then let’s get started:
pkg-get -i vncserver
Let’s refine things by editing /etc/init.d/boot.server
and adding the magic line:
test -d /tmp/.X11-unix && /usr/bin/chmod 1777 /tmp/.X11-unix
This line allows all users to access vncserver from boot.
That’s it! Now you just need to launch it.
Configuration
We’ll start vncserver once, then kill it to get the configuration. Also enter the password when prompted:
$ vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'unknown:1 (root)' desktop is unknown:1
Creating default startup script //.vnc/xstartup
Starting applications specified in //.vnc/xstartup
Log file is //.vnc/unknown:1.log
vncserver -kill :1
Now we can edit the ~/.vnc/xstartup
file for all users:
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
Launching
Let’s start vncserver and we’re good to go!
$ vncserver
Last updated 03 Dec 2008, 15:53 +0200.