xRDP – Easy install xRDP on Ubuntu 16.04,18.04,20.04,20.10 (Script Version 1.2.1)

Hello World, 

As announced recently, we have been working on updating our famous xrdp installation script.  This consist of a minor update as we simply including support for the latest released version of Ubuntu i.e. Ubuntu 20.10.  We had no time to perform really extensive testing but as far as we have seen this new release is not changing dramatically the xRDP behavior on the latest version of Ubuntu. 

The new version of our famous xrdp installation script will be set to 1.2.1 (i.e. xrdp-installer-1.2.1.sh).  This script replaces all previous versions and is mainly adding support for Ubuntu 20.10.  

So, let’s go ! 

Overview

The xrdp-installer-1.2.1.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.10 (recently released in October 2020). 

Script version & Supported Ubuntu Version

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

  • Ubuntu 16.04.x 
  • Ubuntu 18.04.x
  • Ubuntu 20.04.x
  • Ubuntu 20.10

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 20.04)
  • The Official Ubuntu distribution needs to be used (we do not support other Ubuntu flavors so far  !! – this might change in the future ) 
  • 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 changes have been introduced

  • Adding support to Ubuntu 20.10
  • Removing support for Ubuntu 19.10 (end of support July 2020)

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

How to Use the Script

The xrdp-installer-1.2.1 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.1.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.1.sh

Note : Adjust the path where the xrdp-Installer-1.2.1.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.1sh 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.1.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.1.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.1.sh -s      (this would enable the sound redirection) 
./xrdp-installer-1.2.1.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.1.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. 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.1.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.1.sh -c -s     (this would perform a custom install and enable sound redirection)
./xrdp-installer-1.2.1.sh -c -l     (this would perform a custom install and customize xrdp login screen)
./xrdp-installer-1.2.1.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.1.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 later  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

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.1.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.1.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, test it 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. 

Stay tuned

Till next time 

See ya

 

 

