First you need to check for already installed VNC Server. You can check this by executing following command.
rpm -q vnc-server
If you found message like “package vnc-server is not installe” then you need to install it first by executing following command from root user.
yum install vnc-server
Once VNC Server installed you need to have a window manager installed if not already available. execute following command to install ‘GNOME Desktop Environment’ from root user.
yum groupinstall “GNOME Desktop Environment”
Now change the configuration of VNC Server’s configuration file
cd /etc/sysconfig
vi vncservers
add following lines to the file. change anyusername to your already created username.
VNCSERVERS=”1:root”
VNCSERVERARGS[1]=”-geometry 1024×768″
Now login with root user and start the “vnc server”
/sbin/service vncserver start
now login to “root” and configure the vnc password for this user
cd /root/.vnc/
vncpasswd
cd .vnc
vi xstartup
uncomment following lines by deleting “#” sign
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
and change the xterm command as follows
xterm -geometry 1024×768 -ls -title “&VNCDESKTOP Desktop” & gnome-session &
Now start the vnc server again by root user
/sbin/service vncserver start
Once started you can now install the vnc client in you client machine and login to CentOs machine as follows
Recent Comments