Remote desktop on an Ubuntu VPS

Remote desktop on an Ubuntu VPS

In most Linux hosting environments, there is no need for the bloat of a graphical user interface. Everything can be done directly from the command line, or failing that via a web based control panel such as cPanel or Webmin. However, for those who need a shared development or testing environment, or simply a remote server to browse from, installing remote desktop on Linux may be the best solution.

This post is going to describe the simple steps I took to turning my Ubuntu VPS into a Ubuntu remote desktop. Firstly, start with an apt-get update to make sure your sources are up to date. If you’re with Crucial, you should use our mirrors.

As Ubuntu Server as provisioned with no desktop pre-installed, you’ll need to first install your favourite desktop interface on your VPS. The easiest way of doing this is to install the *-desktop metapackages available in Ubuntu.

As this is a remote server environment and I don’t need the graphical bells and whistles, I’m going to install xubuntu-desktop.

apt-get install –no-install-recommends xubuntu-desktop

The “–no-install-recommends” flag ensures Ubuntu doesn’t install extras such as Office, productivity and media software. Even without the extras, it will take a little while to download and install the Xfce desktop.

Once Xfce is installed, it’s time to install and configure our remote desktop. At this point, it is important to distinguish between ‘remote desktop’ and ‘desktop sharing’. Desktop sharing will allow you to control a server remotely using the VNC protocol, but will only allow a single connection. This means if two people connect at the same time, they will be battling for control of the mouse and keyboard. Desktop sharing is handy for remote desktop support, but not ideal for a server environment. I’m going to be using RDP, which similar to Windows Remote Desktop, allows multiple separate sessions on the server at the same time. Luckily, there is a great open source implementation of RDP called xrdp. To install it, ssh into your VPS and run the following command:

apt-get install xrdp

It’s that easy, now xrdp is installed and ready to connect. Open up your remote desktop client (available in Windows, Mac and Linux), enter the IP address of your VPS and click Connect. You should be greeted with the xrdp login box, followed by your shiny new Xfce desktop.

Xubuntu via RDP



  • Haris

    Thanks for the how-to!
    However proper syntax is apt-get --no-install-recommends install xubuntu-desktop

  • Thanks for the how-to!
    However proper syntax is apt-get –no-install-recommends install xubuntu-desktop
    I agree.

  • sam

    Thanks for the tip. Just adding another to help anyone who came across the same issue as I did (had me scratching for a few hours, I had it working, but it stopped doing so after I was playing with a few different DE’s).

    I was presented with a blank screen after attempting to initiate an RDP session via XRDP, I resolved this by entering the following command (for each account via SSH session) to specify which DE to be used for the default RDP session (in my case , as I had installed Xubuntu-Desktop):

    echo xfce4-session>~/.xsession

    The same can be applied for similar VNC issues.

  • liam


    I tried all the steps above and it seems installation are ok. but when i login to the server using my windows rdp, after login in, i see only blank gray colour, i cannot see the desktop. pls advise, thank you

  • what is this?

  • how to adjust the resolution?

  • İlker Akın ÖZDEMİR

    “apt-get install –no-install-recommends xubuntu-desktop”
    “-no-install-recommends” should starts with double hyphen.(–)

    Thanks 🙂