Ubuntu 18.04 – Detected issues with xRDP on Ubuntu 18.04

Hello World, 

If you are following us since a long time, you would have noticed that this year, we are focusing a little bit more on xRDP and Ubuntu 18.04.   We have been working hard to make the installation of xRDP package painless while providing a better user experience through all the recent modifications integrated in our latest version of our famous installation script (see this post for more information)

The recent posts about xRDP are tackling minor issues that have been around for so long that nobody was trying to fix.  We have tried to improve the user experience and have shared our findings in the following recent posts….

 

Ubuntu and xRDP usability has improved drastically since Canonical has upgraded the xRDP package from  0.6.x to 0.9.x. However, there are time to time still some small issues or annoyances that are popping up…. This post will describe some of them

So, Let’s go 

xRDP & Ubuntu Gnome 18.04

The following section will describe some known issues or limitations of xRDP but also some new one detected recently on the latest version of Ubuntu (18.04 LTS)

Single Session (Local or remote – not both !!!) 

This is the most common complain about xRDP.  Like in previous implementations, a single user can connect either to remote session or to the console session.  If a user is logged physically on the machine (locally), the remote session connection will not work and the login process will loop through.  As soon as the user logs out from the local session, the xRDP remote session is initiated and can be processed.  There is also no way to connect to the console session through the xRDP software.  It’s always a new display that is used….

It used to be possible to have the same user connected locally and remotely (even do the session where not the same).  This capability has been removed from some time now and we do not why and if it’s possible to implement this feature back (we have not checked that yet). 

As a possible workaround for this limitation, it would be possible to configure the system with vnc service that start at boot time and use the xrdp solution to connect directly to the vnc console (and not the rdp session).   So far, we have not been looking into this issue because so far nobody really complained. The xRDP software is basically providing remote desktop services to remote users that will basically never connect locally on the machine, always remotely… 

Reconnect to the same session 

Reconnect to the same Session

Like in previous versions,  as long as the user is connected through a single connection (so remote connection and no local connection), it’s possible to reconnect to an existing session as long as the session is active on the server.   This is important to know. If you disconnect from your remote session, you will only be able to use remote session to connect to your existing session.  If you need to access the local machine and your session is still running, you will not be able to access it.  So, it’s really important to decide if you disconnect from your session or if you logout from the remote session.  Our recommendation would be to logout if there is a small chance that you might need to login locally on the system.  

Installing Applications issues

Installing Standard Applications 

We have encountered another issue while connected remotely to Ubuntu machine.  The software center is sometime unusable within your remote session… We have tried to install standard applications and snaps applications through the Software Center.  In both cases, we have encountered a small issue.  While trying to install a normal software package, there is a message displayed mentioning that no permissions are available to perform the installation

Click on picture for better resolution

Installing Snaps Applications 

When trying to install a snap application within xrdp session,  a popup shows up and request for user name that can access the snap store… This is quite unusual.

Click on picture for better resolution

Workaround

The only workaround available (i.e. quite straight forward) so far is to perform installation of software through command line. When we have used the command line, no error message or registration account popup appeared.  We have been able to install software within xRDP session through command line… Again, to be clear, this will or might not happen with all software you will try to install.  Some software installation from Software center were running fine…..   

Drive Redirection Failure

This is a random issue that have been mentioned by some of our readers.  This happens when a user reconnect to a disconnected session and tries to open redirected drives from the xrdp session.  At the first time connection, the feature seems to work fine. Subsequent connections will end up ultimately with an error (see screenshot below) 

Click on picture for better resolution

We have not encountered this issue yet.  When this issue was showing up, a quick check was done in order to ensure that rdp client settings were setting accordingly.  To fix the issue, the easiest would be to unmount the fuse redirected drives, logoff and login again…. 

Crash Popup (Fixed in Std-Install-Xrdp-0.2.sh and later)

