In this brief tutorial, I’m going to show you how to use Windows’ own remote desktop connection protocol to connect to Ubuntu Linux 16.04 / 17.10 and 18.04 / 18.10 desktops using Xrdp.
Xrdp is an open-source remote desktop protocol server which uses RDP to present a GUI to the client. It provides a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft’s own terminal server / remote desktop clients including copy + paste content/file, etc.
Step 1: Install Xrdp Server
To get Ubuntu Desktop accepting RDP connections, you must install and enable the Xrdp tool, here are the commands to install and enable the Xrdp tool:
sudo apt install xrdp sudo systemctl enable xrdp
Step 2: Connect from Windows PC
Now that Xrdp server is installed, go and open Windows Remote Desktop Connection (%windir%\system32\mstsc.exe)
And connect to the server’s IP or hostname.
Type your username in Ubuntu desktop.
Click ‘Connect’ to initiate remote desktop connection to the Ubuntu desktop, you will be warned something like this, but don’t worry that’s perfectly normal:
You can also tick that ‘Don’t ask me again for connection to this computer.’ so it will not warn you again in the future.
Type in your password in Ubuntu desktop.
If your credentials are correct, you should now logged on to your Ubuntu desktop from Windows.
This tutorial should works with other Linux variants as well, especially Debian Linux derivatives, I actually made this tutorial on Kali Linux:
andy@kali:~# lsb_release -a No LSB modules are available. Distributor ID: Kali Description: Kali GNU/Linux Rolling Release: kali-rolling Codename: kali-rolling andy@kali:~#
- If you have followed all the steps above but couldn’t logon, make sure you’re not already logged on to the Ubuntu desktop. Best thing is to restart your Ubuntu and don’t logon directly.
- If you try Xorg session and it quickly disconnect. Select the X11rdp from the drop-down list, it will hang and not fully logon, close the session and try the Xorg session again. Now it should work…
- But if it keeps prompting you to authenticate, you can cancel the prompt windows… and restart again if the above step doesn’t work right away.
Let me know by commenting down below if you have any question or comments.