xRDP – Easy install xRDP on Ubuntu 18.04,20.04,22.04,22.10 (Script Version 1.4.4)

Hello World, 

In one of our previous post, we have mentioned that the latest version of Ubuntu (version 22.10) has been released. This is a short term release where support will be offered only for 9 months.  Since there is a new release, we usually tend to review our famous xrdp-installer script and check that everything is still working as expected.  Indeed, time to time, new releases introduce some changes that break the installation process. 

With this post, we are happy to let you know that the version 1.4.4 of the xrdp-installer script has been released and should support Ubuntu 22.10. This new version is mainly a maintenance release and no major new features have been added.  We have not much time for the moment to work on introducing new features into the script (we hope that in 2023, it will be possible 🙂

The script version 1.4.4 replace all previous and will work exactly the same way as previous versions. Historically, the xrdp-installer script was focusing on Ubuntu + Gnome Desktop interface. However, based on feedback and requests from users, we are trying to take into account more distributions and the script should run against other Ubuntu Flavors and Debian.  Integrating these additional Ubuntu flavors is based on best effort and we cannot guarantee that everything would work as expected.  

So, let’s proceed with this latest version…. 

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.   

Initially, the script was supporting only Ubuntu with Gnome Desktop interface. However,  recent version of script tries to detect the Desktop interface in use and try to perform the post-configuration actions as required.  Recent version of the script also can run against Debian Operating system as well

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

Adding support for Ubuntu 22.04

As mentioned above, this script version is more a maintenance release that will ensure that the script will run against the latest version of Ubuntu i.e. Ubuntu 22.04.  There is no new features included in this release.  We were suppose to modify a little bit the script to perform a better desktop detection (based on Hiero feedback) but since we are overloaded by work, we had no time to include this new feature.  

Informational message  xRDP sound Redirection 

As you probably know by now, Ubuntu 22.10 ship by default with a new Sound server called PipeWire.  Previous version of Ubuntu are using Pulseaudio Sound Server.  The Sound server replacement has an important impact if you are using xRDP sound redirection feature.  xRDP sound redirection feature is based and expect to have a PulseAudio Sound Server and not PipeWire. 

As far as we know, xrdp sound redirection will not work when PipeWire is installed on your Ubuntu machine. The team behind the xrdp software is not really working on updating their software to support PipeWire package .  However, some discussions have started and maybe they might provides some more information about their decisions and a a possible roadmap….

If you run the script and you have selected the option to enable the sound redirection option, the script will try to detect which sound server you are running.  If you are running PulseAudio, the script will proceed and will try to configure the sound redirection feature.  However, if the script detect that Pipewire is the default Sound server, a error message will be displayed informing you that xRDP software is not (yet) supporting Pipewire and the script will stop and no sound redirection will be enabled 

xrdp_warning

Click on Picture for better Resolution

Installing Pulseaudio-utils tools on Ubuntu 22.10

In order to detect which Sound server the machine is running, we need to install a small pulseaudio-utils package.  Using this package, we are able to detect which sound server is running.  Since this script is a maintenance release, we have ensured that the package is only applied to Ubuntu 22.10. In a coming version, we will probably re-write this part of the code 

xrdp-additional-pkg

Click on Picture for better Resolution

How to Use the Script

The xrdp-installer-1.4.4 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.4.4.sh script will support the following Ubuntu operating system version assuming that Gnome Desktop is the default Desktop interface

  • Ubuntu 18.04.x
  • Ubuntu 20.04.x
  • Ubuntu 22.04.x
  • Ubuntu 22.10.x
  • Debian 10 
  • Debian 11 (only if you select custom mode installation !!!) 

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

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

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.4.4.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.4.4.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.4.4.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.4.4.sh

Note : Adjust the path where the xrdp-Installer-1.4.4.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.4.4.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.4.4.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.4.4.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.4.4.sh -s      (this would enable the sound redirection) 
./xrdp-installer-1.4.4.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.4.4.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.4.4.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.4.4.sh -c -s     (this would perform a custom install and enable sound redirection)
./xrdp-installer-1.4.4.sh -c -l     (this would perform a custom install and customize xrdp login screen)
./xrdp-installer-1.4.4.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.4.4.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.4.4.sh -r option) 
  • perform a new installation using your selected installation mode (standard or custom install mode) 

Final Notes

This is it for this post !   

The script version has not been tested extensively but we hope that the minor changes we have introduced will not cause any additional issues. Again, this script is mainly a maintenance release in order to include support to Ubuntu 22.10 release. As soon as we have more time, we will try to keep working on the script and introduce some changes that have been either requested or suggested by some readers or to simply improving the all process….

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.     

Till next time 

See ya  

 

7 thoughts on “xRDP – Easy install xRDP on Ubuntu 18.04,20.04,22.04,22.10 (Script Version 1.4.4)

  1. Hi,
    I think this script is the next best thing since sliced bread, thanks for it:)
    Some reporting : -the script can’t detect if no “full” package information exists, (thus no xrdp package candidate) eg offline ubuntu 22.04.01 install without run apt update
    -the script doesn’t check after the missing packages after first complete install, (possible “automatic repair” mode) eg I removed libfuse2 which removed xrdp, because it was a dependency, then the script checks for /etc/xrdp/xrdp-installer-check.log, it existed and skipped reinstalling the missing packages
    -no “reinstall mode” possible for repair the installation, only removing /etc/xrdp/xrdp-installer-check.log then install.
    Best Regards
    Sándor

  2. line 709. 45-allow.colord.pkla. I think it is supposed to be 45-allow-colord.pkla. I am a noob, and thank you for all your work on this.

  3. @Gary,
    Thank you for visiting our blog and provide feedback… indeed, there is a typo in the script… we have updated the script already and corrected the detected typo
    Thank you for letting us know
    Till next time
    See you

  4. @Sandor,

    Thank you for visiting our blog and providing feedback. Thank you for the feedback about the script and the possible improvements that can be done… The script has grown organically and we might need to revisit it and re-work a little bit the logic inside the script… We have received some other feedback from other users (like Hiero) and we still need to test and integrate also some changes proposals made… As we are really busy (finishing project with End of the year deadline), it will take us a little bit of time to re-work the script and see if we can improve it still this year

    Stay tuned and again thank you for the feedback
    Till next time
    See ya

  5. hello, please tell me what the problem may be, installed ubuntu 22.10 started in AD installed using your script v 1.4.4 xrdp.
    Next, I created a local account and logged in locally using an account from AD, completed them. I tried to log in using rdp, under the account from under which I installed it, I log in normally, but not from under the other accounts. I fall out of the xRDP login window. Please tell me how to add a login permission for the rest of the accounts. all settings of both the system and the rdp server remained unchanged.
    I also tried to disable #TerminalServerUsers=tsusers
    #TerminalServerAdmins=tsadmins
    http://joxi.ru/D2PdLVqtwMJxy2

  6. @Igor;

    Thank you for visiting our blog and sharing your experience. So, not sure we understand fully your question but
    if the question is how to use xRDP against Ubuntu machine that is joined to an Active directory and if you want to login using an Active Directory account; you have to use the instructions provided in these posts

    XRDP – Ubuntu Active Directory Authentication & xRDP – Overview
    xRDP – Remote Connection to Ubuntu Using Active Directory Authentication (HowTo)

    Hope this help
    Till next time
    See ya

Leave a Reply