1

I login remotely to my PC (Ubuntu 18.04, XRDP 0.9.5) from my laptop (Windows 10) using windows remote desktop. Once I have logged in remotely to Ubuntu, I cannot login locally to it (for times when I am physically in the lab). Locally, I see the login screen and enter my password but the login screen appears again without any error messages. I then have to logout from my remote session (which kills any experiments I am doing) in order to login locally and this works fine. The problem is that I have to logout from my remote session and this is not an ideal situation for me. The reverse is also true [if logged in locally, I am unable to login remotely. I get a connection, enter my password but nothing happens, no error messages even].

Is there a solution to this problem. The closest post I could find was this but I don't understand what this guy did. Appreciate the help. Thanks

0
2

By default xrdp will create a new session when you remotely connect and the local user must be logged out first for this to work or otherwise you will see a blank screen when you connect remotely.

To have xrdp log you in to the existing active logged-in local session instead, follow these steps:

First, enable screen sharing in Ubuntu settings and set a password.

Then, edit /etc/xrdp/xrdp.ini like so:

sudo nano /etc/xrdp/xrdp.ini

Then, copy and paste the following at the end of the file:

[xrdp1-loggedin]
name=Local Active Session
lib=libvnc.so
username=na
password=ask
ip=127.0.0.1
port=5900

Then, save the file and close the editor by pressing Ctrl + x then y then Enter

Finally, run in the terminal:

gsettings set org.gnome.Vino require-encryption false

Next, login locally then connect from a remote machine and choose Local Active Session from the Session drop-down menu when you see this screen:

enter image description here

Then, enter the password you set for screen sharing and click the OK button when you see the password field that looks like this:

enter image description here

3
  • thank you @Raffa for a very detailed answer. I tried it when I was able to go to the lab physically and it worked as described. However I would like to point out that there were 2 scenarios which i had thought would have identical solutions, but it turns out that they are not identical. Apr 2 at 21:36
  • 1. Logged in Locally -> Try to log in Remotely via XRDP -- This solution works [login via the newly created Local Active Session]. Apr 2 at 21:36
  • 2. Logged in Remotely -> Try to log in Locally -- Doesn't work [with fair reason that this procedure modifies xrdp, while it would require some way to modify the local login]. Apr 2 at 21:36
1

Although this is not an answer this may help someone following the answer from @Raffa above. I followed the answer from Raffa and I could not get it to work I kept getting this error:

this error

In the end the error for me was that I was trying to connect from a computer with multiple screens to a remote computer with one screen and "Use all my monitors" was checked in my RDP client see here:

see here

When I unchecked it it worked. Hope this helps someone.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.