On this tutorial we are going to install VNC server on a Centos 5.6 Linux VPS. The objective is to install minimum packages to save disk space and keep the package installation minimum.
To install VNC server and Gnome desktop, run this command:
You’ll see: passwd this file is storing the password for login to VNC session
Next is editing VNC server configuration /etc/sysconfig/vncservers and add the new user to list of VNC server:
Add the user to list of VNC server:
Now let’s start the vncserver service to generate xstartup script where we’ll configure it to start Gnome desktop environment.
You’ll see: <hostname>:1.log passwd xstartup
We need to modify the xstartup script so Gnome session is called when we start the VNC server
modify:
to:
Save the modification, go back as root and let’s start the VNC server
Download Tight VNC client here: http://www.tightvnc.com/download.html
After you installed the Tight VNC client, run it and you’ll see this form:
On the VNC Server field, insert your VPS IP address followed with ‘:1′ and then click on Connect. You’ll be asked for a password, this is the password you created when you run vncpasswd command.
If you need VPS hosting with VNC remote desktop installed, please contact ProHosterz at www.prohosterz.com or email info@prohosterz.com, they have a great VPS service
To install VNC server and Gnome desktop, run this command:
yum install vnc-server gnome-desktop xorg-x11-xinit xterm gnome-applets gnome-session gnome-themes gnome-panel gdm firefox dbus-x11
adduser johndoe
passwd johndoe
su - johndoe
vncpasswd
ls .vnc/
passwd johndoe
su - johndoe
vncpasswd
ls .vnc/
You’ll see: passwd this file is storing the password for login to VNC session
exit
Next is editing VNC server configuration /etc/sysconfig/vncservers and add the new user to list of VNC server:
nano /etc/sysconfig/vncservers
VNCSERVERS="1:johndoe"
service vncserver start
service vncserver stop
su - johndoe
ls .vnc/
service vncserver stop
su - johndoe
ls .vnc/
We need to modify the xstartup script so Gnome session is called when we start the VNC server
nano .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 &
# 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 &
#!/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 1024x768 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
# 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 -title "$VNCDESKTOP Desktop" &
gnome-session &
Save the modification, go back as root and let’s start the VNC server
exit
service vncserver start
service vncserver start
After you installed the Tight VNC client, run it and you’ll see this form:
On the VNC Server field, insert your VPS IP address followed with ‘:1′ and then click on Connect. You’ll be asked for a password, this is the password you created when you run vncpasswd command.
If you need VPS hosting with VNC remote desktop installed, please contact ProHosterz at www.prohosterz.com or email info@prohosterz.com, they have a great VPS service