I have a problem regarding logining a ubuntu both locally and remotely at the same time. I have two computers A and B, A with ubuntu 16.04LTS system and B with windows 10 system. I can physically access both A and B and launch softwares/applications using these computers. What I want to do is to access computer A (ubuntu 16.04) from computer B (windows 10) through remote desktop connection. But I have encountered problems doing this.

On computer A I install xrdp using these command:

sudo apt install xrdp
sudo systemctl enable xrdp

After that, I launch the remote desktop connection application on computer B and try to connect to A. If I do not login computer A locally, everything is fine and I can login to A from B remotely through the remote desktop, as illustrated in figure 1.

However, if I have already logined computer A locally, then I cannot login it from B through remote desktop (for the same user account on A). The errors are as follows in figure 2.

I search online and find warning about logging out ubuntu account locally before connecting to it remotely but didn't get the reason behind this and how I can fix this problem. Is there anyone who knows how to fix this problem or has similar problems?

figure 1: login successfully

figure 2: login failed


If you look at the login failed screenshot, the message is quite clear... password failed.

This could be a known issue with Ubuntu 16.04 and the xrdp pacakge shipped with this version. By default the login screen of xRDP is using an English Keyboard Layout.. So, if you try to type your password in the user box, you should be able to assess if the keyboard layout is set to what you expect to have...

Quick way to fix the keyboard layout is to execute the following commands

Step 1 : You go to the /etc/xrdp directory

Step 2 : you issue the command setxkbmap -layout <%your layout%> to define which keyboard map/layout to use

Step 3 : create a copy of the km-0409.ini file into the same directory. It seems that this is the default file used by xrdp to define the keyboard layout. You will need to use sudo in order to be able to write into the directory

Step 4 : Check that you have a backup of your file by typing the dir or ls command

Step 5 : update the file by issuing the following command sudo xrdp-genkeymap km-0409.ini

More information at http://c-nergy.be/blog/?p=8952

Another option if you are ready to take a small risk is to use a script that compile xrdp from source and allows you to access your Unity Desktop through Remote desktop connection

Please read info at http://c-nergy.be/blog/?p=11719

A new consolidated version of the xrdp installer script is being worked out at http://c-nergy.be/blog/?p=13873. This link provides just a preview.. When Ubuntu 19.10 will be released, a final version of this script would be made avaialable

Hope this help Till next time

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.