Thursday, July 20, 2006

installing VNCserver for the first time

1) install vncserver rpm
2) edit /etc/sysconfig/vncservers for VNCSERVERS and VNCSERVERARGS constants
[root@sfunppdac29 root]
# vi /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <>.
# VNCSERVERS="1:myusername"

VNCSERVERARGS[1]="-geometry 1024x768"

3) run vncserver for the first time
[root@sfunppdac29 .vnc]# vncserver

You will require a password to access your desktops.
Password: Verify: xauth: creating new authority file /root/.Xauthority
New ' (root)' desktop is

Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/

4) edit /root/.vnc/xstartup to use GNOME instead of twm
replace "twm &" with "exec gnome-session &"

5) Kill any existing VNC servers with "vncserver -kill :xxx" where xxx is the display number.

6) Start vncserver.
[root@sfunppdac29 root]# service vncserver start

7) check service is running
[root@sfunppdac29 root]# service vncserver status
Xvnc (pid 12035) is running...

8) check that the default ports are up and running
[root@sfunppdac29 .vnc]# netstat -na grep LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN

Thanks to Greg Breland:

No comments:

Feel free to drop me a line or ask me a question.