Enable Remote Desktop in Ubuntu 22.04. It seems that just enabling Remote Desktop in the Settings app.
There's two services that can be used: `gnome-remote-desktop` and `xrdp`. `xrdp` will allow login without first login to the console. `gnome-remote-desktop` will require a login to the console to start.
- - -
# Configure via ssh
## Update and install packages
```bash
sudo apt update
sudo apt install -y gnome-remote-desktop winpr-utils libsecret-tools
```
## Open the firewall
```bash
sudo ufw allow 3389/tcp
```
## Setup config
```bash
gsettings set org.gnome.desktop.remote-desktop.rdp enable true
# self-signed cert for RDP
winpr-makecert -silent -rdp -path ~/.local/share/gnome-remote-desktop/ rdp-tls
grdctl rdp set-tls-key ~/.local/share/gnome-remote-desktop/rdp-tls.key
grdctl rdp set-tls-cert ~/.local/share/gnome-remote-desktop/rdp-tls.crt
# set RDP username/password that MRD will use
grdctl rdp set-credentials shaun 'yourpassword'
# allow keyboard/mouse
grdctl rdp disable-view-only
# ensure the service is running
systemctl --user enable --now gnome-remote-desktop
```
(Those `grdctl` subcommands and the TLS steps are the supported way to configure GNOME RDP from CLI. ([Ubuntu Manpages](https://manpages.ubuntu.com/manpages/lunar/man1/grdctl.1.html "Ubuntu Manpage:
grdctl - Command line tool for configuring GNOME Remote Desktop"), [Ask Ubuntu](https://askubuntu.com/questions/1499789/enable-rdp-from-command-line "Enable RDP from command line - Ask Ubuntu")))
```bash
echo $XDG_SESSION_TYPE
# if this prints "x11", edit /etc/gdm3/custom.conf to have: WaylandEnable=true
# then: sudo systemctl restart gdm3 (or reboot)
```
Verify it’s listening
```bash
ss -tulpn | grep 3389
sudo lsof -i :3389 -n -P
journalctl --user -u gnome-remote-desktop -n 50 --no-pager
```
If you still hit **0x207** on the Mac client, export the connection to a `.rdp` file, open it, and set:
```
use redirection server name:i:1
```
Save, then open that file—this specific MRD-for-Mac quirk has fixed 0x207 for many folks. ([DEV Community](https://dev.to/emile1636/rdp-error-code-0x207-on-mac-for-ubuntu-24-d6d "Fix for Remote Desktop Error code 0x207 on Mac for Ubuntu - DEV Community"))
If it still fails, tail the log while you connect:
```bash
journalctl --user -u gnome-remote-desktop -f
```
If you use the UI to setup Remote Desktop, editing the RDP connection file may be the fix.