xRDP – How to Install on Lubuntu 16.10

 

Hello World, 

We are still looking into the new xRDP package available on the Ubuntu repository and the installation and configuration of this package on different Ubuntu flavors.  So far, we have tackled the following Ubuntu distribution : 

So far, we have noticed that the installation process is standard between these different Ubuntu version (except linux Mint) but small configuration changes,workarounds or tweaked connection procedures are needed in order to have the xRDP functionality available and working as expected. 

This post will be looking into the Lubuntu Operating System and we will see how easy it is to have xrdp installed on the system.

So, let’s move…..

Step by Step Process 

Assumptions

For this post, we have make some assumptions.

  • Lubuntu 16.10 (Final Release version) is used
  • Installation is performed on fresh new install
  • No Alternate Desktop interface is needed. We will connect directly to the Lubuntu Desktop
  • We will configure our system to match on localized version (i.e. we are using a Belgian french keyboard)
  • No additional configuration is needed to reconnect to the same session if you are using the latest version of the xrdp package found in the Ubuntu Repository
  • Your system is connected to Internet (so you can download necessary packages)

Step 1 – Install the xRDP package 

To perform the installation of xRDP package version 0.9.0,  you simply need to execute the following command inside a Terminal Console

sudo apt-get -y install xrdp 

Click on Picture for Better Resolution

When the password is prompted, enter your credentials and wait for completion.

To check which xrdp version has been installed, issue the following command

xrdp -v

The screenshot below shows you that indeed version 0.9.0 has been installed. 

Click on Picture for Better Resolution

 

Step 2 – Configuring xRDP to use your desktop environment

xRDP vers 0.9.0 tries to detect automatically your desktop environment.  However, when it comes to Lubuntu edition, the detection does not seem to work and when performing your remote session, you will get a gray screen only.  This means that we need to specify in the /etc/xrdp/startwm.sh file the desktop environment that need to be started.  

In the /etc/xrdp/startwm.sh, you will need to comment the last two lines and add at the bottom of the file, the following line 

lxsession -s Lubuntu -e LXDE

Click on Picture for Better Resolution

 

Step 3 – Configuring xRDP Keyboard 

This step is still necessary in order to have the proper keyboard layout defined within the remote session. By default, when performing an xRDP connection, the keyboard layout will be set to English US.   As a reminder, the xRDP login screen will be using by default (new with xrdp 0.9.0 package), the localized version of the keyboard layout. 

To try to set the proper keyboard layout within your remote session, you can execute the following commands (through a local connection and not when running through remote session)

# Set keyboard layout in xrdp sessions 
cd /etc/xrdp 
test=$(setxkbmap -query | awk -F":" '/layout/ {print $2}') 
echo "your current keyboard layout is.." $test
setxkbmap -layout $test 
sudo cp /etc/xrdp/km-0409.ini /etc/xrdp/km-0409.ini.bak 
sudo xrdp-genkeymap km-0409.ini

Step 4 – Test your configuration

To test you configuration, you simply needs to perform a remote desktop connection to your remote Linux Machine.  So, in the Remote Desktop client of your choice, you provide the ip address or hostname of the remote machine. You will be presented with the xRDP login. 

Ensure that the Sesman-xorgxrdp option is selected and proceed with your connection 

Click on Picture for Better Resolution

There is a great chance that you will be presented with your Lubuntu Desktop environment within your remote session.

Click on Picture for Better Resolution

 

Important Note 

At this stage, you would think that everything is ok and working as expected.  It’s time to perform the logout operation.  You click on the logout button and…..nothing happens within your remote session.  You would think that the functionality is broken.  Actually, it’s not the case…. 

We are having again a small catch with Lubuntu. The catch is similar to the one presented for Xubuntu systems.  If the user that make the remote connection is currently logged into the system (at the console), the remote session is not behaving as expected.  

