You suffer from slow Internet speeds and need to do manage large file transfers. Perhaps you need a backup desktop that you can get to from anywhere. There are a host of reasons that you would want to run a remote desktop on a VPS or dedicated server, or even on a home server. The reason I did it is that sometimes I need to download modify, then re-upload huge file (1-10GB usually) and I need a web browser to do it (it can’t be done from command line- PHP session issues and the like) and my own internet connection is only 1.5mbps. But, I have a VPS that has a 100GB link to the Internet. So, by using VNC to connect to a GNOME desktop remotely, I can do all I need.
My own VPS uses CentoOS 6.4, but this will work on any version of CentOS 6. It would probably work with CentOS 5 too but some of the package names might be different.
First, you VPS should have at least 1GB of memory available and about 1GB of hard disk space to allocate. We’re going to assume that DNS is already set up and working. In my case, my VPS was already setup with cPanel and hosting websites. It sees light usage and so can handle the added load.
Login as root, and create a user for your desktop. It should not match a user that already exists on the server. We’re going to call our user “ryan” but you can use any name you want.
[~]# adduser ryan
and now set a password for ryan
[~]# passwd ryan
Now, we need to make sure all packages are up to date:
[~]# yum update
Now we’re going to install the desktop, remove Network Manager, and configure TigerVNC server.
[~]# yum groupinstall desktop
[~]# yum -y remove NetworkManager
[~]# yum install tigervnc-server
Copy and paste the following into your prompt to setup the vncserver.
[~]# echo ‘VNCSERVERS=”1:ryan”‘ >> /etc/sysconfig/vncservers
[~]# echo ‘VNCSERVERARGS=”-geometry 1024×768″‘ >> /etc/sysconfig/vncservers
Keep in mind you’ll need to change the username and if you want a different resolution, now’s the time. You can always edit that later though.
Now we need to create a vnc password. It’s easy! Just login as the user via ssh (or use sudo) and type
and to set the password.
You’ll need to allow port 5901 though your firewall, and then restart the service:
[~]# service vncserver restart
If you want yours to start every time your VPS boots, you can do
[~]# chkconfig vncserver on
Now you’ll need a VNC client for your computer. I use a free terminal software called MobaXterm. It isn’t perfect but its better than most! It has SSH, SFTP, Telnet, VNC, RDP, and many other protocols all rolled into one nice, portable package.
Here’s the results of my own setup at 1440×900, shown on a 1024×768 screen:
If you need a hand getting your remote desktop server going, leave a comment! I’ll be glad to help you get yours.