xRDP – Easy install xRDP on Ubuntu 22.04,24.04,25.04,25.10 with limitations (Script Version 1.5.6.1)- Bug Fixing

Hello World ,

We are releasing a new version of our little xrdp-installer script.  There is no major changes in the script since XRDP still does not include support for Wayland Display server.  We are releasing a new version of the script.  This version of the script is mainly a maintenance release and also fix a minor issue that one of our users have detected.   So, we had to update it to make it still working for a bunch of distribution still using x11 display Server.  

As a reminder, xRDP software is relying heavily on the x11 software packages and this means that the script is now limited to distro that are still shipping with X11 Display Server packages and implementation still present.  This means that any distro running Wayland only Desktop interface such as Gnome 49 (or Ubuntu 25.10 distro) will not be able to take advantage of the XRDP Software package.  As long as the xrdp package is not updated to support Wayland layer,  xRDP software solution can be only used with distributions supporting Desktop interfaces allowing X11 Display Server components.  The limitation introduced by Wayland support only is not coming from the script itself.  Limitation comes from the fact that the xRDP software solution does not support (yet ?) Wayland.    

So, today, we are releasing the xrdp-installer script version 1.5.6.1  The script fixes a small bug and should be seen as a maintenance release.   There is no new features included in this version, only bug fixing… 

So, let’s see…..  

Overview

By now, you should know that the xrdp-installer script aim to ease installation and post-configuration actions of xRDP on top of Ubuntu Operating system.  xRDP is a piece of software that enable remote desktop services on Linux.   This means that windows users can use their Remote desktop client (mstsc) and perform a remote connection to Ubuntu Computer.   

What’s new in this release (Version 1.5.6.1) ?

Bug Fixes

Using the script against Debian 12.3, the Gnome desktop was uninstalled.  So, we have tried and performed an installation and confirmed that this was indeed the case.  We have updated the script so this is not happening anymore.  The fix was quite easy since xRDP package has been updated to a recent version and some issue related to systemd have been fixed.  so, we have removed the temporary code to fix some systemd issues encountered in the past 

We have also updated a little bit the code logic.. We have noticed that time to time the custom login screen was not getting the proper picture. So we have updated the code to ensure that the file can be retrieved and download accordingly. 

Some other minor code reorganization has been performed as well to ensure that the script can run against multiple distro.   

How to Use the Script

The xrdp-installer-1.5.6.1 script will work in a similar way as the previous versions. The following section will explain how to download, extract, set executable mode and perform the installation using the script.  The script provides some switches that can be used to customize the installation process.  

So, let’s see how this would be working…. 

Disclaimer

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

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

Script version & Supported Ubuntu Version

The xrdp-installer-1.5.6.1.sh script will support the following Ubuntu operating system version assuming that Gnome Desktop is the default Desktop interface (and that gnome version is lower than 49).

  • Ubuntu 22.04.x
  • Ubuntu 24.04.x
  • Debian 11 (only if you select custom mode installation !!!) 
  • Debian 12 and later
  • Zorin OS 

Reminder : 

Ubuntu 25.10 with Gnome Desktop 49 is not supported because xRDP software lack Wayland support at this stage. However, it is possible to install Ubuntu 25.10 Default distro (i.e. with Gnome Desktop) and install an alternate Desktop interface to be used with xRDP.   If you go that way,  you will need to run the xrdp-installer script within the alternate desktop you are using  in order to populate correctly the configuration files for XRDP….

The xrdp-installer-1.5.6.1.sh script can be run against the following Ubuntu flavors but we cannot guarantee that everything will work as expected (best effort). 

  • Kubuntu (22.04 and later)
  • Ubuntu Budgie (22.04 and later)
  • Ubuntu Mate (22.04 and later)
  • Xubuntu (22.04 and later)
  • Lubuntu (22.04 and later)  
  • Linux Mint (Experimental at this stage)
  • LMDE (Experimental at this stage) 
  • Pop!_OS  22.04 
  • Elementary OS 

