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 

lubuntu1

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. 

lubuntu2

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

lubuntu3a

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 

xrdp_Remix_5

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.

lubuntu4

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

 

2 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

Leave a Reply