Installation & Configuration Of VNC Server on Solaris 10
Introduction:
This document will serve as a reference guide for setting up VNC server on Solaris system.
Procedure:
1. Download latest version of VNC server for Solaris from http://www.realvnc.com/products/download.html
2. The package will be in gzip format. Use gunzip command to extract and it will give a pkg file.
# gunzip vnc-4_1_3-sparc_solaris.pkg.gz
3. Install VNC server in the system.
# pkgadd ?d vnc-4_1_3-sparc_solaris.pkg
4. Following command to be used to configure VNC server on the server.
# vncserver -alwaysshared -geometry 1152×864 :1
5. Set PATH variable in profile of user.
# PATH =/usr/sbin:/usr/bin:/usr/java/bin:/usr/local/bin:/usr/openwin/bin
# export PATH
6. VNC server is using different set of login authentication than the /etc/passwd. Meaning that, you have to create VNC login password for individual solaris login accounts who are granted remote access with VNC client. To create VNC login password, just execute vncpasswd command and enter a valid password twice as usual.
7. To start an instance of VNC server, just execute vncserver command, which will create the $HOME/.vnc directory with VNC default startup scripts inside (if $HOME/.vnc is not currently exists).Following entries should be present in xstartup file in $HOME/.vnc
# vi $HOME/.vnc/xstartup
#! /bin/sh
Xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
# twm &
/usr/dt/bin/Xsession &
8. The vncserver command will start up a VNC server that open 3 next available TCP/IP port, starting from 5801, 5901, and 6001 respectively. Port 5801 is for VNC client connection over HTTP protocol, port 5901 is for VNC client connection over RFB protocol and port 6001 is to allow X applications to connect to the VNC server. By executing vncserver for the second time or execute the vncserver :2 command, this will startup VNC server that bind and listen to port 5802, 5902, and 6002 respectively.
9. To connect to Solaris VNC server over HTTP protocol, just type http://
10. To kill the VNC server, just execute vncserver -kill :1 will kill the first VNC server that bind and listen to port 5801, 5901, and 6001.
The vncserver -kill: 2 will kill the second VNC server, and so on.
11. Log files will be stored in $HOME/.vnc/systemname:port.log