Note :  If you are running any of these distributions and you want to help us improving the support on those, please download and test the script.  Do no hesitate to share your findings so we can try to incorporate them in the next release 

Step 1 – Download the script

To download the script, you have multiple options.   You can from a Terminal issue the following command 

wget https://www.c-nergy.be/downloads/xRDP/xrdp-installer-1.5.6.1.zip

You can also simply use your browser and click on the link to download the script :  

Step 2 – unzip the file 

After downloading the zip package containing the file, you will need to unzip it first. To unzip the package, you can use the Terminal console and issue the following command 

unzip xrdp-installer-1.5.6.1.zip 

You can also use the GUI and the Nautilus file manager to select the downloaded package, right-click on it and select the option Extract Here

Step 2 – Set Execute Right on the script

Download the xrdp-installer-1.5.6.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.5.6.1.sh

Note : Adjust the path where the xrdp-Installer-1.5.6.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.5.6.1.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.5.6.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)
--dev or -d           => will perform a custom installation using dev branch (unstable version)
--unsupported or -u   => will bypass the Check os and will run against unsupported os (use it at your own risk!!)
--perm or -p          => fix permissions on xrdp files (uncommon situation)
--encoding or -e      => to add H.264 & x264 protocol based on the openH264 package

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

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.5.6.1.sh -s      (this would enable the sound redirection) 
./xrdp-installer-1.5.6.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.5.6.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.5.6.1.sh -c     (this would perform a custom installation but will not enabled adv features like sound redirection or custom login screen)

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.5.6.1.sh -c -s     (this would perform a custom install and enable sound redirection)
./xrdp-installer-1.5.6.1.sh -c -l     (this would perform a custom install and customize xrdp login screen)
./xrdp-installer-1.5.6.1.sh -c -l -s  (this would perform a custom install, enable sound and customize login screen)
./xrdp-installer-1.5.6.1.sh -c -d     (this would perform a custom install, using unstable/dev version of xrdp packages -xrdp 0.10.80)
./xrdp-installer-1.5.6.1.sh -c -l -s -e (this would perform a custom install, enable sound and customize login screen, add h264 support)

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.5.6.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.  Start your favorite rdp client and 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. 

Limitations

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.5.5.sh -r option) 
  • Reboot
  • perform a new installation using your selected installation mode (standard or custom install mode) 
  • Reboot

Known issues, Fixed Issues and limitations, New Behavior 

Known Issues 

Black Screen or disconnected immediately after connecting

As mentioned and explained multiple times,  this situation will happen (or can happen) when the same user account is used concurrently locally and remotely.  In other words,  the problem is related to the fact that the same user account is already logged in locally and a remote connection is attempted at the same time.  With xRDP software solution, a specific user account can be logged on either locally or remotely but not both….  

Ubuntu 24.04 seems to have introduced a small change when such situation would happen.  If the user is remotely logged on via xRDP software and if the same user tries to login locally, he will be presented with the following popup (see screenshot) 

Click on Picture for better Resolution

The only problem is that if you click Force Stop button, it seems not to work.  The remote session is not killed.  We have not tried this on older Ubuntu releases but I think this is because of the gnome-remote-login addition in Gnome 46.  

If a user is logged on locally and if the same user tries to perform a remote connection to the machine, the user will get informed about an existing session already running as shown in the screenshot below

Click on Picture for better Resolution

Again, here there is no way to stop the existing session.  You will need to logout locally from the session or you will need to find other ways (such as ssh or another user account) that can be used to disconnect the existing session.

 

Final Notes

This is it for this post !   

The script version has not been tested extensively but it should work in most cases.  The script should be seen as a maintenance release version.   As more and more distributions are switching to Wayland,  xRDP package and the xrdp-installer-script will have probably limited added value in the future.  As long as xRDP does not include Wayland support, xrdp package will be less and less used and people should start looking for some alternatives.  For Gnome Desktop users, the best alternative so far would be the built-in Gnome Remote Desktop..  

Till next time 

