---
title: "Xrdp Black Screen on Ubuntu 22.04 and 24.04: Fixes | DeviceTests"
description: "Black screen after xrdp login on Ubuntu 22.04 or 24.04? Log out of the local session, then fix startwm.sh, ssl-cert and the color prompt. 26.04 notes."
url: https://devicetests.com/fixing-xrdp-black-screen-issue-ubuntu
language: en
---

# Fixing Xrdp Black Screen Issue on Ubuntu 20.04 and 22.04

By Eric Buchanan · Updated November 4, 2026 · First published July 22, 2023

Short answer

The most common cause of a black screen after the xrdp login is that **the same user is still logged in on the Ubuntu computer itself**. Log out there, then connect again. If that doesn’t help, the fixes below cover the other causes on Ubuntu 22.04 and 24.04.

_Left, a laptop whose remote desktop window is black. Right, the Ubuntu computer with the same user still signed in on its own screen._

1. The user still signed in on the Ubuntu computer: log out here.
2. The remote desktop window stays black.

One user can't have a desktop on the Ubuntu screen and an xrdp desktop at the same time.

Run the commands on the Ubuntu computer, in a terminal (Ctrl + Alt + T) or over SSH. In nano, save with Ctrl + O and Enter, then close with Ctrl + X.

> Ubuntu 26.04 and 20.04
>
> On **26.04**, the Ubuntu desktop runs only on Wayland, so xrdp can’t start it. Use GNOME’s built-in remote desktop instead (see [the last section](https://devicetests.com/fixing-xrdp-black-screen-issue-ubuntu#the-built-in-alternative-gnome-remote-desktop)), or an X11 desktop such as Xfce with xrdp. **20.04** is past standard support; the fixes below still work there.

## Fix 1: Log out of the desktop session

On Ubuntu, one user can’t be logged in on the computer’s screen and over xrdp at the same time: both sessions would share one session bus. On the Ubuntu computer, open the system menu and choose **Power Off / Log Out**, **Log Out**. Then connect again. Or connect as a different user.

## Fix 2: Edit startwm.sh

Settings left over from the local login can stop the remote desktop from starting.

1. Back up the file:

   ```
   sudo cp /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.bak
   ```

2. Open it:

   ```
   sudo nano /etc/xrdp/startwm.sh
   ```

3. Add these lines right after the first line (`#!/bin/sh`):

   ```
   unset DBUS_SESSION_BUS_ADDRESS
   unset XDG_RUNTIME_DIR
   ```

4. Save and restart xrdp:

   ```
   sudo systemctl restart xrdp
   ```

No difference? Put the backup back with `sudo cp /etc/xrdp/startwm.sh.bak /etc/xrdp/startwm.sh`.

**The desktop opens but looks like plain GNOME, without the Ubuntu dock?** Add these two lines in the same place, then restart xrdp. Or put them in `~/.xsessionrc` for your user only:

```
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
```

## Fix 3: Give xrdp access to its certificate

xrdp needs to read the system’s SSL certificate key. If it can’t, the login can fail. On 22.04 and 24.04, add the `xrdp` user to the `ssl-cert` group:

```
sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp
```

## Fix 4: Stop the “color managed device” prompt (22.04)

The remote session can hang on a hidden prompt: “Authentication is required to create a color managed device”. On 24.04 and newer, the xrdp package already allows this, so skip this fix. On 22.04, allow only these color actions in a file of your own:

1. Create the file:

   ```
   sudo nano /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
   ```

2. Paste these lines:

   ```
   [Allow colord for active users]
   Identity=unix-user:*
   Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
   ResultAny=no
   ResultInactive=no
   ResultActive=yes
   ```

3. Save and restart the computer.

This lets any logged-in user change color profiles without a password. To undo it, delete the file.

## Fix 5: Reinstall xrdp

This keeps your settings in `/etc/xrdp`.

```
sudo apt install --reinstall xrdp xorgxrdp
sudo systemctl enable --now xrdp
```

Then repeat Fix 3. Still black? Look for errors in `~/.xsession-errors`, `/var/log/xrdp.log` and `/var/log/xrdp-sesman.log`.

> Keep port 3389 off the internet
>
> Don’t open port 3389 on your router to reach xrdp from outside. Use a VPN instead.

## Hyper-V virtual machines

Hyper-V’s **Enhanced Session** connects to a Linux machine over RDP, through xrdp inside it. If it shows a black screen, turn off **Enhanced Session** with its icon in the virtual machine window’s toolbar. You get the basic console, where you can log in and apply the fixes above.

## The built-in alternative: GNOME Remote Desktop

Ubuntu 24.04 and newer have their own RDP server, with no xrdp needed. It’s the way to reach the Ubuntu desktop on 26.04. Use one or the other: both listen on port 3389.

### Share your open desktop

1. Open **Settings** **System** **Remote Desktop**.
2. Turn on **Desktop Sharing**, and **Remote Control** so you can use the mouse and keyboard.
3. Note the user name and password shown there, and connect with Windows Remote Desktop.

This shares the desktop of the user who is signed in on the computer.

### Log in remotely

1. Open **Settings** **System** **Remote Desktop**.
2. Open **Remote Login**, select **Unlock**, and turn it on.
3. Connect with Windows Remote Desktop and sign in.

This works when nobody is signed in on the computer.

## Sources

- [xrdp wiki: Tips and FAQ (same user logged in locally)](https://github.com/neutrinolabs/xrdp/wiki/Tips-and-FAQ)
- [Ubuntu 26.04 release notes: Ubuntu Desktop runs only on Wayland](https://documentation.ubuntu.com/release-notes/26.04/summary-for-lts-users/)
- [Ubuntu manpage: Xsession (\~/.xsessionrc)](https://manpages.ubuntu.com/manpages/noble/man5/Xsession.5.html)
- [GNOME Help: Share your desktop](https://help.gnome.org/users/gnome-help/stable/sharing-desktop.html.en)
- [GNOME Help: Remote Login](https://help.gnome.org/users/gnome-help/stable/remote-login.html.en)
- [Microsoft: Hyper-V Enhanced Session Mode](https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/enhanced-session-mode)

## Test it yourself

Check your own device with a free test. It runs in your web browser.

- [My device](https://devicetests.com/my-device): See your system, browser, screen, graphics and memory in plain words, and copy them as one report.
- [Printer test page](https://devicetests.com/printer-test-page): Print a colour, black and white, grey or alignment page, or save it as a PDF, and read what it shows.
- [GPU test](https://devicetests.com/gpu-test): See which graphics chip your browser uses, what it supports, and how fast it draws.
