Enable Microsoft Remote Desktop (RDP) on Linux

Gnome 42 has a fantastic new feature that allows Linux users to share their desktops with Microsoft’s Remote Desktop Protocol remotely, namely GNOME remote desktop. In this tutorial, we’ll show you how you can use this great new feature.

Without this feature, an alternative solution is xrdp. However, xrdp cannot provide a consistent desktop environment as used in current Linux.

Enable Automatic Login and Disable Screen Lock

For the remote desktop to work on GNOME, we have to enable automatic login and disable automatic screen lock. Otherwise, it is unable to connect to the Linux PC remotely from Windows 10/11 using the Remote Desktop Connection app.

Enable Remote Desktop

For Ubuntu 22.04 (or other Linux distributions with GNOME>=42), the RDP-based remote desktop can be enabled from Settings ➜ Sharing ➜ Remote Desktop.

The username and password should be set in the authentication section.

The image below shows the Ubuntu desktop connected from Microsoft Remote Desktop (for macOS).

For several distributions like Arch Linux, the remote desktop client may show a blank/black screen after connected.

The following command may help (run as root), where the archuser should be replaced with your username.

groupadd pipewire
usermod -a -G pipewire archuser
mv /etc/pipewire /tmp/pipewire
pacman -S pipewire pipewire-media-session gst-plugin-pipewire
reboot

The image below shows the Arch Linux desktop connected from Microsoft Remote Desktop (for macOS).

References

  • https://linuxhint.com/enable-remote-desktop-ubuntu-access-from-windows/
  • https://www.addictivetips.com/ubuntu-linux-tips/how-to-use-the-new-gnome-shell-remote-desktop-feature/
  • https://forum.manjaro.org/t/gnome-remote-desktop-blank-screen/122345/4
Contact Us
  • Tencent Binhai Building, Shenzhen, China
  • root [at] haozhexie [dot] com