4 thoughts on “xRDP – Easy install xRDP on Ubuntu 22.04,24.04,25.04,25.10 with limitations (Script Version 1.5.6.1)- Bug Fixing

  1. I finally found the time to test the new script version, and it works perfectly on Debian 12. Thank you so much for your work!

  2. @ishikawa,

    Thank you for letting us know the issue and more importantly Thank you for the feedback… really appreciated… : )

    Till next time
    See ya

  3. First off – thank you so much for the script which I have used often without problems. It is causing me a problem at the moment and I can only blame myself for the issue. I am frequently installing Ubuntu 24.04 in a busy college environment.

    I have recently been having a problem trying to figure out why users lose access to poweroff and reboot and external drive mounting. It has cost me a lot of time in figuring out polkit rules to fix this. The script does not impact the admin user created during the Ubuntu installation. Perhaps it is because of this that this behaviour is not advertised.

    Please could you explain if these effects are unintended and if possible suggest a way they can be undone. I am now going to read the installation script carefully to try to understand exactly what is going on. Regards. Phill

    I have just discovered it this script that is changing these security items. It took a long time to even think of testing this script as the link between power management tweaks and external drive mounting with xrdp has eluded me.

    I am not sure yet how the script is impacting on these seemingly unrelated functions. I hope you are aware of this impact and

    It is my fault of course for running a script without fully investigating it. I see that there is reference to GUI power management controls becoming altered in KDE desktops.

  4. @Phil,

    Thank you for visiting our blog and providing useful feedback.. So, not sure to understand fully the request/question but let’s try to provide some info and insight. So, based on your comment, we are guessing that you are using Ubuntu 24.04 Edition with KDE Desktop as preferred Desktop interface. The problem you are describing is that the Power Off, Reboot button is missing in the xrdp Session ? or when users logs on on the console locally (no xrdp) ?

    So, about the script and how it works…. Based on tests and user feedback, we have indeed added in the script a section that create some polkit exception rules. If you look at the history of the script (the header), you can see that we have tracked this and we have explained that the polkit should enable the PowerOff and Reboot button within the xrdp Session (see the extract below). This code has been introduced in version 1.5.4 because other users were mentioning about the same issue and behavior.

    This polkit rule is normally allowing the power-off and reboot button on the system….. (As you can see, it logs the actions in the /var/log/secure location (used for tracking and debugging purposes) )

    polkit.addRule(function(action, subject) {
    polkit.log(action + ", " + subject);
    if (~["org.freedesktop.login1.power-off","org.freedesktop.login1.power-off-multiple-sessions","org.freedesktop.login1.reboot","org.freedesktop.login1.reboot-multiple-sessions"].indexOf(action.id)) {
    return polkit.Result.YES;
    }
    });

    So, based on your feedback and by reporting the issue; we will have a look and see what could be the problem… maybe something has changed again in the KDE Desktop. We will see if this is still needed or not….

    # History : 1.5.6.1 – Bug Fixing – Remove Fix for Systemd Dev since not needed anymore and causing issue with Debian 12.3
    # – Bug Fixing – Change code to set file name for custom xrdp login as “global” variable
    # – Bug Fixing – Re-order code – First fix PrePOS and then get the pulseaudio-utils packages
    # : 1.5.6 – bug fixing – wrong xrdp source file downloaded (0.9.27 instead of 0.10.5)
    # : 1.5.5 – adding support to H264 encoding/decoding protocol (x264)
    # – added fix for xrdp and xrdp-sesman service unit file not created
    # – run xrdp service under non-root user account
    # – Add support Ubuntu 25.10 with exceptions
    # – Remove Support Ubuntu 24.10
    # : 1.5.4 – adding support to H264 encoding/decoding protocol (openH264)
    # – Remove support Ubuntu 20.04 (EOL July 2025)
    # – Adding Support Ubuntu 25.04
    # – Adding Support Elementary OS (Best Effort – based on user feedback)
    # – Updating Login box layout and colors
    # – New Polkit Rules for KDE 24.10 to allow Reboot and PowerOff from xrdp session

    # – Additional basic error handling
    # – Code cleanup

    Till next time
    See ya

Leave a Reply