xRDP – Detected issues with Debian 11 – Oh No ! Something has gone wrong….

 

  The script hereafter is outdated and has been replaced by a newer version.  Please Check the Download page for latest version. The Latest version of the xrdp-installer script includes Debian Support 

 

Hello world, 

In our previous post, we have provide a quick step by step guide on how to install the new Debian release (Debian 11 codename Bullseye).  Since we have been providing some scripts to ease the installation of xrdp on top of Debian distribution, our next step would have been to re-validate the provided script and ensure that xRDP installation would process accordingly and that xRDP functionality would be working as expected.  

So, we have encountered some issues that you might want to be aware of.  So, let’s move forward…. 

Overview

Our Setup

When we wrote the installation process for Debian 10, the default Desktop manager was Mate-Desktop.  In our previous post, we wen through the necessary steps to install the Debian 11 operating system.  During this installation process, we have decided to install as default Desktop Interface Gnome Shell.  This post will be focusing exclusively on Gnome Desktop, xRDP and Debian 11.  

If you have followed the steps described in our previous post ,  you should have already an up and running Debian 11 machine.  You should see the following login screen 

Click on Picture for better Resolution

So, you can provide username and password in order to access your desktop interface which will be in our specific case Gnome shell. Our Desktop environment will look like the following (see screenshot below).  This is the default theme. Obviously, you can customize it as required.   

Click on Picture for better Resolution

 

Scripted installation of xRDP (Preview version)

At this stage, you are ready to download our famous xrdp-installer script and perform an automated installation of xRDP.  So far, we have published two scripts that can be used to automate xRDP installation on top of Debian Distributions which are 

In our scenario, we will be using the second option.  This script is a consolidated version of the Debian script and the Ubuntu script.  In order to avoid maintaining multiple scripts version 

Executing the script to perform a standard installation

If you are following us for a long time, you know that the script can perform a standard installation (meaning using the package made available on the Debian repository) or you can perform a custom installation (meaning that the xrdp package will be compiled from source).  In our specific scenario, we will be performing a standard installation… 

In order to use the script and perform a standard installation (and to simplify the process), open up a Terminal console and issue the following commands as shown below 

cd ~/Downloads
wget https://www.c-nergy.be/downloads/xRDP/xrdp-installer-preview-2021.zip
unzip xrdp-installer-preview-2021.zip 
chmod +x  ~/Downloads/xrdp-installer-preview-2021.sh

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-preview-2021.sh

Click on Picture for better Resolution

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….

After executing the script, you can check the version of the xRDP package you have installed by issuing the following command in a Terminal console 

 sudo xrdp -v 

You will see that if you have performed a standard installation, the xRDP package will be set to 0.9.12

Click on Picture for better Resolution

Testing 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.  Start your favorite rdp client and simply enter your credentials and start testing your installation. 

Click on Picture for better Resolution

As you would expect, the xRDP login screen will be presented to you (something similar to the screenshot below) 

Click on Picture for better Resolution

 

Provide your username and password (and ensure that no one is logged on locally on the Debian computer). After a few moments, you will see the following error message displayed on the screen 

Oh No ! Something has gone wrong

Click on Picture for better Resolution

 

Clearly, there is a problem and the remote desktop will not be presented to the user !!!

Possible Fix 

The problem seems to affect only Debian “Bulleyes”  with Gnome Desktop.  We have tried with KDE interface and it seems that everything works as expected.  We were able to access the remote Desktop and the kde desktop was presented accordingly.  To have xRDP working against Gnome Desktop on top of Debian 11, the quick fix we can offer you is to perform a custom installation of xRDP.

If you have installed the xRDP package using the script, it’s recommended to uninstall it first before perform a custom installation.  Issue the following commands in a  Terminal console, browse to the location where the script has been downloaded and issue the following command 

./xrdp-installer-preview-2021.sh -r 
./xrdp-installer-preview-2021.sh -c -l

Again, to check which xRDP version you are running, you can again issue the command  

 sudo xrdp -v 

If everything went fine, you should see that the xRDP package version would be set to 0.9.17

 

Click on Picture for better Resolution

Testing your Configuration

Again, ensure that no one is locally connected on the Debian machine.  Start up your favourite rdp client and perform a remote connection to your Debian 11 running Gnome Desktop where xrdp 0.9.17 package has been installed. 

As in the previous configuration, you should see the xRDP login screen (something similar to this) presented to you.  Enter your username and password  

Click on Picture for better Resolution

And surprisingly, the remote desktop connection is going through this time.  You can see that we have performed a successful remote connection to the Debian 11 and the gnome desktop is accessible… 

