How to remote desktop to Linux VPS?

How to setup a remote control desktop to a Linux VPS server

These days you can get a low end VPS running Linux for just a few dollars per month, but what can you do with these Linux servers? Many people will use them for hosting a website and therefore they will configure them using the command line interface using SSH or with some sort of web based control panel. But one area where you could use it which is often overlooked it as a remote PC which you can use standard desktop applications. Now you may already have a desktop PC or laptop which you can use for such tasks but having access to a VPS that can remotely run desktop apps can still be useful. Below I am going to show you how you can setup the remote desktop app X2GO to connect to a VPS running Centos 7.

In this tutorial I am going to assume that Centos 7 is already installed and you have access to it via SSH. If that isn’t the case there are many walk through’s available online which can show you how to do this or your VPS providers technical support should be able to configure it for you. I chose CentOS for the Linux distribution as it is a popular distro that is setup on many VPS but most of the tutorial should work on other flavours of Linux with a bit of tweaking. It shouldn’t matter what hypervisor your VPS is using whether that is OpenVM, KVM etc it should all still work ok.

Connect to your VPS with a user with SSH access, this could be done as root for the moment. We need to enable to enable the EPEL repository by typing:

rpm -ivh

We can then install the X2GO server software from the EPEL repo with this command

yum -y install x2goserver-xsession

After the x2go server software has finished installing we need to install some sort of GUI as most VPS are set up without any form of desktop or windows environment by default. For the purpose of this tutorial I am going to install Openbox windows manager

yum -y install openbox

Openbox is a very light windows manager but is very basic so if you want a more enhanced desktop then you could install Xfce using this command instead

yum -y groupinstall "Xfce"

You may need to reboot your VPS after installing the desktop environment with the command


Next you need to install the client software on to your home computer. There is a X2go client software available for Windows or for most Linux distros. I am going to assume you know how to install programs onto your PC so won’t do a step by step for this stage.

Once you have the client software installed it is time to try to connect to your VPS using the X2go client.

On running the X2go client for the first time it will open up a new session prompt. I have highlighted the areas in red that are most likely what you will need to change to your specific configuration. If you are running SSH on a none standard port or are using an SSH key rather than a password you may need to alter these field also.

For this tutorial I installed the Openbox window manager so will choose this as the session type

Configuring X2goclient for remote desktop to vps


On the login screen enter your password and then after a few moments depending on your connection speed you should get up a window which is running your VPS remote desktop. Now if you chose Openbox as I did you will find you just get a black screen. If you right click anywhere on this screen with your mouse you will get up a little menu. As below.
Connected to Openbox session on VPS using X2go remote desktop client

Now you may find the menu is not populated with any applications that you can use and that is because you need to install some.

Disconnect from your X2go remote desktop and go back to your SSH shell session and type

yum -y install dillo

To install the Dillo lightweight web browser. You could if you prefer install the firefox web browser by typing:

yum -y install Firefox

Firefox is more resource intensive though so I wouldn’t recommend this unless your VPS has 1GB of RAM or more.

Reconnect to your VPS through the X2goclient remote desktop and right click to bring up the menu and now under applications > Internet you should see the browser you just installed. If you select it it will then load up in your remote desktop session.

Running a web browser from X2GO in remote desktop from a linux VPS server



Running a browser through your VPS remote desktop rather than from your own computer means that any website you connect to will see your IP address as being that of the VPS, so it can be a good way to get around restrictions that either your Internet provider or websites impose. Say for instance there is a website that restricts users from your country connecting based on IP address. If you connected using the web browser in your VPS remote desktop session the website will think you are in the country that the VPS is located in an allow you access.

It is not just web browser you can run through the remote desktop to your Linux VPS it can be any GUI based linux program so that could be an office suite such as Libreoffice, email client, bit torrent client, video editing software plus much more.