Setting up XRDP in Lubuntu

When you get sick of how friggity slow VNC is over a VPN connection, you may want to install XRDP so you can RDP into your linux desktops.

I use Lubuntu on my Linux sandbox servers. I rarely use the GUI, so I want something as lightweight as possible as to not eat up a ton of resources on my VM host. If you don’t have Lubuntu, you’ll need it for this example… though Xubuntu would also work if you want something a bit more robust.

To install Lubuntu:
[bash]
sudo apt-get install lubuntu-desktop
[/bash]

Once you’ve installed Lubuntu, the setup is of XRDP is mostly painless, but it is a couple step process. first, install XRDP

[bash]
sudo apt-get install xrdp
[/bash]

Now, in order to actually get a desktop when you RDP into your machine, you’ll need to make sure that XRDP tries to start Lubuntu, instead of Xserver. To do this, you’ll create a file called .xsession in your users home directory:

[bash]
sudo nano ~/.xsession
[/bash]

You should enter the following line into the nano editor:

[bash]
lxsession -e LXDE -s Lubuntu
[/bash]

Now, you can restart XRDP and remote into your machine:

[bash]
sudo service xrdp restart
[/bash]

If you don’t use a GUI by default you can start it by typing the following into the command line (Lubuntu only)

[bash]
sudo service lightdm start
[/bash]

Boom! Now enjoy the speed of the RDP protocol!

Need to brush up on your Linux terminal skills? Check out this book.




Leave a Reply

Your email address will not be published. Required fields are marked *