If the user is logged on locally, and the user is connected through the remote session, the user will have access to the desktop interface. However, when the user clicks on the logout button, the power menu is not displayed on the remote session but it is displayed on the console…  

So, to avoid this situation (for the moment, we will investigate further to see other possible options), you need to ensure that the user that will perform the remote desktop session is not logged on on the machine locally. The same would be valid for a user logged in the remote session.  Ensure that the user logs out before trying to physically walk to the Lubuntu machine and login into it. 

Final Notes 

So far, we have seen that installing xRDP (version 0.9.0) is becoming something really easy. This version of xRDP provides a great addition which is the possibility to use drive redirection and clipboard feature.  This version also comes with its own server component which makes unnecessary the installation of any vnc server package.

On the other hand, for some distributions (Ubuntu,Xubuntu,Lubuntu), if a user is logged on into the computer and tries to connect via xRDP, the connection might be failing.  This could be true on the other direction.  If a user is logged into xRDP, then this user might not be able to login back to the physical machine and login loop would occur (see Xubuntu). 

So far, we didn’t look into this problem and possible workaround. We might come back with some solution or we might want to wait for Ubuntu 17.04 which might bring some more improvements at the xRDP level.  

In one of the next posts, we will proceed with this topic and have a look at xRDP and Ubuntu Gnome Edition 

Till next time 

See ya

 

8 thoughts on “xRDP – How to Install on Lubuntu 16.10

  1. thanks for this… works well, except for the xrdp keyboard, the layout reverts to US, while step 3 confirms it should be BE.

    any thoughts on this?

  2. @Tom;

    Check that in your xrdp session, you do not have two keyboard layout defined and that you inadvertently switch between them. If you are sure that your keyboard config is correct, still inside the xrdp session, use the keyboard layout control panel app to set the proper keyboard and this should fix the issue

    Till next time
    See ya

  3. An important note, at least in my case; you will have to fully logout of your existing session locally to login remotely. Otherwise you get the standard gray X background and no windowing environment.

  4. @Chad;

    Thank you for the visit and to take time to share your findings…. We hope that this info would be useful to anyone who might encounter the issue 🙂

    Till next time
    See ya

  5. Hello, thanks for all your tutorials, the have been so so helpful.
    Please is there a possible solution to the logout issue on the remote session?
    I installed Ubuntu server 16.04.3 LTS, with Lubuntu desktop and xrdp, with the help of your posts, i was able to get the setup running. I created multiple users who can log on remotely, but when they try to logout nothing happens.
    This is the last puzzle to be solved in my setup. Any clues will be most appreciated.

  6. @Oselo,

    You have to ensure that nobody is logged on in the Lubuntu machine (locally and not remotely). see the important note in the post..
    If nobody is logged in the console and this is still not working, you can try to create a shortcut on the user desktop and execute the following command

    ps -ef h | grep xorgxrdp | grep `whoami` | tr -s ” ” | cut -d ” ” -f2 | xargs kill -9

    Never test this command on lubuntu but works on ubuntu. give it a try and let us know if this is working
    Hope this help
    till next time
    See ya

  7. Hi Griffon,

    I was wondering what your opinion is on *the most-likely-to-work-well” method so far? Which linux distribution, desktop environment, version of xrdp, and install method works the best? Thanks.

  8. @Joey;

    I cannot answer this question… We are focusing on installing xRDP on Ubuntu and this is working quite well.. Actually, since xrdp ships with its own xrdpxrog backend component, the solution seems to work with most of the desktop environment. About the installation, this will also depend of the distribution. For example, Linux Mint still ships an old version of xrdp (ver 0.6.x) which does not provide all the features you might looking for. In this case, a custom installation might be more beneficial… On the other hand, Ubuntu or fedora ships with a more recent version. So in theory, you should be able to install the package from the distribution repository and have a working solution quite immediately….

    Hope this help
    Till next time
    See ya

Leave a Reply