Pages

Monday, November 10, 2014

Install VNC viewer on Centos 5.X machines

yum groupinstall "GNOME Desktop Environment"

yum install vnc*

Add this line at the end of /etc/sysconfig/vncservers

VNCSERVERS="5:root" VNCSERVERARGS[2]="-geometry 800x600 "


Login as user and set vnc password :

vncpasswd command :


---------------------------------------------------------


create file xstartup under .vnc of home directory and give 777 permission

Add the below lines in xstartup file

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
        eval `dbus-launch --sh-syntax –exit-with-session`
        echo "D-BUS per-session daemon address is: \
        $DBUS_SESSION_BUS_ADDRESS"
fi
exec gnome-session