Remote Desktop from Windows onto Ubuntu 22.04 takes me to a XRDP login then a blank screen

I'm trying to get the Remote Desktop feature working on Ubuntu (Desktop) 22.04, but I can't seem to connect to my Ubuntu desktop from a Windows (10) PC. I'm using these instructions:

I've enabled Remote Desktop in the (Ubuntu) Sharing Settings, however when I run the Remote Desktop client (i.e. the standard mstsc.exe client) on Windows and connect to the IP address of the Ubuntu server, I get this login dialog:

XRDP Login

The Session dropdown has 4 options:

  • Xorg
  • Xvnc
  • vnc-any
  • neutrinordp-any

Selecting Xorg and some login credentials causes the window to close. If I leave the credentials blank I get an Ok dialog with this message:

Connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait...
login failed for display 0

If I click Ok the it takes me back to the login dialog.

If I select Xvnc and some credentials then I get a blank green screen.

I get similar behaviour if I disable Remote Desktop in the Sharing settings.

I tried the same thing with a second Ubuntu 22.04 host and get the same thing.

1 Answer

You have to be logged out of your account on ubuntu desktop. Else RDP on windows will keep quitting.

You need to Export follwing enviorment variables

export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME

Either do sudo nano .xsessionrc or sudo nano /etc/xrdp/startwm.sh and place the above two lines at the very start and reboot your pc.

6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like