For this you will have to configure VNC service on your Linux server.
Steps to configure VNC on Linux Servers for root user.
You should have vnc-server rpm package installed.
vnc-server-X.X.X-X.el5
1) Put following two lines in /etc/sysconfig/vncservers
- Code: Select all
VNCSERVERS="2:root"
VNCSERVERARGS[2]="-geometry 800x600"
the above lines will enable VNS server on terminal 2 for user root with 800x600 resolution.
2) Create a xstartup file in .vnc directory under the user for which you want to configure VNC. In this example we are configure it for root user so file would be as follows.
- Code: Select all
# vi /root/.vnc/xstartup
#!/bin/bash
# Uncomment the following two lines for normal desktop:
- Code: Select all
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
- Code: Select all
[ -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 &
3) run vncpasswd command to add/set vnc password for root.
4) then restart vncserver
- Code: Select all
/etc/init.d/vncserver start