If you have been using the Std-Install-Xrdp-0.2.sh script or later version (see this post for getting the script and explanations), this problem should have been resolved for you and you should not see any crash popup on your system anymore.  If you have not used the Version 0.2 (or later) of the script, you might see this crash dialog showing up when login into your remote session (and side effect, this popup will also start to popup in the local sessions. 

Click on picture for better resolution

Till recently, we had no time to look into the issue and we didn’t invest much time because it was not preventing people to work… Annoying element but not a blocking factor. However, with the arrival of Ubuntu 18.04, we spent some time in debugging this issue and finally found the causes behind this behavior (see this post for more details).

By looking into the /var/crash directory, we can see that the crash report is indeed related to the polkit component of the system (i.e. dump report related to polkit)

Click on picture for better resolution

The problem occurs when you create the /etc/polkit-1/localauthority.d.conf/02-allow-color.d.conf authorization rule file.  For many years, the default solution to get rid of the infamous authentication required to create managed device login popup was to populate this file with code using specific syntax.  This file would remove the Authentication required popup but generated the crash popup. 

After some investigations (see this post), we found out that the syntax used in this file was not supported (or not totally supported) in Ubuntu edition.  A new file with the proper format and syntax is generated by the Std-Install-Xrdp-0.2.sh script.  When this new polkit file is in place, it removes the Authentication required popup annoyance but also get rid of the crash popup….

Small look’n feel issues 

Based on the way the installation of xrdp has been performed, there will be an obvious discrepancy between local connection look’n feel and the remote session look’n feel.  If a manual installation has been performed, no Dock, no Ubuntu Indicator Apps will be displayed and the theme used will be different from the one used by default on Ubuntu systems (i.e. Ambiance Theme). 

The latest version (Std-Install-Xrdp-0.4.sh) of the standard installation script fixes all these minor issues and fixes them for all users that would connect remotely to the system.

Let’s have a quick look at each of the annoyance….

Remote session broken Theme and Icons (Fixed in Std-Install-Xrdp-0.3.sh and later)

If you have performed a manual installation of xrdp or used the script version 0.2 (Std-Install-Xrdp-0.2.sh)the first time you connect through remote desktop, you will notice some difference in the desktop look’n feel (the icons in the Dash are not similar to the one you would see when locally connected to Ubuntu) 

Click on picture for better resolution

When opening Nautilus in a remote session, you can see immediately the difference.  The icon set are all the same (white icons) and the decoration of windows is gray not brown like in the standard Ubuntu theme.

Click on picture for better resolution

Finally, if you open Terminal, you will see also a non standard white background. The standard color should be purple 

Click on picture for better resolution

 

To fix this issue, the easy way would be to run the installation script version 0.3. You can find extensive information about how to use Std-Install-Xrdp-0.3.sh by reading the following post 

If you have been running a previous version of the script (version 0.2 or older), you can still try to fix the theming issues by following the instructions provided in the following post 

So, at this stage, the Theme topic should not be considered as an issue anymore as newer version of the script take that into account (and for all users connecting to the system)

Remote session different GDM login page (Fixed in Std-Install-Xrdp-0.4.sh and later )

The screenshot below provides the perfect description of the problem.  When a user lock the workstation locally, the lock screen would be purple.  If the user perform the same action in a remote session, the lock screen is gray. Some people would be fine with this small visual difference. However, some customers really wanted to provide the same look and feel experience to their users.

Click on picture for better resolution

It took us some time to come up with an elegant solution that could be integrated into our installation script.  This issue should be considered fixed (so far) as the latest version of the script offer the option to fix the GDM Theming.  Please read instructions about the script as the GDM fixing part is optional and parameters needs to be supplied 

This topic should not be considered an issue anymore. However, based on some rumors about changes in the GDM login page layout, the approach used nowadays might not be applicable in the future and new approach would be needed…. 

Final Notes

This is it for this post ! 

Now, you should know how to easily install xrdp on Ubuntu 18.04 (with Gnome Desktop interface) and you should be aware of some of the limitations that come with the usage of xRDP.  Some long recurring issues have been recently solved (i.e. Crash Popup,Theme Issues, GDM lock Screen discrepancy) and have been integrated in our famous Std-Install-Xrdp-0.4.sh script. All in all, we can see progress and better user experience with Ubuntu 18.04 and xRDP remote software solution 

Hope you enjoyed this updated post 

Till next time 

See ya

 

7 thoughts on “Ubuntu 18.04 – Detected issues with xRDP on Ubuntu 18.04

  1. The v.04 script installed completely, rebooted system, but RDP is not working. The remote desktop window immediately closes after you enter your user/pass into RDP.

  2. @Russel,
    Have you performed the standard installation or the advanced instalaltion (–fixGDM parameters) ? This error usually occur if the user trying to remote in is also logged into the machine locally. Is this the case ?
    Can you check that the xrdp service is running and no errors detected
    Can you have a look at the /var/log/xrdp* files and see if you get any errors over there as well -> do we see some errors over there
    Can you create a new user on your system and try to login into it
    Can you check your firewall settings (on the same lan, firewall should not be blocking your connection – other networks, worth checking

    Hope this help
    Till next time

  3. Hey Griffon, thanks for your blogs. They are super helpful. I used your 0.4 script for Ubuntu Mate and it is possible to connect with Remotedesktop, but I am having one problem. I am not able to change my network settings or do any sudo commands through Remotedesktop. I get the following message:
    no polkit authorization to perform the action
    I am not sure what to do about that one. Do you have an idea?

  4. @Jacek,

    Are you doing all the operations through a GUI interface ? have you tried to perform the changes through command line only ? This could be a normal behavior as Ubuntu is using the Polkit framework which might restrict certain actions if connected through remote desktop solution…. For more information about that, you should read the info founded in this blog post (http://c-nergy.be/blog/?p=12073). You can try to create exceptions or disable the polkit policy for the actions you want to perform

    Hope this help
    till next time
    See ya

  5. I was able to get local and remote logins to work! However I have to use mate as alternative desktop for the remote logins. Here is what I did.

    Using your Std-Xrdp-Install-0.4.sh as a base I did the following:

    #Step 1 from script
    sudo apt install xrdp -y

    #Step 2 from script
    sudo apt install gnome-tweak-tool -y

    #Step 3 from script
    sudo sed -i ‘s/allowed_users=console/allowed_users=anybody/’ /etc/X11/Xwrapper.config

    #Step 4 from script
    sudo bash -c “cat >/etc/polkit-1/localauthority/50-local.d/45-allow.colord.pkla” < ~/.xsession
    XDG_DATA_DIRS=/usr/share/mate:/usr/share/mate:/usr/local/share
    XDG_DATA_DIRS=${XDG_DATA_DIRS}:/usr/share:/var/lib/snapd/desktop
    cat < ~/.xsessionrc
    export XDG_SESSION_DESKTOP=mate
    export XDG_DATA_DIRS=${XDG_DATA_DIRS}
    export XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg
    EOF

    #modified first line of .xsession file to the following
    #based on solution suggested at this website:
    # https://askubuntu.com/questions/1042337/are-there-18-04-lts-new-limits-on-number-of-xsessions-and-xrdp
    env -u SESSION_MANAGER -u DBUS_SESSION_BUS_ADDRESS mate-session

    #then enabled xrdp and restarted it
    sudo systemctl enable xrdp
    sudo systemctl restart xrdp

    #You should now be able to login with same user that is also locally logged in. Enjoy!

  6. @Todd,

    Thank you for sharing this tip but again in a perfect world this should be working while using the same identical desktop environment (i.e. Gnome Desktop). We knew that using different desktop environment could provide local and remote logins. What we really want to know it’s if it’s possible to have local and remote session running at the same time for the same desktop environment….

    Thank for the visit and for sharing your findings….

    Till next time
    See ya

  7. @Griffon

    I tried modifying my .xsessionrc to this:
    export GNOME_SHELL_SESSION_MODE=ubuntu
    export XDG_CURRENT_DESKTOP=ubuntu:GNOME
    export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
    export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg

    and my .xsession to this:
    env -u SESSION_MANAGER -u DBUS_SESSION_BUS_ADDRESS gnome-session

    but it didn’t work. I’ll let you know if I ever get it to work. I agree it is a shame that remote desktop environment can’t be the same as the local.

Leave a Reply