0

I'm using my home Windows 11 laptop's built in RDP client to connect to my office Ubuntu workstation running Ubuntu 22.04.2 LTS through the xRDP server. 90% of the time, the client connects to the existing xRDP session and I can continue my work where I left off. However, 10% of the time, when I connect to the workstation, xRDP seems to kill the existing session and log in to a new one. I suspect so because I have a code that outputs timed logs every two seconds and when I get logged in to a new session, I see that my log from the previous session stopped just before I am logged in to the new one.

As I can already log in to existing sessions, tweaking the xRDP parameters to allow log in to existing sessions should be unnecessary. However, I don't understand why xRDP is killing the existing session that was running fine before it logs me in to a new one.

Any idea what is causing the issue and if there is a good way to resolve it?

Jacek
  • 101
  • 1

1 Answers1

0

You should use the Gnome Remote Desktop and uninstall xrdp.

xRDP only allows remote access when you are not logged in locally. The Gnome Remote Desktop does the opposite. That is if you are not locally logged in, you cannot remotely access the computer.

See the Update for Ubuntu 22.04 and above section of this answer for a picture to enable Gnome Remote Desktop:

I'm looking for a VNC or RDP Ubuntu to Ubuntu setup that logs into current user session

You may want to install the Allow locked Remote Desktop GNOME Shell extension if your computer is set to lock the screen when not in use.

References:

Hope this helps

user68186
  • 31,376
  • 12
  • 85
  • 112
  • With my current settings, I am able to remotely access my workstation (into a remote session) whether or not I have a local session active. This contradicts your description above, so what's going on? – Jacek Aug 30 '23 at 08:36
  • I don't know your setup. Is it possible you have Gnome Remote Desktop turned on as well as `xrdp` installed? Then for some reason one or the other may be work one at a time. – user68186 Aug 30 '23 at 13:55