install vnc-server under Centos/RHEL 5.x


Please shareShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditDigg thisShare on StumbleUponShare on VKBuffer this page

In this tutorial we will try to show you how to install install   vnc-server  under  Centos/RHEL 5.x

Under root

[root@localhost ~]#  yum install vnc-server

edit :

[root@localhost ~]# vi  /etc/sysconfig/vncservers

VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”

change pirat9 if you have other users

save and exit


[root@localhost ~]# vncpasswd

make password the same als the user password . Then

[root@localhost ~]# vncserver

The .vnc directory wil be created under the home directory

go there and edit xstartup with

[root@localhost ~]# vi  /home/pirat9/.vnc/xstartup

remove every thing in this file and add

# Add the following line to ensure you always have an xterm available.
( while true ; do xterm ; done ) &
# Uncomment the following two lines for normal desktop:
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 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &

save and exit

start again #vncserver

go back to you windows of Linux box client start your Mocha X server

for this example i use mocha server

C:Program FilesMochaX

start your putty of other ssh client check for X11 forwarding activated .  and  X  display location  :1 or  :2  or  …

log into the machine and

start for example


for any question put is in the forum

{loadposition user9}

Related Articles By Tags :

{loadposition user1}