XRL Tech Corner

Font size: +

How to install graphical environment in Linux VPS

When we hire a vps linux hosting service, sometimes the need arises to have a graphic environment such as Windows systems.

That is why we are going to explain in this tutorial how to connect to our vps linux server (virtual private server) through a desktop graphical environment .

Normally the access to the vps is by ssh , which is a text terminal, (something similar to a windows MS-DOS window) but sometimes it is useful to access a Linux graphical environment using the Windows remote desktop utility.

For this we will have to install a graphic environment on the vps server, (if it does not already have it), with any window manager, so that we can connect with the " Windows Remote Desktop " utility, which is the use in this tutorial. There are also other programs like the VNC , or the Teamviewer , but they are not exactly the same.

It is important to decide what kind of graphic manager (and by that I mean also the window manager) we will install, because if the vps server is very far from our location and the connections are slow we will have a low refresh rate. It is not the same to have it in a local network than to have it in the United States being located in Spain for example.

Similarly, the cheapest vps servers are usually configured with scarce resources of memory, processor, hard disk space (some carry SSD solid state disks) and bandwidth (communications), which will also condition us when choosing the right window manager.

If you are looking for a good VPS service in the cloud , we advise you to try Digital Ocean , just by registering with our link you are given $ 10 and if you do not want to pay later, you can delete the virtual machines after each use so that you do not get copper.

A manager that meets these minimum requirements is the lxde (Lightweight X11 Desktop Environment). We are going to describe the steps to install it in an Ubuntu system:

lxde desk

As usual we will open an ssh and write the following in the terminal:

sudo apt-get install lubuntu-desktop

Then we will install the protocol and the xrdp server:

sudo apt-get install xrdp

Later we will install the common libraries of the window manager:

sudo apt-get install lxde-common

Additionally we will have to change the configuration file startwm.sh in / etc / xrdp since by default the window manager we want will not start. So with the VI editor:

sudo vi /etc/xrdp/startwm.sh

We will comment on the Xsession line and write startlxde :

#. / etc / X11 / Xsession


For defect we will work with a keyboard mapping in English, so in order to configure it in Spanish we would have to take additional steps:

sudo setxkbmap -layout 'is, is' -model pc105

sudo xrdp-genkeymap /etc/xrdp/km-040a.ini

sudo chown xrdp: xrdp km-040a.ini

Sometimes the execution of these commands can return a "display" error, especially in a vps server, so I leave here the link to download that file (remember that it is for a Spanish keyboard):


Do not forget to change the user and group of that file with the chown statement.

Finally, the final step will be to restart the xrdp service with:

sudo service xrdp restart

To connect from our Windows system we will open the " Remote Desktop Connection " program, we will set the IP address of the vps and then we will specify the user and password.

One note, in the vps we would have to open port 3389 for the connection to work, otherwise it could be possible that it would not work, even at our PC level if we have a firewall we will also have to open that port.

To connect us to an existing session we could add a new configuration section in the xrdp.ini file specifying a port = 5911. (do not forget to restart the xrdp service later).

In this way, the first configuration section " xrdp1 " will take advantage of an existing session (on port 5911), and the second " xrdp2 " will create a new one:


name = sesman-Xvnc

lib = libvnc.so

username = ask

password = ask

ip =

port = 5911


name = new-sesman-Xvnc

lib = libvnc.so

username = ask

password = ask

ip =

port = -1

Continuing with the subject of the vps , if the one that we hire has few resources, it would be advisable to deactivate the screensaver (screensaver) so that it does not use resources of the machine.

In terms of security, it would also be advisable to deactivate the guest account in the Ubuntu graphic manager.

For registered users we have an offer of $ 10 of a vps linux called Digital Ocean. You can click on this link to get it .

Rate this blog entry:
Install Drupal 8 on Ubuntu
Install Owncloud Ubuntu

Related Posts



No comments made yet. Be the first to submit a comment
Wednesday, 18 September 2019

Captcha Image