Ubuntu Remote Desktop: Ultra-Smooth Windows Connection Without Extra Apps

Ubuntu tutorial - IT technology blog
Ubuntu tutorial - IT technology blog

3-Minute Quick Setup

If you’re using Ubuntu 22.04 or 24.04 LTS and want to control it from Windows, don’t rush to install xrdp. Newer Ubuntu versions have integrated the RDP protocol directly into the system core. This thoroughly resolves the classic black screen error that techies often encountered in the past.

The activation steps are extremely simple:

  1. Go to Settings from the application menu.
  2. Select System, then find the Remote Desktop section.
  3. Toggle the Remote Desktop switch to On.
  4. Open the configuration section to get the User and Password. This is the key to logging in from your Windows machine.
  5. On Windows, open Remote Desktop Connection (mstsc), type in the Ubuntu IP address, and start working.

For long-term stability, especially when leaving a machine running in a lab or office, check out the tweaks below.

Why is built-in RDP better than VNC or TeamViewer?

I used to be loyal to VNC, but it has a fatal flaw: it transmits data as bitmaps. If the network is unstable, latency can reach 500ms, which is incredibly frustrating. TeamViewer or AnyDesk are convenient but often have time limits or complex licensing requirements.

RDP (Remote Desktop Protocol) handles things more intelligently by rendering graphical objects directly on the client machine. While VNC eats up 10-20 Mbps for smooth display, RDP only needs about 1.5 – 2 Mbps for office tasks. Real-world experience shows that window dragging and dropping has almost zero lag.

Detailed Configuration for Uninterrupted Connection

1. Set a persistent password

Ubuntu usually generates a random password for each session. You should change it to a private password to avoid having to find a new one every time the machine reboots. To quickly check the status via terminal, use the command:

grdctl status

2. Open the Firewall port

If your machine has ufw enabled, open port 3389. If you skip this step, Windows will immediately report a “Connection Timeout” error.

sudo ufw allow 3389/tcp
sudo ufw reload

3. Handling Login Issues (Auto-login)

The default RDP feature requires the Ubuntu machine to be in a logged-in state. If the machine has just booted and is stuck at the user selection screen, the connection will fail.

The solution is to enable Automatic Login in Settings -> Users. However, only do this if the machine is in a secure location. If it’s in a public area, this is a concerning security vulnerability.

For Pros: Configuration via Command Line (CLI)

If you are SSHing into a server and want to enable the GUI remotely, use the grdctl tool. This is a professional way to manage it without touching a mouse.

# Enable RDP service
grdctl rdp enable

# Set login credentials
grdctl rdp set-credentials 'username' 'strong_password'

# Review all configured parameters
grdctl status --show-credentials

Troubleshooting Tips

Conflict with xrdp

If you previously installed xrdp manually, these two services will compete for port 3389. Completely remove the old version to avoid blue or black screen errors:

sudo apt purge xrdp -y
sudo systemctl restart gnome-remote-desktop

Disconnected on Screen Lock

If Ubuntu automatically locks the screen or enters Sleep mode while you’re working, the RDP connection will drop. Go to Settings -> Power, and set Screen Blank to Never. Also, disable Automatic Suspend so the server is always ready.

Tips for Headless Machines (No Monitor)

With mini PCs acting as servers, GNOME often doesn’t activate the graphics card if it doesn’t detect a physical monitor. As a result, remoting in is very laggy or the resolution is capped at 800×600.

My solution is to buy an HDMI Dummy Plug (costing about $2). Plug it into the HDMI port, and the machine will “think” it’s connected to a 4K monitor, allowing the graphics driver to run at full capacity.

Optimizing the Windows Experience

  • Display: Adjust the resolution to “Large” or the exact size of the monitor you’re using for the sharpest image.
  • Local Resources: Under the Keyboard section, select “On the remote computer”. This setting allows you to use shortcuts like Alt+Tab directly on the Ubuntu machine.
  • Experience: If the network is weak, reduce the Color Depth to 16-bit. The colors will be less vibrant, but response speed will increase significantly.

Using the built-in RDP makes the system much cleaner and more stable than installing third-party tools. If you encounter any strange errors during setup, feel free to leave a comment below!

Share: