Question

difficulty setting up ubuntu droplet with remote desktop access xrdp

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”.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
April 10, 2025

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.

alexdo
Site Moderator
Site Moderator badge
April 10, 2025

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!

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.