- Setup VNC server. It comes with most of Linux distribution.
- su -
- vi /etc/sysconfig/vncservers
add following lineVNCSERVERS="3:robin"
VNCSERVERARGS[3]="-geometry 1240x980 -depth 16 -nohttpd" other samples for this file
VNCSERVERS="1:tiger 2:albatros 3:leopard"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16"
VNCSERVERARGS[2]="-geometry 800x600 -depth 8"
VNCSERVERARGS[3]="-geometry 1024x768 -depth 16"
- su -
- cd user's home directory .vnc
cd /home/robin/.vnc - vi xstartup, change it to following which will bring up gnome desktop
#!/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 &
exec /usr/bin/gnome-session & - run vncpasswd, create password
- run as root, chkconfig --level 35 vncserver on
- service vncserver restart
- connect to vncserver
vncviewer [Server's IP]:[Port]:[Display]
port is 5900 + display number. My example is 5903 - over ssh to connect to boston
ssh -f -L 25903:boston:5903 robin@boston sleep 10;
vncviewer 127.0.0.1:25903:3 - other readings
http://www.g-loaded.eu/2005/11/10/configure-vnc-server-in-fedora/
Wednesday, April 8, 2009
Setup VNC Server in a Linux box
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment