xRDP – Easy install xRDP on Ubuntu 16.04,18.04,19.10 & 20.04 (Script Version 1.2)

Hello World, 

As announced recently, we have been working hard to update and release the new version of our famous xrdp installation script (i.e. xrdp-installer-1.2.sh).  This script replaces all previous versions and is mainly adding support for Ubuntu 20.04.   Some minor issues have been detected in the previous version (i.e. version 1.1) and the latest version is tackling and fixing these really minor bugs.

So, let’s go ! 

Overview

The xrdp-installer-1.2.sh script ease the installation and post-configuration actions of xRDP on top of Ubuntu Operating System.  This version is the latest iteration of the script which include support for Ubuntu 20.04 (recently released in April 2020).  Some minor issues have been fixed as well and have been included in this release.   Since its initial release, the script has reached a mature status and is becoming more and more stable. 

Script version & Supported Ubuntu Version

The script version will be set to 1.2. The xrdp-installer-1.2.sh script will support the following Ubuntu operating system version 

  • Ubuntu 16.04.x 
  • Ubuntu 18.04.x
  • Ubuntu 19.10 (End of Support in July 2020)
  • Ubuntu 20.04

Prerequisites and assumptions  

The following conditions should be met in order to have the best results while using the script

  • We assume that your machine is connected to internet while performing the installation.  This is needed as additional packages and software needs to be downloaded and installed on your Ubuntu machine
  • The script runs against a supported Operating system (Ubuntu 16.04.x, Ubuntu 18.04.x,Ubuntu 19.10, Ubuntu 20.04)
  • The Official Ubuntu distribution needs to be used (we do not support other Ubuntu flavors – so far !!) 
  • No additional Desktop interface is used ( xRDP session will be showing Ubuntu Gnome Desktop with the Dock menu or Unity if running Ubuntu 16.04)
  • Sound functionality is present on the computers if you sound feature is available as well

What’s new in this release ?

As mentioned, the script has not changed much and only a few minor bugs have been fixed which are listed hereafter

  • Adding support to Ubuntu 20.04
  • Removing support for Ubuntu 19.04 (end of support)
  • Stricter check for hwe package (thanks to Andrej Gantvorg)
  • Changed code in the custom login screen function in order to know where to copy the custom logo image
  • Fixing a bug in checking SSL group membership
  • Updating background color code for the custom xrdp login screen
  • Updating versions when using the checkinstall command and the build process
  • Updating code for Sound redirection (in order to have it working on Ubuntu 16.04.x )

A downloadable version of the script is available at the bottom of the post

How to Use the Script

The xrdp-installer-1.2 script will work in a similar way as the previous versions. First, you will need to download the latest version of the script (here). After extracting it from the zip file, we will need to set the execute permission on the script.  Then, you will need to choose between standard and custom installation.  Finally, you would need to decide if additional options would be enabled or not…   So, let’s see how this would be working…. 

Disclaimer

The script is provided AS IS.  Use it at your own risk !!! 

Step 1 – Set Execute Right on the script

Download the xrdp-installer-1.2.sh script to your system, extract content and mark it as executable . To do this, perform the following action in a terminal console

chmod +x  ~/Downloads/xrdp-installer-1.2.sh

Note : Adjust the path where the xrdp-Installer-1.2.sh script to reflect your environment

Step 2 – Run as normal user 

The script needs to be run as a normal user.  The script will start running and will prompt you for password when sudo actions are initiated.  If you run the script as root or using sudo command, the Download folder does not exist for the root user and the script fails to run as expected.   To overcome this situation, the script also check which user is executing the script. If the script is run under sudo or root accounts, a warning message will be displayed and the script will not execute

Step 3 – Switches and parameters 

The xrdp-installer-1.2.sh script can be executed as is (with no parameters or switches). This will perform a standard (and basic) installation of xRDP.  No sound or custom xrdp login script will be made available.  However, remote desktop, drive redirection and clipboard redirection would be available with this installation mode.  

The xrdp-installer-1.2.sh script accept also some additional parameters that will help customize the xrdp installation and enable additional features.  The script provides the following parameters 

--help or -h          => will display a basic help menu
--sound or -s         => will enable sound redirection 
--loginscreen or -l   => will customize the xRDP login screen 
--remove or -r        => will remove the xrdp package 
--custom or -c        => will perform a custom installation (i.e. compiled from sources)

Step 4 – Perform xRDP installation using the script 

The following sections will provide some examples and scenario on how you can use the script….. 

Standard Installation – No Parameter

As mentioned above, you can decide to use the default xrdp package available in the Ubuntu repository and perform a basic installation which will provide you remote desktop capability and will also customize the remote sesssion.  The script will ensure that the same look n’ feel will be maintained when the user logs on locally or remotely. 

To perform a standard installation, you execute the script with no parameters.  Open a Terminal console, browse to the location where the script has been downloaded and issue the following command 

 ./xrdp-installer-1.2.sh

When the xrdp installation package will start, you be requested to enter your password. Provide the password and proceed with the installation. Wait for completion of the script.  The machine will not reboot automatically when done so you can review the actions performed by the script….

Important Notes

If you are running the script on Ubuntu 16.04.x, the custom installation will always be performed even if you have not specified any parameters.  This is because Ubuntu 16.04.x ships with a really old xrdp package (version 0.6) and does not provides all needed features. The custom installation provide drive redirection,clipboard and access to Unity Desktop

Standard Installation with Parameters

The script can be used to perform a standard installation and still passes some parameters to get the most of the xRDP packages and their features.  For all the Ubuntu versions, we could use the following combination of parameters 

./xrdp-installer-1.2.sh -s      (this would enable the sound redirection) 
./xrdp-installer-1.2.sh -l      (this would customize the xrdp login screen -see here)

Obviously, you can combine the switches (any order) to have more features enabled  

./xrdp-installer-1.2.sh -s -l      (this would enable the sound redirection and customize the xrdp login screen)

Important Notes

The script can be run multiple times on the same machine.  If you have run initially the script with no parameters but you decide afterward to enable additional features, the script can be re-executed and the additional features will be enabled.  

Custom Installation – Default Installation 

Custom installation script is really flexible and help avoiding issues like we have encountered in Ubuntu 18.04.x (see here,here and here).  Custom installation means that the script will compile the xrdp package from the source binaries. The custom installation script always uses the latest xrdp package version available 

To perform a custom installation, you will need at minimum to pass one parameter.  The following command line shows you how to perform a custom installation  

./xrdp-installer-1.2.sh -c     (this would perform a custom installation but will not enabled adv features like sound redirection or custom login screen)

Important Notes

If you are running the script on Ubuntu 16.04.x, the -c switch will be ignored and a custom installation process will be performed. This is because Ubuntu 16.04.x ships with a really old xrdp package (version 0.6) and does not provides all needed features. The custom installation provide drive redirection,clipboard and access to Unity Desktop

Custom Installation – Additional Options  

If a user wants to enable additional features, you will pass some additional parameters as shown in the following examples 

./xrdp-installer-1.2.sh -c -s     (this would perform a custom install and enable sound redirection)
./xrdp-installer-1.2.sh -c -l     (this would perform a custom install and customize xrdp login screen)
./xrdp-installer-1.2.sh -c -l -s  (this would perform a custom install, enable sound and customize login screen)

Important Notes

The script can be run multiple times on the same machine.  If you have run initially the script with no parameters but you decide afterward to enable additional features, the script can be re-executed and the additional features will be enabled.  

Remove Installation option

This version of the script also ship with the option to remove xRDP package.  The removal option should be only used  if you have uses this version of this script to perform the installation.  To remove the xrdp package, you would simply execute the following command  

./xrdp-installer-1.2.sh -r     (to remove the xrdp packages)

Step 5 – Test your configuration 

After the script has run and after the reboot/shutdown and start process, it’s time to test and see if you can indeed perform a smooth remote connection to your Ubuntu machine.  Remember that a user can either be logged on locally or logged on remotely on the machine when working with xRDP solution.  If the user, performing the remote connection, is logged into the system locally the remote connection will start but will be terminated immediately.  This is the way it works nowadays. 

So, ensure that the user performing the test is not locally logged on, start your favorite remote desktop client and perform your connection.  Based on your options, you will be presented either with the green xrdp login screen or with the custom login screen (purple background). Simply enter your credentials and start testing your installation.  If everything is ok, you will see a similar Desktop interface where Gnome Desktop is used and the Dock is visible. 

Known issues and limitations 

Known Issues 

Sound redirection Issue

If the Sound redirection option has been selected, rebooting the Ubuntu system is not enough and the sound redirection might not work.  if the sound redirection option has been selected, you will have to shutdown your Ubuntu machine and then start it again in order to ensure that the sound redirection feature would work as expected. 

Sound redirection is not working as expected on Ubuntu 19.10 and Ubuntu 20.04.  The modules are created and copied to the correct location. However, the xrdp sink modules are never loaded in the remote session or randomly loaded in the remote session.   To fix this, you simply need to execute the following command within your remote session and the sound will start working 

pulseaudio -k

For detailed information, see post below

xRDP – Sound not always working on Ubuntu 19.10 – Quick Fix

Drive Redirection  

To redirect your drives to your xrdp remote session, you have to ensure that the only option selected in the local resources tab are the Clipboard option and the drive option. Check the screenshot below and ensure that you have the same settings.

xrdp_redir_4

Click on picture for better resolution

xrdp_redir_5

Click on picture for better resolution

When these settings have been set accordingly, you should see the thin client folder populated with redirected drives coming from your Windows machine.

Limitations

One session per user limitation

Only one session is allowed per user.  This means that if a user is logged on locally on the Ubuntu machine, the user will not be able to perform a remote session (the xRDP connection will initiate but will end up immediately).  If a user is logged on remotely on the system, it will not be able to login locally (if the user tries to login locally, the login screen will loop and the login screen will be presented again to the user) 

Switch between standard and Custom install

This version of the script can be run multiple times on the same machine.  However, because of this new behavior, you cannot perform a standard installation and then decide to perform the custom installation.  Once you have selected your installation mode, you will have to stick to it.  This is kind of checked by the script.  

So, if you have performed a standard installation but afterwards you might want to use the custom installation option, the script will ignore the request.  If you want to move from standard install mode to custom mode (or vice versa), the correct process is 

  • remove xrdp (using the xrdp-installer-1.2.sh -r option) 
  • perform a new installation using your selected installation mode (standard or custom install mode) 

Download the Script 

The script can be download at this location  :    xrdp-installer-1.2.zip 

Note : All the xrdp scripts can be found at https://www.c-nergy.be/products.html

Final Notes

This is it for this post ! 

Please if you have time or want to help us in creating the best xrdp installer script, download the script and provide constructive feedback.  If you find a bug or an issue with the script, let us know as well so we can try to fix it.    We will probably post additional information about the script, Ubuntu 20.04 and xRDP in the coming weeks…

Stay tuned

Till next time 

See ya

