Report this

What is the reason for this report?

difficulty setting up ubuntu droplet with remote desktop access xrdp

Posted on April 9, 2025

I tried setting up a digitalocean droplet ubuntu with remote desktop

using these commands

sudo adduser bob

sudo apt update (was quick)

sudo apt install -y xubuntu-desktop (takes about 7min)

sudo apt install -y xrdp (within 30sec )

Then in Windows I open up mstsc.exe and enter the IP, and I get a Ubuntu login GUI come up. If I enter the correct user/pass then it exits!

That’s with Ubuntu24

If I do it on Ubuntu22 then a screen says “oops”.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

There are two possibilities

  • On Ubuntu 24.04 or 22.04, XRDP doesn’t play nicely out of the box with GNOME or even Xfce unless properly configured.

  • You get disconnected after login because XRDP tries to launch a session that crashes or closes immediately.

Set Xfce as the default session for XRDP. For the bob user, create (or modify) the file:

echo "startxfce4" > /home/bob/.xsession
chmod +x /home/bob/.xsession
chown bob:bob /home/bob/.xsession

Allow the bob user to use XRDP’s session. Sometimes you need to add them to the ssl-cert group:

sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp

Also, allow the XRDP port, by default it’s 3389 in your firewall, please.

You can try and changing the port to something else as I’ve seen people having issues in the past with this.

Heya @userdo

If xubuntu-desktop is causing issues, try using lxqt or mate, which are lighter and often more compatible with XRDP:

sudo apt install ubuntu-mate-core ubuntu-mate-desktop

Then set the session:

echo "mate-session" > /home/bob/.xsession 
chown bob:bob /home/bob/.xsession 
chmod +x /home/bob/.xsession
sudo apt install lxqt 
echo "lxqt-session" > /home/bob/.xsession

Then restart xrdp:

sudo systemctl restart xrdp

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.