Search This Blog

Friday, September 7, 2012

How to configure VNC Server in RHEL5 ?

Install Vnc Server

[root@test ~]# yum install *vnc*


[root@test ~]# vncserver :1

You will require a password to access your desktops.

Password:
Verify:

New 'test:1 (root)' desktop is test:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/test:1.log


[root@test ~]# vncserver -kill :1
Killing Xvnc process ID 5253

uncomment the highlighted lines.

[root@test ~]# vi /root/.vnc/xstartup 


#!/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 &


Provide a password

[root@test ~]# vncpasswd
Password:
Verify:

Restart vncserver
[root@test ~]# service vncserver restart
Shutting down VNC server:                                  [  OK  ]
Starting VNC server: no displays configured                [  OK  ]


Open a port.
[root@test ~]# vncserver :50

New 'test:50 (root)' desktop is test:50

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/test:50.log





NOw in your vncveiwer use [server ipaddress:50]

i.e  192.168.1.22:50 



0 comments:

Post a Comment