13 thoughts on “xRDP – Easy install xRDP on Ubuntu 16.04,18.04,19.10 & 20.04 (Script Version 1.2)

  1. Hi – Many thanks for the script. Do you think this would work on lubuntu 20.04 running the LXQT desktop manager?

    Many thanks

  2. I’ve been using your script for years to get xrdp running smoothly on Ubuntu. It’s always worked very well, but I recently migrated from VirtualBox to Parallels (host is macOS). I’ve found that installing Parallels Tools breaks xrdp support in Ubuntu. Someone else mentioned this on a previous blog post (http://c-nergy.be/blog/?p=13933#comment-4220), but there was no resolution.

    Is there any way to examine what’s happening that’s causing the issue? I’m afraid the issue is beyond my technical capabilities, but I would be more than happy to send logs, do tests etc if that would help to identify the problem.

    Many thanks for any help you can provide!

  3. @Chris,

    The script is originally designed to run only on Ubuntu 20.04 and no other flavors…
    So, in theory, running the script AS IS might work or not… The script would need to be tweaked a little bit in order to run properly on Lubuntu 20.04 and LXQT
    We are planning to cover more distributions with the script but we would need a little bit time and select which flavor could be added

    If time permit, we could perform a quick test on Lubuntu 20.04 and possibly provide you feedback…..

    Hope this help
    Till next time

  4. @Jason,

    We are not working a lot with MacOs….We would need to have a look into this and we would need to setup a lab infra…..
    It should be working as we found a thread on xRDP Github repository (https://github.com/neutrinolabs/xrdp/issues/439)
    Have you tried to play with the color depth, disable audio…. -> is this changing something….

    which version of MacOs are you running ? We will first do some tests here and then we will come back to you….So we can try to test and validate together a possible working configuration…
    BTW, The problem does not seems to be xrdp per se but more a parallel issue..
    No guarantee of a working solution…

    Hope this help
    Till next time

  5. @Griffon,

    Thanks for the reply. Host OS is macOS 10.5.4 running Parallels 15.1.4.

    I’ve tried multiple settings when trying to connect over RDP (resolution, colour depth, disabling audio/clipboard/folder redirect, etc), and there is no change. When connecting, I get the login screen but then nothing. After a few minutes it gives a message saying ‘some problem’.

    It’s definitely an issue with Parallels Tools. If I uninstall the tools, RDP works again. Though this isn’t a solution since they are needed for host integration.

    Here is the xrdp-sesman.log:
    [20200514-16:27:43] [INFO ] A connection received from ::1 port 45140
    [20200514-16:27:43] [INFO ] ++ created session (access granted): username jhecker, ip ::ffff:192.168.1.20:58068 – socket: 12
    [20200514-16:27:43] [INFO ] starting Xorg session…
    [20200514-16:27:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
    [20200514-16:27:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6010)
    [20200514-16:27:43] [DEBUG] Closed socket 9 (AF_INET6 :: port 6210)
    [20200514-16:27:43] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
    [20200514-16:27:43] [INFO ] calling auth_start_session from pid 13695
    [20200514-16:27:43] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
    [20200514-16:27:43] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
    [20200514-16:27:43] [INFO ] /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
    [20200514-16:27:53] [ERROR] X server for display 10 startup timeout
    [20200514-16:27:53] [CORE ] waiting for window manager (pid 13708) to exit
    [20200514-16:27:53] [ERROR] X server for display 10 startup timeout
    [20200514-16:27:53] [ERROR] another Xserver might already be active on display 10 – see log
    [20200514-16:27:53] [DEBUG] aborting connection…
    [20200514-16:27:53] [CORE ] window manager (pid 13708) did exit, cleaning up session
    [20200514-16:27:53] [INFO ] calling auth_stop_session and auth_end from pid 13695
    [20200514-16:27:53] [DEBUG] cleanup_sockets:
    [20200514-16:27:53] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdp_chansrv_socket_10
    [20200514-16:27:53] [DEBUG] cleanup_sockets: deleting /var/run/xrdp/sockdir/xrdpapi_10
    [20200514-16:27:53] [DEBUG] cleanup_sockets: failed to delete /var/run/xrdp/sockdir/xrdpapi_10
    [20200514-16:27:53] [INFO ] ++ terminated session: username jhecker, display :10.0, session_pid 13695, ip ::ffff:192.168.1.20:58068 – socket: 12

    And here is the xrdp.log:
    [20200514-16:27:43] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.20 port 58067
    [20200514-16:27:43] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.23 port 3389)
    [20200514-16:27:43] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
    [20200514-16:27:43] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
    [20200514-16:27:43] [ERROR] Cannot read certificate file /etc/xrdp/cert.pem: No such file or directory
    [20200514-16:27:43] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
    [20200514-16:27:43] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
    [20200514-16:27:43] [DEBUG] TLSv1.2 enabled
    [20200514-16:27:43] [DEBUG] TLSv1.1 enabled
    [20200514-16:27:43] [DEBUG] TLSv1 enabled
    [20200514-16:27:43] [DEBUG] Security layer: requested 11, selected 0
    [20200514-16:27:43] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.23 port 3389)
    [20200514-16:27:43] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.20 port 58068
    [20200514-16:27:43] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.23 port 3389)
    [20200514-16:27:43] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
    [20200514-16:27:43] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
    [20200514-16:27:43] [ERROR] Cannot read certificate file /etc/xrdp/cert.pem: No such file or directory
    [20200514-16:27:43] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
    [20200514-16:27:43] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
    [20200514-16:27:43] [DEBUG] TLSv1.2 enabled
    [20200514-16:27:43] [DEBUG] TLSv1.1 enabled
    [20200514-16:27:43] [DEBUG] TLSv1 enabled
    [20200514-16:27:43] [DEBUG] Security layer: requested 0, selected 0
    [20200514-16:27:43] [INFO ] connected client computer name: mini-3
    [20200514-16:27:43] [INFO ] Non-TLS connection established from ::ffff:192.168.1.20 port 58068: encrypted with standard RDP security
    [20200514-16:27:43] [DEBUG] xrdp_0000357b_wm_login_mode_event_00000001
    [20200514-16:27:43] [INFO ] Loading keymap file /etc/xrdp/km-00000809.ini
    [20200514-16:27:43] [WARN ] local keymap file for 0x00000809 found and doesn’t match built in keymap, using local keymap file
    [20200514-16:27:43] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
    [20200514-16:27:43] [INFO ] xrdp_wm_log_msg: sesman connect ok
    [20200514-16:27:43] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
    [20200514-16:27:43] [DEBUG] return value from xrdp_mm_connect 0
    [20200514-16:27:43] [INFO ] xrdp_wm_log_msg: login successful for display 10
    [20200514-16:27:43] [DEBUG] xrdp_wm_log_msg: started connecting
    [20200514-16:27:47] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:27:50] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:27:54] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:27:57] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:01] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:04] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:08] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:11] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:15] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:18] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:22] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:25] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:29] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:32] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:36] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:39] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:43] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:46] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:50] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:53] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:28:57] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:00] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:04] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:07] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:11] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:14] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:18] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:21] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:25] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:28] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:32] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:35] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:39] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:42] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:46] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:49] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:53] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:29:57] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:00] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:04] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:07] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:11] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:14] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:18] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:21] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:25] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:28] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:32] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:35] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:39] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:42] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:46] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:49] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:53] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:30:56] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:31:00] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:31:03] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:31:07] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:31:10] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:31:13] [DEBUG] xrdp_wm_log_msg: connection problem, giving up
    [20200514-16:31:13] [DEBUG] Closed socket 17 (AF_UNIX)
    [20200514-16:31:13] [DEBUG] xrdp_wm_log_msg: some problem
    [20200514-16:31:13] [DEBUG] xrdp_mm_module_cleanup
    [20200514-16:31:13] [DEBUG] Closed socket 16 (AF_INET6 ::1 port 45140)
    [20200514-16:31:29] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.23 port 3389)
    [20200514-16:31:29] [DEBUG] xrdp_mm_module_cleanup

  6. Thanks very much for script. I tried it after trying other manual methods. But I still have the same error, from the remote desktop client, I am trying to log in and I get the green screen for at least a meeting with an error code at the end “Giving UP” error. In the log I get the following:

    May 18 13:05:07 AlphaX xrdp[12786]: (12786)(140511675082560)[WARN ] local keymap file for 0x00000809 found and doesn’t match built in keymap, using local keymap file
    May 18 13:05:31 AlphaX xrdp[12786]: (12786)(140511675082560)[DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
    May 18 13:05:31 AlphaX xrdp[12786]: (12786)(140511675082560)[INFO ] xrdp_wm_log_msg: sesman connect ok
    May 18 13:05:31 AlphaX xrdp[12786]: (12786)(140511675082560)[DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
    May 18 13:05:31 AlphaX xrdp[12786]: (12786)(140511675082560)[DEBUG] return value from xrdp_mm_connect 0
    May 18 13:05:31 AlphaX xrdp[12786]: (12786)(140511675082560)[INFO ] xrdp_wm_log_msg: login successful for display 10
    May 18 13:05:31 AlphaX xrdp[12786]: (12786)(140511675082560)[DEBUG] xrdp_wm_log_msg: started connecting
    May 18 13:05:35 AlphaX xrdp[12786]: (12786)(140511675082560)[DEBUG] Closed socket 21 (AF_UNIX)
    May 18 13:05:38 AlphaX xrdp[12786]: (12786)(140511675082560)[DEBUG] Closed socket 21 (AF_UNIX)
    May 18 13:05:42 AlphaX xrdp[12786]: (12786)(140511675082560)[DEBUG] Closed socket 21 (AF_UNIX)

  7. @Uzi,
    Which version of Ubuntu are you running ? 18.04, 20.04 ?
    The green screen can be because of multiple reasons…..
    Can you check that the /etc/X11/Xwrapper.config has the following line set allowed_users=anybody (and should be replacing allowed_users=console)
    Ensure that the xorgxrdp package is correctly installed (try to install it manually sudo apt-get install xorgxrdp)
    If possible, try also to perform a clean install (as you have apparently performed multiple manual install)

    Hope this help
    Till next time
    See ya

  8. On ubuntu 20.04, keyboard layout switching stops working if you shut down rdp without ending the user session. That is, when you first connect, switching layouts works, close the rdp window, connect again, and that’s it, the input only works in one language. Switching the layout with the mouse does not help. If you end the session and reconnect via rdp, you can switch the keyboard layout again. But this is inconvenient((

  9. @Michael,

    Thank you for the visit and for sharing the information….. We have encountered this issue as well and we have not found or got time to look into an acceptable solution…..
    We will see if we can try to improve this

    Till next time
    See ya

  10. Thanks for the nice script. i’ve been using it since 16.04.
    I’m am aware, that the same login cannot login on console and remote.
    I encoutered a slightly different problem:
    After boot, the first user is always able to login. Every following user only get a black screen. No matter if the first is still logged in or not. The first user can after failed login attempt of the other users login without problem.
    Any suggestions how to debug?

  11. @Andres,

    Hmmm…. this is an interesting issue…Never had that before 🙂
    So, Some questions first

    > Which Version of Ubuntu are you running 16.xx/18.xx/20.xx ?
    > Standard or Custom Installation Option used ?

    To get more info, you should check on your ubuntu machine the following location to see if we can narrow down the problem
    > /var/log/xrdp.log
    > /var/log/xrdp-sesman.log

    Then, log in locally with one of the user having the problem and look for these logs in the user profile
    > ~/.xsession-errors
    > ~/.xorgxrdp.log

    Check that the ~/.xsessionrc file exists and it’s populated
    Check also the /etc/xrdp/sesman.in [Security] Section and check that the settings are set accordingly

    Hope this can help
    Till next time
    See ya

  12. I use Ubuntu 20.04 .
    After apt purge xrdp xorgxrdp and -r your script and reinstall with your script everything works fine.
    The black screen came from the screensaver. The problem was that after login the keyboard and mouse were blocked and therefore no chance. From 10 servers i installed about three had this issue from blocking keyboard and mouse after login, even on the console, only entering tty worked. There are differences if you install first ubuntu-server and then ubuntu-desktop or the other way round.
    Thanks again for helping to use xrdp on ubuntu.
    Andres

Leave a Reply