46 thoughts on “xRDP – Easy install xRDP on Ubuntu 16.04,18.04,20.04,20.10 (Script Version 1.2.1)

  1. Spent the whole day to get it work and just found your blog which helped me a lot. It went smoothly!

    Thank you!

  2. Hello,

    Just information.

    In case of custom xrdp install, cert.pem and key.pem are generated and in /etc/xrdp.
    The expiration period of the cert.pem/key.pem are just one year. Therefore, warning is showed when try to connect the xrdp server, when a year has passed after installation.
    I checked normal install case. cert.pem/key.pem in /etc/xrdp are as follows.
    cert.pem -> /etc/ssl/certs/ssl-cert-snakeoil.pem
    key.pem -> /etc/ssl/private/ssl-cert-snakeoil.key

    One more little thing.
    It might be better to replace “./xrdp-installer-1.0.sh” with “$0” at line 555, 556 and 557 in xrdp-installer-1.2.1.sh.

  3. @vcsabbi,

    Thanks for the feedback and for visiting our blog. Happy to see that our script can be useful out there 🙂

    Till next time
    See ya

  4. @Hiero,

    Thanks for sharing your findings and the feedback… We will try to update the script as well as you have a point there 🙂
    We are quite busy given the current situation and because of end of the year activities…. Will try to do that asap

    Till next time
    See ya

  5. Holy Cow! Finally (after years) a working solution to xrdp “black screen”. My Ubuntu 18.04.5 LTS clients are now properly accessible from Windows RDC.

    Script xrdp-installer-1.2.1.sh worked perfectly.

    Thanks for making it happen…

  6. @JWC,

    Thanks for the feedback and for positive comments, always happy to see that our work can be useful

    Till next time
    see ya

  7. I’m having issues with sound. I did this previously on my own and then uninstalled xrdp and installed it back with this script and the -s option. The result is exactly the same.

    If I type pulseaudio -k I just get:

    E: [pulseaudio] main.c: Failed to kill daemon: No such process

    When I type pulseaudio to see where it went it says:

    E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

    What can I do?

  8. @Juan Carlos,

    Depends on your configuration….. if you are using sssd, please edit /etc/sssd/sssd.conf and replace the following line
    access_provider = ad
    with
    access_provider = simple

    this is the quickest way to have it working… we are planning to publish a post explaining xrdp and ldap integration as other people have mentioned the issue

    Hope this help
    Till next time
    See ya

  9. @ffuentes,

    looks like conflict between pulseaudio module files…. I would uninstall again xrdp using the script. Then, you have to manually remove the pulse audio module created by the script and re-run the script. check if this would fix your issue

    Please provide more info as well…. which ubuntu version ? / do you see in xrdp session the xrdp-sink objet in the Sound applet in system settings ? / do you have sound when logged on locally ?

    Hope this help
    Till next time
    See ya

  10. Hello,

    I found two issues regarding custom install.

    The version number of xorgxrdp is changed in Ubuntu 20.04.
    18.04 : 0.9.5
    20.04 : 1:0.2.12
    In xrdp-installer-1.2.1.sh/line212, –pkgversion=0.2.13 is specified.
    It is OK at install time. However, on 20.04, “apt upgrade” overwrites xorgxrdp with version 1:0.2.12, because apt judges 1:0.2.12 is newer than 0.2.13.
    The same thing occurs on 18.04, xorgxrdp is overwritten with 0.9.5.
    Current xrdp/xorgxrdp version is 0.9.14/0.2.14.
    xrdp is working with combination of 0.9.14/0.9.5(18.04).
    However, xrdp does not work with combination of 0.9.14/0.2.12(20.04).
    In order to avoid this issue, and follow current version number, following lines work.
    182: sudo checkinstall –pkgname=xrdp –pkgversion=$(git describe –abbrev=0 | cut -dv -f2) –pkgrelease=1 –default
    212: sudo checkinstall –pkgname=xorgxrdp –pkgversion=1:$(git describe –abbrev=0 | cut -dv -f2) –pkgrelease=1 –default

    Another issue is:
    In case of custom install, “xrdp-installer-1.2.1.sh -r” does not delete /etc/xrdp/xrdp-installer-check.log,
    but following message is displayed.
    “dpkg: warning: while removing xrdp, directory ‘/etc/xrdp’ not empty so not removed”
    In this situation, xrdp-installer-1.2.1.sh does not install xrdp.
    In order to avoid this issue, /etc/xrdp/xrdp-installer-check.log is required to be deleted in remove_xrdp().

  11. @Hiero,

    Thank you for sharing your findings… You are correct in your statements…. we will need to update the script in order to take into account the detected issues…. As we are overloaded with work, we didn’t perform a lot of testing when we published the script version 1.2.1… We hope that in a few days, we will be able to update it and include your findings plus the previous comments we received as well….

    Thank you very much in helping us improving this script..
    どうもありがとうございました

    Till next time
    See ya

  12. I have a suggestion. Instead of routing people through the `be` regional mirror, since everyone uses different mirrors, have you considered simply pointing things at archive.ubuntu.com instead of using `be.archive.ubuntu.com` in your script?

  13. Hello Griffon,

    Appreciate you sharing your script.

    Unfortunately for me, RDP is still not working.

    I am running 18.04.5

    The RDP session says
    connecting to sesman ip 127.0.0.1 port 3350
    sesman connect ok
    sending login info to session manager, please wait
    login successful for display 10
    started connecting
    connection problem, giving up
    some problem

    Any troubleshooting suggestions?

    Thanks

    VW

  14. @Thomas,

    Good suggestion indeed. initially, we have been using the Belgian repository but now indeed we can update the script and point to a more generic mirror….
    An update for the script is on its ways as other readers have also provided good feedback and suggestions as you did

    Thank for your feedback and for visiting our blog
    Till next time
    See ya

  15. @VW,
    First, we would need more information….
    Are you running Ubuntu on a physical machine or Virtual machine ?
    do you have a nvidia graphic cards ?
    has the script executed without error ?
    Check the following…..

    is xrdp installed ? (in a terminal, type xrdp -v )
    is the xrdp service running (in a terminal, type sudo systemctl status xrdp)

    is xorgxrdp package installed ? (in a terminal type, dpkg -l |grep xserver-xorg-core )
    type the following command sudo apt-get intall xorgxrdp-hwe-18.04 and check if it says the package is already installed or if installation will be performed….

    Check the logs (/var/log/xrdp.log and /var/log/xrdp-sesman.log ~/.xsession-errors and ~/.xorgxrdp10.log)
    If you have nvidia Graphic card, you have to change the driver that you are using in order to get the xrdp connection working.. .in the Additional Drivers applet, uncheck the nvidia Graphic and select the X.Org drivers

    Hope this help
    Till next time
    See ya

  16. @Griffon,

    Thanks for your speedy reply.

    Ubuntu is running in a Hyper-V VM (Gen2)

    Results from diagnostics
    xrdp -v

    xrdp: A Remote Desktop Protocol server.
    Copyright (C) Jay Sorg 2004-2014
    See http://www.xrdp.org for more information.
    Version 0.9.5

    sudo systemctl status xrdp
    [sudo] password for zen:
    ● xrdp.service – xrdp daemon
    Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: ena
    Active: active (running) since Sat 2020-12-12 16:03:41 AEDT; 16h ago
    Docs: man:xrdp(8)
    man:xrdp.ini(5)
    Main PID: 3717 (xrdp)
    Tasks: 1 (limit: 2187)
    CGroup: /system.slice/xrdp.service
    └─3717 /usr/sbin/xrdp

    Dec 12 16:07:31 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] Closed
    Dec 12 16:07:35 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] Closed
    Dec 12 16:07:38 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] Closed
    Dec 12 16:07:41 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] xrdp_w
    Dec 12 16:07:41 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] Closed
    Dec 12 16:07:41 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] xrdp_w
    Dec 12 16:07:41 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] xrdp_m
    Dec 12 16:07:41 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] Closed
    Dec 12 16:11:16 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] Closed
    Dec 12 16:11:16 Ubuntu-18-04-5 xrdp[4869]: (4869)(139646619264832)[DEBUG] xrdp_m
    lines 1-20/20

    dpkg -l |grep xserver-xorg-core
    ii xserver-xorg-core 2:1.19.6-1ubuntu4.8 amd64 Xorg X server – core server
    rc xserver-xorg-core-hwe-18.04 2:1.20.8-2ubuntu2.2~18.04.4 amd64 Xorg X server – core server

    sudo apt-get install xorgxrdp-hwe-18.04
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    xorgxrdp-hwe-18.04 : Depends: xorg-video-abi-24
    Depends: xserver-xorg-core-hwe-18.04 (>= 2:1.18.99.901) but it is not going to be installed
    Recommends: xorg-hwe-18.04 but it is not installable
    E: Unable to correct problems, you have held broken packages.

    sudo apt-get install xserver-xorg-core
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    xserver-xorg-core is already the newest version (2:1.19.6-1ubuntu4.8).
    0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

    sudo apt-get install xserver-xorg-input-all
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    xserver-xorg-input-all is already the newest version (1:7.7+19ubuntu7.1).
    0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

    sudo apt-get install xrdp
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    xrdp is already the newest version (0.9.5-2).
    0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

    I’m an Ubuntu newbie, in some earlier troubleshooting before I found your site, I tried installing xfce; I’m now wondering whether this might be a factor here.

    vw

  17. @VW,

    Ok….so look a little bit messy here…. The initial problem is due to the fact that xorgxrdp was not installed on your system.
    Now, you have done so many things on your system that we do not know the status… Can you now perform an xrdp connection ? is this working since you have removed the xorgxrdp-hwe package and re-installed the legacy package ?

    we would recommend to perform a clean install on your system and retry the script. or possibly, remove xrdp and xorg packages from your system. reinstall the hwe packages (something like this sudo apt-get install –install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04) and retry the script or perform a manual installation

    sudo apt-get install xrdp -y
    sudo apt-get intall xorgxrdp-hwe-18.04

    if you have unmet dependencies, try to fix them using sudo apt –fix-broken install

    Hope this help
    Till next time
    See ya

  18. Hey, thanks for this script, it helped alot with setting up xrdp on Ubuntu 20.
    I use it to connect to a tiny Intel NUC with just an USB Plotter connected. Apparently I have to reconnect the USB cable after each boot, otherwise the device is not found. Feels like the USB device not initiated by remote, but I have no clue. Any ideas what could be the cause?

  19. @Teemo;

    Interesting question as we never played around with USB devices and XRDP software…. Have you enabled the necessary option in your remote desktop client to detect devices when plugged in and plugged out
    Could that be the issue ?
    If time permit, we will try to perform some testing and come back to you

    Hope this help
    Till next time
    See ya

  20. Hello:
    Installed the script my login as rdp worked the same as before. I did not get my expected Ubuntu 18.04 desktop. I was surprised as I was expecting the Ubuntu 18.04 desktop. I did get the custom login when i came in I chose ‘-s -l’

    Any ideas?

    Kind Regards,
    Mark Wardell

  21. @Mark,

    Can you confirm that you are using Ubuntu 18.04 + Gnome Desktop ? The script has been specifically designed to get access to the gnome desktop in the remote session
    If this is the case, can you then check/ensure that a file caled xsessionrc has been created in your home profile ( it’s an hidden file !!!). check the content of this file by typing in a terminal console cat ~/.xsessionrc
    This file should contain the following code
    export GNOME_SHELL_SESSION_MODE=ubuntu
    export XDG_CURRENT_DESKTOP=ubuntu:GNOME
    export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg

    Possibly, can you provide a screenshot of your desktop within remote session ? You might also be able to configure your remote desktop session to look like UBuntu Gnome Desktop using the gnome tweaks utility and perform the necessary manual changes (see https://c-nergy.be/blog/?p=13590)

    Hope this help
    Sorry for the delay in answering….

    Till next time
    See ya

  22. Griffon:

    Thanks for your response. You sound confident that we will get my system working

    Here are the Screenshots that tell the story if I know how to use OneDrive that is! 🙂
    I have not tried the trick with .
    As GNOME Logged in locally
    https://1drv.ms/u/s!Av-7sCd17YPOlUYXdkmyfMATwwL9?e=LSzmB0

    As Proof logon Screen was modified by the script
    https://1drv.ms/u/s!Av-7sCd17YPOlUU-yUzw7ulMUY6X?e=awCbWg

    As result of logging in 🙁
    https://1drv.ms/u/s!Av-7sCd17YPOlUfxd304mtbdv3PR?e=8KFqRO

    here is validation ~/.xsessionrc
    https://1drv.ms/u/s!Av-7sCd17YPOlUgiRV88RtKd-F84?e=9FyZex

  23. here is my version: I do not know how we got onto Ubuntu 20.04 Unintended update?
    mwardell@mark-NUC:/etc/nginx/sites-available$ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.1 LTS
    Release: 20.04
    Codename: focal

  24. @Mark,

    Ok, so what we see based on your screenshot is that you have multiple desktop interface installed on your Ubuntu machine….You (or someone) has installed the xfce interface. So, it seems to use that someone tried to have xrdp installed previously on the system and wanted to use xfce interface in the first place… is this statement correct ? Our script does not install any additional Desktop interface and fully tested only on pure Ubuntu Desktop (i.e. gnome Desktop interface)

    Let’s try to fix it …..

    When you perform your remote session, there must be a login script that would tell your system to use xfce interface…With our xrdp-installer script, the Ubuntu gnome desktop is loaded through ~/.xsessionrc script.. We have seen that the script contains the correct information. So maybe there is another login script that still loading xfce interface

    Can you check if you have the file ~/.xsession file that exists on your system ? If it exists, can you check the content ? is it referring to any xfce desktop info ? Simply, delete the ~/.xsession file and try again
    Can you check also your /etc/xrdp/startwm.sh and see if (usually) at the bottom of the script, there is a reference about xfce-deskop . If there are some entries about xfce-desktop, please comment them

    When theses actions above have been performed, restart xrdp, logoff and try to login through your favorite remote desktop client

    We are assuming that you are the only user login into the system either locally or remotely. so the changes you would performed are targeted to a specific user….

    Hope this help
    till next time
    See ya

  25. Griffon Asked: “So, it seems to use that someone tried to have xrdp installed previously on the system and wanted to use xfce interface in the first place… is this statement correct ?”
    me: CORRECT

    Griffon asked: “Can you check if you have the file ~/.xsession file that exists on your system ? If it exists, can you check the content ? is it referring to any xfce desktop info ? Simply, delete the ~/.xsession file and try again”
    me: it existed. i deleted

    Griffon asked:
    “Can you check also your /etc/xrdp/startwm.sh and see if (usually) at the bottom of the script, there is a reference about xfce-deskop . If there are some entries about xfce-desktop, please comment them”
    me: It was there at bottom i deleted.

    Same result. Still have the new logon screen but i arrive at the dreaded mouse desktop

  26. @Mark,

    If you want to re-run the script, you would first need to remove xrdp and then reinstall xrdp software…so, yes, you can try
    ./xrdp-install-1.2.1.sh -r (to remove xrdp in the first place)
    ./xrdp-install-1.2.1.sh -l (to reinstall xrdp properly)

    I would remove the xfce package if you do not need it or use it

    Hope this help
    Till next time
    See ya

  27. @Mark,

    So, actually, it’s the testing with xfce desktop that seems to be the cause of the issue….:-)
    so, normally, the xfce desktop is loaded in xrdp session when
    1/ /etc/xrdp/startwm.sh is configured to have the startxfce session to be loaded
    2/ /etc/xrdp/startwm.sh is modified to create the ~/.xsession file each time you login into the system and .xsession contains information about using xfce desktop
    3/ a user has manually created the ~/.xsession file

    We would guess that the ~/.xsession might still exists even after you deleted it…. -> please check -> again, if there, delete the file
    the /etc/xrdp/startwm.sh should not contain any more info or reference to xfce….
    Check that the ~/.xsessionrc exists and populated accordingly
    reboot the machine completely after deleting and assessing that the files are there…
    And try again
    Plus try with a new user account as well to see if the proper files are created during the xrdp login process

    Hope this help
    till next time
    See ya

  28. Tada! All spoils to those who persist! Thank you soo much for your help! I read your instructions and followed to a ‘T’ now I am a satisfied user. Can I buy you a cup of Coffee?

    Mark

  29. @Mark,

    Ah Good News ! We are happy that you have been able to fix your issue and we hope that our help was useful and constructive….
    Thanks for the cup of Coffee but at the moment we have no way to accept this…. We might implement a buy me a coffee actually (thanks for the suggestion) as this is not invasive as ads systems and there is no obligation…..

    Updated – we have added a buy me coffee button…no obligation to tip 🙂

    Till next time
    See ya

  30. Great:
    One minor annoyance is the ubuntu desktop is larger than the rdp sreenspace so rdp automatically displays scrollbars. I would like to tweak so they are same size and i would not need to scroll rdp container window to see my entire ubuntu desktop area.

    Mark

  31. On a Hyper V running Ubuntu 20.10 when trying to connect with xrdp:
    I get the dialog box to specify screen resolution, etc. When i click connect, it starts then shows “Video remoting was disconnected”

    But in the background I can see the Hyper V window continuing to bring up its gui, showing its login screen…

    xrdp-installer-1.2.1.sh seemed to run just fine.

  32. @Mark,

    This is not a problem with xRDP….this would be problably related to the Remote Desktop client you are using…..
    If you are using Mstsc (Microsoft Remote Desktop Client), you can actually adjust the size or using the smart Sizing feature….
    To enable the smart sizing, perform a remote connection to your UBuntu machine… in the left corner of the remote session, click on it and you will see a menu…click on Smart Sizing
    Have a look at this link https://blog.blksthl.com/2012/12/11/smart-sizing-the-remote-desktop-pure-love/

    Hope this help
    Till next time
    See ya

  33. @Richard,

    Have you only used the xrdp-installer script to perform the installation ? Have you used the quick deploy feature of Hyper-V and deployed the Ubuntu image from the repository ?
    Since you see the dialog box with the specify screen resolution, we think that the enhanced mode is enabled and this can be only if you have used the quick deploy feature or run another script….
    Please read this post https://c-nergy.be/blog/?p=12429 to get more information about Hyper-V, enhanced mode and xrdp… You will find out that some minor issues exists

    So, to summarize
    -> You can use our script but you will not be able to use Hyper-V Enhanced mode but you will be able to remotely connect to the VM
    -> You can use the Hyper-V Enhanced mode, so you will be able to connect through the VM Console but probably not possible to remotely login to the VM Session

    Hope this help
    Till next time
    See ya

  34. Great Work!

    I use Ubuntu Ubuntu 20.04 LTS / 64 bit on virtual private server and I’ve had the problem with the sound. I needet to start pulseaudio with “pulseaudio –start” each time on login.

    To solve the problem permanently I added a shellscript file in the folder “/etc/profile.d/” with just this command:
    pulseaudio –start

    After restart an login the sound works great. Mayby you could add this to the installation script.

    Thank you once again for the great job!
    Martin

  35. @Martin,

    Thank you for visiting our blog and provide our feedback and findings…
    Indeed, we mentioned the issue with the pulseaudio process not automatically starting in Ubuntu and xRDP…
    We are working already on the next version of the script (Ubuntu 21.04 is on its way !!!).
    So, we will try to integrate your suggestion in the next release of the script which should improve general user experience

    Thank you for the suggestion 🙂

    Till next time
    See ya

  36. Could you confirm if xrdp works with Yubikey on Ubuntu 20.04 64 ? I can’t pass the login screen with REMINA or mstsc from Windows 10 . My /etc/pam.d/xrdp-sesman looks like @include common-auth auth required pam_u2f.so authfile=/etc/Yubico/u2f_keys. The error: login failed for display 0
    — logifiles
    xrdp_wm_log_msg: sesman connect ok
    xrdp_wm_log_msg: sending login info to session manager, please wait…
    return value from xrdp_mm_connect 0

  37. @Miguel,

    Thank for visiting our blog and sharing your discoveries…. as far as we know, we do not think that xRDP support Yubikey…we might be wrong… we never tried this kind of setup….we would need to investigate a little further..

    Hope this help
    Till next time
    See ya

  38. Hi everybody

    i’m using your great script for installation and it works fine.
    but if i login frome remote after long time (for example 10 hours), connection got lost , and it broke even ethernet connection and local computer even not respond anymore. what is the problem??

  39. @Amir,

    Thank you for visiting our blog and sharing some of your concerns… As we never encountered this issue, we have no clue… if someone has some insight information, please share it 🙂

    Till next time
    See ya

  40. I’m running Ubuntu 20.04 on a Raspberry Pi. I got xrdp up and running, but I was having problems logging in. While looking for a solution I found this script and ran it. Now when I try to connect from Windows 10, I can’t get past the certificate warning. It errors out with “This computer can’t connect to the remote computer”

    I verified xrdp is active using “sudo systemctl status xrdp”

    I made sure the firewall isn’t blocking the port. What’s the next thing I should check?

  41. @Gerard,

    Thank for visiting our blog…

    Based on the description provided here, it seems that you have no connectivity to the rapsberry pi box or that the service is not accepting connections or the service is not started.
    Can you ping the raspberry box from a different machine ? are you using ip address or hostname ? do you have name resolution in place
    which option have you used to run the script ? standard installation or custom installation ? Have you removed the old xrdp install initially and run the script ? or did you run the script on top of your installation ?
    From which operating system are you trying to perform the xrdp connectin ?
    Which port have you allowed in the firewall (3389 ?)
    The fact that you do not even see the xrdp login screen seems to indicate that there is no xrdp service (or dependencies are running)
    Can you provide some more logs (/var/log/xrdp.log and /var/log/xrdp-sesman.log) ?
    Can you provide a screenshot of the systemctl status xrdp ?

    Hope this help
    Till next time

  42. I ran the script on top of the existing installation. I performed the remove option with the script and manually installed xrdp. I was able to get it to work using the default installation. I don’t mind uninstalling xrdp and use your script, but it seems to be working.

  43. @Gerard,

    Ok… I’m a little bit lost now 🙂
    We were just asking some questions in order to get more information about the install process was performed in order to help us finding some elements to help solving the issue
    Now, you are telling me that you have performed a manual installation (i.e. sudo apt-get install xrdp) and the xrdp solution is working -> is this correct ??
    You are also telling me that if you use the xrdp-installer script (using standard mode install…ie ./xrdp-installer-1.2.2.sh with no parameters) and the installation of xRDP is not working anymore -> is this correct ?

    If this is the case, that would be strange, because what does the script is basically running in sequence the commands that would be used to perform the installation (i.e. sudo apt-get install xrdp -y) and then modify some files to avoid popup dialog box when remote connect to your ubuntu machine ?

    As requested (and if you have time to test this – since your install seems to work), can you post here some logs when not working…
    Uninstall the manual install (and reboot the machine)
    use the script -> standard install mode , no switches
    Possibly (copy/paste the output on the terminal console in a text file and post it here as well – so we can see that no problems/issues have bee detected during the install….)
    reboot the raspberry
    and try to connect using remote desktop

    If this is not working, can you post the content of the /var/log/xrdp.log and /var/log/xrdp-sesman.log here and also provide the output of the following commands
    xrdp -v -> which version of xrdp
    dpkg -l | grep xorg
    sudo systemctl status xrdp

    -> we want to investigate and see if the script can be run indeed against Raspberry pi or not ….

    Waiting for your feedback
    thank you
    See ya

Leave a Reply