Thursday, September 20, 2007

Setting up VNC server on CentOS

Here's some helpful steps to get VNC server up and running on CentOS 5 after you install it:

  1. Type vncserver and enter the vncserver password (this step should also create your .vnc folder in your home directory which you'll need for the next step)
  2. Edit ~/.vnc/xstartup and uncomment the two lines for normal desktop and then comment out all the rest.
  3. Edit /etc/sysconfig/vncservers and add the line VNCSERVERS="1:root" for a root vnc server.
  4. Type chkconfig --level 2345 vncserver on to make vncserver start at bootup.
  5. Type vncserver -kill :1 (that vnc session has the wrong desktop) and then type vncserver once more to have the proper desktop and everything. After a reboot it should now spawn automatically.