6

I installed Ubuntu Desktop 22.04 and want to connect through RDP or VNC. I found screen sharing and enabled RDP. I know the IP of the machine, so I gave it a try. Well, it's not working.

I then found that the Xrdp protocol needs to be installed, so I installed it. Still not working. I also read that it should work with Windows 10/11 RDP, so I tried with Windows 10 RDP from the same network, but still not working.

I can ping the Ubuntu PC, that's something.

Is there a proper explanation of what I should do to make it work?

2
  • 1
    "it's not working" is a bit too vague to offer useful advice. Your description should include the exact steps we should follow to reproduce the issue, and show accurate and complete feedback like error messages and popups. Keep in mind that we're not in the room with you, so we cannot see your setup or what you are doing. Help us to help you.
    – user535733
    Aug 6, 2022 at 13:47
  • 3
    XRDP is red herring here. whoever says you need xrdp to enable 22.04 rdp functionality doesnt know what they are talking about Aug 29, 2022 at 18:25

4 Answers 4

3

Installing xrdp is counter productive.

@DBoltons'answer is helpful already but missing the screenshots you see below.

In my environment i have got 4 Ubuntu 22.04 LTS systems on which i am trying to get RDP Screensharing to work. I was only successful for two of the systems so far - and both do not have xrdrp installed!

First you might want to note that you need proper authentication - a password is generated which you need to use generated password

otherwise you might see an error message such as:

Error Message

In settings/about i got: Settings/about

To avoid the session to disconnect itself when the screen save kicks in you might want to change Settings/Privacy/Screen

Screen Share

Please also note the followup screen sharing issue:

It seems as of 2022-11 you can either have remote desktop sharing with wayland or screen sharing via zoom but not both at the same time!

Here is a list of links i checked so far - beware some of the information provided by these links might be misleading - the situation seems to be quite confusing as of 2022-11.

1

Answered this originally assuming you actually want xrdp, and leaving that below for reference. Not using xrdp is probably the way to go though.

The built in gnome rdp feature works, but has issues with authentication. Some possible solutions are available here.

22.04 - Remote Desktop Sharing authentication password changes every reboot

If you actually want xrdp working, the answer below was related to troubleshooting that. Not an easy path though.

For further troubleshooting: As described at the 1777 issue on the xrdp github page, run the following commands on the xrdp server machine to check whether xrdp is able to talk to sesman:

sudo ps -e -o pid,netns,command | grep xrdp

sudo ss -alp 'sport = 3350'

sudo nmap -p 3350 127.0.0.1

You are looking for the following things in particular:

3350/tcp closed

Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process

tcp LISTEN 0 2 [::1]:3350 [::]:* users:(("xrdp-sesman",pid=2760,fd=7))

Together those indicate that the sessman is listening on IPv6 as indicated by [::1]:3350 rather than on the IPv4 address of your host, and the 3350 port on IPv4 is not responding. If that shows your correct IPV4 address and 3350 is open, you are having a different issue.

The suggested solution is to rebuild xrdp without --enable-ipv6, to have a version that isn't confused by IPv6.

More details are available here if you want to go that route. https://github.com/neutrinolabs/xrdp/issues/1855

I am having the same issue, despite being on x86_64 with the 5.15 kernel. None of the other recommendations here have helped. The service is running, but not communicating correctly. Xrdp can't talk to the xrdp-sesman, and so the login doesn't work and just hangs at a blank screen for a long time.

There is work underway to fix this natively; Xrdp has implemented a new communication structure that should resolve this and other issues. Not clear it is in the current release yet, and definitely not in the version in the Ubuntu repositories. Not a fix, but for me understanding why it was broken helped. You will probably get a fix by waiting.

An alternative - use x2go for the time being. Doesn't work with gnome, so you would have to install another desktop manager. I installed mate, and with x2go I now have remote GUI connectivity. Not an ideal solution, but a placeholder if you don't want to recompile your own binaries.

2
  • 2
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. Sep 19, 2022 at 14:51
  • 1
    I found this answer to be very useful and I appreciate the efforts made. I will certainly be using this to help me solve my connection issues. Thanks.
    – gfmoore
    Apr 6 at 15:49
1

There's several possible causes for the following error on Windows using Remote Desktop Connection. Let's go in depth on each of the three categories listed below.

Remote Desktop can't connect to the remote computer for one of these reasons:

  1. Remote access to the server is not enabled
  2. The remote computer is turned off
  3. The remote computer is not available on the network

Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.

  1. Check remote access to the server is enabled.
    1. Using Ubuntu 22.04 and later, check Settings > Sharing > header should be marked on.
    2. Remote Desktop > Remote Desktop should be on. If you want Remote control, turn that on too.
  2. Check the remote computer is on and unlocked.
    1. Check the computer is on.
    2. Check the computer is not sleeping. (Consider turning off sleep if you want to connect at any time).
    3. Check the computer is connected to a screen. GNOME's implementation of Remote Desktop requires this.
    4. Check the computer is unlocked. GNOME's implementation of Remote Desktop requires this. Alternatively, install the Allow Locked Remote Desktop GNOME extension. (If you haven't installed GNOME Shell extensions before, install the Extension Manager first, then search within that app for "Allow Locked Remote Desktop")
  3. Check the network.
    1. Check both you and the server have a valid Internet connection.
    2. Check you are on the same network as the remote server.
      1. If you are connecting from a cellular device, confirm you are on your local WiFi rather than on mobile data.
      2. If you are on the local network but connected to an outside VPN, turn off the VPN.
    3. Check that the remote server firewall allows connections on port 3389: sudo ufw allow from any to any port 3389 proto tcp

Password issues

If you can't connect because of a password error, here's a few items to know and check:

  1. Check the password you are using matches the one displayed on Settings > Sharing > Remote Desktop under "Authentication."
  2. If you were able to connect before a reboot, and now can't, there's a chance Ubuntu changed the password. This seems to happen if the remote server is set to login automatically on start up. See these answers or another set of answers for available workarounds.
0

sudo apt update sudo apt install xrdp. there is a config for it at /etc/xrdp after the installation.

You need to add xrdp user to ssl-cert group for it to access certificates: sudo adduser xrdp ssl-cert After that you need to restart xrdp service: sudo systemctl restart xrdp

After this you can connect with rdp client to server (ip or if DNS services setup with FQDN name).

1
  • 1
    The only machine on which i got remote desktop sharing working on ubuntu 22.04 LTS had no xrdp installed. Nov 1, 2022 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .