Sunday, June 19, 2011

GUI on Centos Linux

yum -y groupinstall gnome-desktop
yum -y install vnc-server xterm
yum -y install firefox x11-xorg

Bila ingin vnc dijalankan dg user 'vncuser', maka jalankan
1.root# useradd vncuser
2.root# passwd vncuser
3.login as vncuser
root# su - vncuser
4.vncuser# vncpasswd --> ini penting utk add vnc user
5.cek dengan:
ls /home/vncuser/.vnc

vncuser# vncserver :1

cek /home/vncuser/.vnc/ ada file:
passwd, [domain]:1.log, [domain]:1.pid, xstartup

vi xstartup,edit spt:
#!/bin/sh

( 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 1024x768 -ls -name "$VNCDESKTOP Desktop" &
gnome-session &

******
Bila ingin auto run vnc, tambahkan:
edit /etc/sysconfig/vncservers
edit VNCSERVERS="1:vncuser"


terus lakukan cek auto run dg:

# chkconfig ––list | grep vnc
vncserver 0:off 1:off 2:off 3:off 4:off 5:off 6:off


utk set level 5 (auto run)
# chkconfig --level 5 vncserver on



# chkconfig ––list | grep vnc
vncserver 0:off 1:off 2:off 3:off 4:off 5:on 6:off

lalu restart:
shutdown -r now
****


tambahan vnc:
http://wiki.centos.org/HowTos/VNC-Server

No comments:

Post a Comment