Remote Desktop to Linux


There are many ways to connect graphically to Linux systems from stuff like XDMCP, VNC, and RDP. For best performance RDP is the most useful protocol and can be connected to from Microsoft RD Client, or compatible alternatives. RDP offers copy and paste support between the RD Client and the Linux computer, redirecting audio to the RD Client, and share a clients drives with the remote Linux computer.

Using Ubuntu 22.04 as an example there are two ways to gain remote access with RDP but you can only use one option.

  • If you want to be able to connect to your Linux machine which is already logged into the desktop: you need to use the Remote Desktop options in Settings > Sharing. You will be able to connect from an RDP client and you will work with the image from your Linux computers screen at its current resolution and aspect ratio. You will be able to copy and paste files but will not hear audio on your RD client, and attempting to play audio will disturb your house mice as audio will come from the Linux computers speakers. You also use the login details from the Remote Desktop settings window to connect; not your user account login. If you logout of your Linux PC you are not able to connect with your RD Client.
  • If you want to enable RDP access for all users on your Linux computer then you can install xrdp preferably via your Linux distributions packaging system. With this option your Linux computer becomes a true multiuser graphical desktop server so this is ideal for headless systems. Users connect with the RD Client using their username and password which takes them straight to a new desktop session. Multiple users can login to their desktop simultaneously, and one user can even open multiple sessions providing they have a second RD client. Users will get a desktop at the clients screen resolution and aspect ratio providing the Linux computer has sufficient video hardware resources. Users can copy and paste files through RDP and it is possible to configure audio redirection. It may not be possible to connect through the RD Client if you are logged into a graphical session at the Linux computer, and you cannot login to the Linux Computer locally if you are logged in to an RDP session.

Setting up xrdp

This is the option you use to enable RDP for all users giving the best remote experience. This option is not suitable for connecting to an existing desktop session on the Linux computer.

  1. Make sure that Remote Desktop is not enabled in Settings > Sharing as this will conflict with the service we are configuring.
  2. Install the “xrdp” package and all dependencies through your Linux distributions software management for example apt install xrdp or dnf install xrdp .
  3. xrdp may already be started upon installation but you can verify that it is ready and listening with systemctl status xrdp . If the service is not running start it with service xrdp start and permenently enable it with systemctl enable xrdp .
  4. Logout of your desktop, install an RD Client on your intended remote client device, connect to the Linux computers IP address, DNS or Bonjour address and login with your Linux username and password. If all went well you should be presented with your Linux desktop.