VNC (Virtual Network Computing) is a graphical desktop sharing system that can be used to control a remote computer. VNC transmits mouse and keyboard events from one node to another on a network and updates the graphical screen on the other end of the network. Vnc is platform independent. VNC makes use of RFB (Remote Frame Buffer) protocol.
VNC depends on two modules:
VNC server listens to the incoming connections from client. VNC can be used to work on the gui of your vps.
Please note that Veeble servers have VNC pre-installed.
1. First check whether vncserver is installed in the server.
yum list vnc-server.
If not, you can install the package using yum install vnc-server.
yum install vnc-server
2. Setup a vnc password.
Type ” vncpasswd ” command in the shell. you will be prompted to enter the password. You can use a strong password. By default this will be saved in /root/.vnc/passwd
3. Open the file /etc/sysconfig/vncservers to setup vnc session.
At the bottom add the following lines.
VNCSERVERS="1:root" VNCSERVERARGS="-geometry 1024x768 -depth 16"
Here 1 means the session number.
4. Install kde and gnome environments.
yum install kde* yum install gnome*
5. Setting up vnc startup script.
Open the file /root/.vnc/xstartup and add the following lines to get a kde desktop.
#!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER startkde &
You can comment the previous entries.
6. start vnc session
check whether you are able to telnet to the port 5901
root@proxy:~# telnet 22.214.171.124 5901 Trying 126.96.36.199... Connected to 188.8.131.52. Escape character is '^]'. RFB 003.008
If you are not able to connect, make sure that port 5901 is open.
8. Testing vnc.
You can download the VNC client from here
After downloading and extracting the VNC client in your windows machine, open vnc client. In the server field, enter the following details.
You will be prompted to enter the vnc password. If everything goes well, you will be able to see the kde desktop.
7. To kill a vnc session, use
vncserver -kill :1
Download the GNOME Desktop environment to your server:
yum groupinstall "Desktop"
After installed GNOME Desktop enviroment then start to install TigerVNC server
yum install tigervnc-server xorg-x11-fonts-Type1
Now your VNC is installed on your CentOS 6.
Start the VNC server.
You will be asked to enter the password now.
Now time to connect to your VNC Server:
First download appropriate VNC client from here
Then use it to connect to your server.
Use the fOllowing entry as VNC address:
Enjoy your VNC Server