Click on Picture for better Resolution

Root Cause of the issue 

We had to look a little bit further in order to find out what it’s really causing the issue.  Based the the bug/issue reported to the team behind xrdp software (see https://github.com/neutrinolabs/xorgxrdp/issues/156),  the problem is only present when using the xorgxrdp package version 0.2.12.  Previous version of Debian (Debian 10) was using the package version 0.2.9 and we didn’t encountered the issue…Debian 11 is shipping with the problematic version (i.e. 0.2.12) and this explain why the connection is failing.  

The only fix proposed by xRDP team is basically to upgrade the xorgxrdp package to a more recent version which is exactly what’s happening when you are performing the custom installation….

Final Notes

This is it for this post ! 

We have found out that Debian 11 with Gnome Desktop interface bring a small annoyance with the xRDP software package.  Indeed, a standard installation of xRDP (using our script or if you perform a manual installation) will prevent the access to the remote desktop.  The standard installation will install and configure xrdp version 0.9.12.  Again, the problem seems to happens only with Gnome Desktop.  We have tested the same setup but with KDE desktop and everything is working as expected.

So far, the only option to have xRDP working against Debian 11 where Gnome Desktop is the default interface consist of performing a custom installation of xRDP (i.e. compile from sources). This will install the xrdp package version 0.9.17.   This version of xRDP does not have the problem and you will be able to perform your remote desktop connection.  The root cause issue seems to be a problem with the xorgxrdp package shipping with Debian 11 which causes the issue with gnome Desktop….As long as Debian maintainer do not update this package, the issue might remains and the only option left is to perform a custom installation of xRDP.  Again, with our xrdp-installer script, the process is really easy and you will be able to enjoy your remote session also on Debian 11… 

If you have time, please try the xrdp script against Debian 11 with different desktop interfaces in order to validate the installation process. 

Till next time 

See ya

 

 

30 thoughts on “xRDP – Detected issues with Debian 11 – Oh No ! Something has gone wrong….

  1. After using the script and installing everything it printed out everything worked fine. After rebooting to test xrdp I realized that xrdp service is not even running, it was masked.

    I had to remove an “exit” line because even with the -c flag, I was not able to run the script. It said to use custom mode.. which I did, but it said it nevertheless, ending itself.

    Debian 11 with GNOME (Install script version 1.3, custom mode)

    Any help would be highly appreciated!

    Greetings,
    Domml

  2. @Domml,

    Thank you for your feedback and informing us about the issue…. This is a small mistake with the code in the script…. we have forgotten to comment some code…. The script will be updated today (end of day ETC time) and it should be working fine…. Sorry the inconvenience….. 🙂

    We will back to you when change will be done….

    Till next time
    See ya

  3. @Domml,

    Coming back to you for the issue with the script 1.3… The script has been updated and should be running accordingly 🙂
    Please give it try and provide feedback

    Till next time
    See ya

  4. Hey Griffon!

    I really like this script. I have two minor issues that may you know the answer to:
    1. The Gnome desktop runs extremely slow via RDP. I know it is not my system performance either as it is a Ryzen 4 4500U that is on the host. Any suggestions so I am not waiting 5 seconds just for the Gnome application list to show up?
    2. I can copy files from the host to my client (Windows 11 RDP) but I cannot copy files from my client to the host.

  5. I am running these exact commands:

    cd ~/Downloads
    unzip xrdp-installer-preview-2021.zip
    ./xrdp-installer-preview-2021.sh -r
    ./xrdp-installer-preview-2021.sh -c -l

    However, I get the following error:

    checking for xrdp >= 0.9.16… no
    configure: error: Package requirements (xrdp >= 0.9.16) were not met:

    No package ‘xrdp’ found

    What am I doing wrong?

  6. @Hifihedgehog,

    Thank you for visiting our blog and providing feedback…. Let’s try to see if we can help you 🙂
    Point 1 – You should not use the preview version on your system (https://c-nergy.be/blog/?p=16924). This version of the script is deprecated and not maintained anymore
    Point 2 – You should use the latest version of the script (https://c-nergy.be/blog/?p=17175) which is version 1.3. This version of the script include support for Debian
    Point 3 – Based on your previous post, we would assume that you have already xrdp installed on your system. You would first need to remove the xrdp install (using latest version) by typing ./xrdp-installer-1.3.Sh -r (this version should remove the xorgxrdp package as well)
    Point 4 – Reboot the machine before trying to re-install (just to ensure that nothing is hanging)
    Point 5 – Try to install again the xrdp package using the custom isntallation mode by typing ./xrdp-installer-1.3.sh -c -l

    From there, give it a try and provide us feedback..
    If this is not working, please let us know and provide error messages and log information so we can try to help and udpate the script if needed
    Thank you

    Till next time
    See ya

  7. @Hifihedgehog,

    Thank you for visiting our blog and providing feedback. for the clipboard issue, it might be related to xRDP issue… a new version of the package has been released recently that might fix the issue.
    For the speed, we cannot really tell.. On LAN, we have usually acceptable performance but indeed it’s probably not the fastest Remote solution

    Hope this help
    Till next time
    See ya

  8. Hi Griffon
    I have installed your v1.3 installer a few times in lxc containers running ubuntu, thanks:) im trying in debian 11 container, my apt update list is up to date but your installer says lsb_release command not found. i cant find it on my container to be honest, but wondered if you can advise how to get past this step please? sorry if its the obvious to get lsb_release (or is it lsb-release? – https://packages.debian.org/bullseye/lsb-release), just wondered if theres a way to alter the script or theres another way to do this.
    Thank you

  9. I installed standard xrdp , and succeeeded to get it running… But
    the GUI is not complete No extra menu from the sides of the screen ( left, down and Up not available )

    Do you know how to configure it ?

  10. @designDev;

    Thank you for visiting our blog and sharing your findings. It’s highly possible that the lsb_release command is not shipped by default in a container image (optimization reasons). You have two options here

    Option 1 – Quite Simple – Install missing package
    you can try to install the package that would make the lsb_release command available (sudo apt-get install lsb-release)

    Option 2 – modify the script (not tested yet !!! – use it at your own risk)
    Locate this section in the script (around line 65)
    #--Detecting OS Version
    version=$(lsb_release -sd)
    codename=$(lsb_release -sc)
    Release=$(lsb_release -sr)

    and replace it with this code

    #–Detecting OS Version
    . /etc/os-release
    version=${PRETTY_NAME}
    codename=${VERSION_CODENAME}
    Release=${VERSION_ID}

    and then (we have just noticed this one thank to you) , check the check_hwe function which look like
    check_hwe()
    {
    Release=$(lsb_release -sr)
    echo
    (.....)

    Comment the Release variable, the code should look like
    check_hwe()
    {
    #Release=$(lsb_release -sr)
    echo
    (.....)

    And you should be good to go

    Hope this help. If this is working (or not), please provide feedback and we will take this into account in the next release of the script

    Till next time
    See ya

  11. @aladin,

    Thank you for visiting our blog and providing feedback…. Usually, the desktop interface will be configured through a login script that is located in the user profile (~/.xsessionrc)…The content of the file will vary based on the type of desktop environment you are using… Additionally, the script will modify the /etc/xrdp/startwm.sh file to have the file ~/.xsessionrc re-created at each logon… If you tell us which Desktop interface you are using, we can provide you the necessary code to make it work…

    A final note. The script used in this post is outdated….You should be running the latest version of the script (version1.3) (can be found at http://www.c-nergy.be/products.html). The script include support for Debian as well

    Hope this help
    Till next time
    See ya

  12. Hello griffin

    I faced the same issue as @Hifihedgehog.

    Checking the logs i saw:
    make[3]: Entering directory ‘/home/pesche/Downloads/xrdp/docs/man’
    make[3]: Nothing to be done for ‘install-exec-am’.
    /usr/bin/mkdir -p ‘/usr/local/share/man/man1’
    /usr/bin/mkdir: cannot create directory ‘/usr/local/share/man’: No such file or directory

    Entering the command “sudo /usr/bin/mkdir -p ‘/usr/local/share/man/man1′” to create the missing directory.
    Maybe you could check/create it in advance to avoid the error.

    BUT: unfortunately my xrdp-session terminates immediately after successful login inside of mstsc.exe

    I am not able to post lot of log-output here, so could you please get in contact, so I could send the logs by email?`
    Regards, obeligs

  13. @Obeligs,

    thank you for visiting our blog and providing feedback. We will double check the installation procedure against Debian 11 and the latest xrdp 0.9.18 package that might be causing the issue….. We have send you an email address as well where you can share your logs

    Till next time
    See ya

  14. @moeps,

    Thank you for visiting our blog and providing feedback. Normally, you should be able to leave a comments but we are indeed using anti-spam features that might time to time block comment posting… we have updated and tweaked the anti-spam filter… You can give it a try an see if this is working or not

    Waiting for your feedback
    Till next time
    See ya

  15. Thanks for this nifty installer! I had to add a ‘–recursive’ option to the git clone commands in line 302 an 307 to get it to work though!

  16. @Amber,

    Thank you for visiting our blog and sharing your findings. We will have a look into the -recursive option. We have recently started working on the next version of the script but we didn’t encounter the same issue. Happy to see that this worked for you and you find your way to have it working accordingly

    Again, thank you for the info
    Till next time
    See ya

  17. Super strange behavior, drives me nuts…

    Trying to leave a comment but get blocked by anti-spam…

  18. @Matthias;

    Thank you for visiting our blog and sharing your feedback. Please try again to submit your comment and see if this work. We have a spam function that has been set to quite strict level because of SPAM issues
    If this is not working again, let us know and we will contact you via email

    Till next time
    See ya

  19. Per Hifihedgehog’s issue:

    “I am running these exact commands:

    cd ~/Downloads
    unzip xrdp-installer-preview-2021.zip
    ./xrdp-installer-preview-2021.sh -r
    ./xrdp-installer-preview-2021.sh -c -l

    However, I get the following error:

    checking for xrdp >= 0.9.16… no
    configure: error: Package requirements (xrdp >= 0.9.16) were not met:

    No package ‘xrdp’ found

    What am I doing wrong?”

    I had the same issue and the problem ended up being that ‘/usr/local/share/man’ did not exist (make printed the error to stderr). A simple ‘mkdir /usr/local/share/man’ resolved the issue.

  20. @Michael,

    Thank you for visiting our blog and providing feedback..

    I think that your problem is that you are using the The xrp-installer-preview-2021 script version… This version is out dated. Please always use the latest version of the script
    Latest version of the script can be found at http://www.c-nergy.be/products.html which is set to 1.4.1 and support installation against debian 11

    The script version 1.4.1 is running against Debian OS and will also check that you are running the script with the custom option if you have Debian 11. Give it a try with the latest version of the script and provide feedback

    Hope this help
    Till next time
    See ya

  21. Hi,

    Looks very interesting.

    I run your script and it fails saying it can’t find xrdp after xorgxrd build. I post another message but has been blocked as spam. Is there a way to perform a clean untinstall of your script to restart it again?

    Regards
    Alex

  22. @Alex,

    Thank you for visiting our blog and providing feedback. To answer your question, to remove in a clean way the xrdp installation on Debian, you simply run the following command in a Terminal session

    ./xrdp-installer-xx.sh -r

    another point, it’s seems that you are using an old version of the script. The latest version of the script which is set to version 1.4.3 supports debian OS and should be the one you should be using nowadays (to get the script and instructions, have a look at https://c-nergy.be/blog/?p=18205)

    This version of the script should be fine with Debian 10 and 11. Some readers have noticed that compilation was failing because some missing dependencies. So before running the script, just to be on the safe side, run the following command first
    sudo apt install libltdl-dev
    and then run the xrdp-installer-1.4.3.sh script with the proper switch
    ./xrdp-installer-1.4.3.sh -c

    Please provide feedback so we can either confirm it’s working or we will need to work on the script 🙂

    hope this help
    Till next time
    See ya

  23. Thanks soooo much. I was having trouble getting into my gui environment via xrdp to my debian server. I use the gui for some things and having to physically go to my garage server or use ssh only was kind of a pain. I tried cares methods, but it was the script with the -c -l that fixed it. Thanks a ton!

  24. @Garrett,

    Thank you for sharing your feedback and visiting our blog.. happy to see that this information is useful out there and that it helped you solved you issue… Please note that we have developed a small script (xrdp-installer-1.4.3.sh) that can simplify installation of xrdp on Debian OS as Well… you could give it a try as well and share your experience with us

    Till next time
    See ya

  25. @Nah,

    Thank you for visiting our blog and providing some feedback. Yes, this a known bug and we have filled a report to Debian maintainer… A workaround exists and consists of build xrdp from sources. This can be “easily” achieved through the xrdp-installer that we provide and which can be found at https://www.c-nergy.be/products.html (free Download) . The script support Debian OS

    Hope this help
    Till Next time
    See ya

  26. I’d used your script for Debian 11.6.0 with cmd: ./xrdp-installer-preview-2021.sh -c -l -s. Then I’d connected via RDP (from Windows) w/o any issues. Sound is O.K. also. Respect! Thank you!

  27. @Alexander,

    Thank you for visiting our blog and providing feedback…. we are happy to see that the script can be useful. Please note that there is a more recent version of the script – version 1.4.6 which includes Debian Support.
    Please always use the latest version of the script which can be downloaded at http://www.c-nergy.be/products.html

    Till next time
    See ya

Leave a Reply