In this article I describe how to install a GNOME Desktop environment on CentOS with a VNC server. If you install this on your remote CentOS server you are able to login remotely with a beautiful GUI.
The assumption is that you are already able to access your remote server with SSH.
GNOME Desktop Environment for CentOS
Server installation
In the follow paragraph I will explain howto enable the server to login remotely and howto access your server.
Installation Steps on the CentOS server
1. Install X Windows and GNOME
2. Change runlevel: starting GUI at boot
3. install xinetd
4. install vnc-ltsp-config
The vnc-ltsp-config supports the following resolutions:
Nr Port Color-depth Resolution Protocol
0 5900 16 1024×768 tcp
1 5901 16 800×600 tcp
2 5902l 16 640×480 tcp
3 5903 8 1024×768 tcpl
4 5904 8 800×600 tcp
5 5905 8 640×480 tcp
When a vnc-client connects to one of the configured ports, the user will be given a login screen. The sessions will *not* be persistent. When a user logs out, the session is gone. Once the vnc-client closes, the vnc-ltsp-config session will terminate (by default) and all running processes will be killed.
You should change ARCH with your architecture: i386 or x86_64.
4. adapt gdm configuration
5. enabling and starting services
If the command “gdm” doesn’t work you should try gdm-restart.
Now you should be able to access your remote server via a ssh tunnel.
GUI Access from CentOS
You can use the program Vncviewer to view and fully interact with your remote server (the “VNC server”). This program is available on most Linux and Unix computers.
Download and install with the following command:
You can securaly access your remote server with encryption (ssh tunneling) with the following command:
You need to replace 1.1.1.1 with the IP of your remote server. The number 0 determines the resolution that will be used. In this case this is 1024×768 with a color-depth of 16.
The assumption is that you are already able to access your remote server with SSH.
GNOME Desktop Environment for CentOS
Server installation
In the follow paragraph I will explain howto enable the server to login remotely and howto access your server.
Installation Steps on the CentOS server
1. Install X Windows and GNOME
yum groupinstall “X Window System”
yum groupinstall “GNOME Desktop Environment”
yum groupinstall “GNOME Desktop Environment”
vi /etc/inittab
Change
id:3:initdefault:
to
id:5:initdefault:
id:3:initdefault:
to
id:5:initdefault:
3. install xinetd
yum install xinetd
4. install vnc-ltsp-config
The vnc-ltsp-config supports the following resolutions:
Nr Port Color-depth Resolution Protocol
0 5900 16 1024×768 tcp
1 5901 16 800×600 tcp
2 5902l 16 640×480 tcp
3 5903 8 1024×768 tcpl
4 5904 8 800×600 tcp
5 5905 8 640×480 tcp
When a vnc-client connects to one of the configured ports, the user will be given a login screen. The sessions will *not* be persistent. When a user logs out, the session is gone. Once the vnc-client closes, the vnc-ltsp-config session will terminate (by default) and all running processes will be killed.
wget http:\\download.fedora.redhat.com/pub/epel5/ARCH/vnc-ltsp-config-4.0-4.el5.noarch.rpm
rpm -ivh vnc-lstsp-config*.rpm
rpm -ivh vnc-lstsp-config*.rpm
4. adapt gdm configuration
vi /etc/gdm/custom.conf
Add the following lines to the sections:
[xdmcp]
Enable=true
[security]
AllowRemoteRoot=true
DissallowTCP=false
Add the following lines to the sections:
[xdmcp]
Enable=true
[security]
AllowRemoteRoot=true
DissallowTCP=false
5. enabling and starting services
chkconfig xinetd on
chkconfig vncts on
service xinetd restart
gdm
chkconfig vncts on
service xinetd restart
gdm
Now you should be able to access your remote server via a ssh tunnel.
GUI Access from CentOS
You can use the program Vncviewer to view and fully interact with your remote server (the “VNC server”). This program is available on most Linux and Unix computers.
Download and install with the following command:
yum install vnc
vncviewer -via root@1.1.1.1 localhost:0
Comment