install vnc-server under Centos/RHEL 5.x

by
Share this Article: Facebook1Google+0Twitter0LinkedIn0Reddit0StumbleUpon0

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

VNCSERVERS=”1:root”
VNCSERVERS=”2:pirat9″
VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”

change pirat9 if you have other users

save and exit

type

[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:
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 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

#firefox www.unixmen.com


for any question put is in the forum

{loadposition user9}

Related Articles By Tags :

{loadposition user1}

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook1Google+0Twitter0LinkedIn0Reddit0StumbleUpon0