VNC Server Installation on CentOS
Contents |
1 Introduction
This document describes how to install the VNC service on a Centos 5 with X Server.
2 Installation of the VNC Package
yum install vnc-server
3 Configure Persistent Desktop Sessions
Make an entry in /etc/sysconfig/vncservers for each user account you want to give VNC access, e.g.
VNCSERVERS="1:root 2:sysadmin" VNCSERVERARGS[1]="-geometry 1024x768" VNCSERVERARGS[2]="-geometry 1024x768"
4 Set VNC Passwords
Run switch user for each account and set the VNC password
su - <username> vncpasswd exit
5 Configure Service Startup
chkconfig vncserver on service vncserver start
6 Configure Windows Manager
By default the twm Windows Manager is used in a VNC session. To start the default Windows Manager uncomment these two lines in $HOME/.vnc/xstartup
unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc
Restart the VNC Service
service vncserver restart
7 Testing
Run the VNC Viewer, e.g. on a Windows PC and connect to the server. Append the display number to the hostname separated by a colon. E.g. in this sample config
192.168.1.100:2
connects on display :2 as user sysadmin.
