Installing a VNC Server on your CentOS VPS

Please contact us if you need support - we're here to help!

Installing a VNC Server on your CentOS VPS

All of Bitronic Technologies come with one user VNC access pre-installed. However if you should need to allow access for multiple concurrent VNC users you can install a VNC server within your CentOS VPS Hosting. By the time you finish this tutorial you will know how to install a VNC server on your CentOS VPS. If you want to learn more about how to install various services and softwares on your CentOS VPS we have many other great articles here in our knowledgebase.
Installing Gnome Desktop
This will update the repositories as well as install the desktop GUI and the VNC server:
yum update
yum groupinstall Desktop yum install tigervnc-server.x86_64 yum install xorg-x11-fonts-Type1
Setting up the VNC Server
First add a user in SSH as root:
useradd johndoe
Now create a password for the user:
passwd johndoesgoodpassword
Switch to the user you created:
su - vncpasswd
Enter a password for the VNC connection, once complete switch back to your root user:
su - vi /etc/sysconfig/vncservers
Once you have opened the vncservers file append the following to the configuration file:
VNCSERVERS="1:joe" VNCSERVERARGS[1]="-geometry 640x480"
Adding you iptables rules:
iptables -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
Starting the VNC server:
Restart the iptables as well as the vnc server if it is running if it is not simply start the service:
/sbin/service iptables restart /sbin/service vncserver start
Download VNC Viewer:
TightVNC Java Viewer is free, and works on all platforms that support Java.
Connecting to the Desktop
Open your VNC viewer and enter your ipaddress and :1 to specify the user we have just created. eg

Article Name: Installing a VNC Server on your CentOS VPS

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Search our Knowledgebase