Hello World,
Since multiple users have reported a small issue with the xrdp-installer script (version 1.4.4) and Linux Mint, we have decided to take a look into it and see what is causing the issue. In a nutshell, when you run the script and you want to enable sound redirection, the script will fail in enabling sound redirection on your Linux Mint machine. At this stage, we had no clue about the error and why this is happening…..
So, time for some investigations…..
Overview
In this post, we have decided to install a fresh version of Linux Mint and we will run our famous xrdp-installer script (version 1.4.4) against it. In our scenario, since we want to reproduce the issue reported by multiple users, we will use the -s switch option when running the script which is used to enable the sound redirection feature.
Reproducing the Problem
Step 1 – Obtain the script
So, we first need to obtain the script and make it executable. You can do this by opening a Terminal console on your Linux Mint machine and you can execute the following command
cd ~/Downloads wget https://www.c-nergy.be/downloads/xRDP/xrdp-installer-1.4.4.zip unzip xrdp-installer-1.4.4.zip chmod +x xrdp-installer-1.4.4.sh
Step 2 – Execute the script
At this stage, we are ready to execute the script. Again, since we want to reproduce the sound redirection issue against Linux Mint, we will use the -s switch option when executing the script. So, in your Terminal console, we have issued the following command
./xrdp-installer-1.4.4 -s -l
Click on Picture for better Resolution
In the following screenshot, we can see that the script has indeed identified the correct Linux Version (i.e. Linux Mint). We can proceed and we pass the necessary credentials for the script to move forward
Click on Picture for better Resolution
After sometimes, we can indeed notice that something went wrong and that an error message is being displayed at the end of the script. The error message explicitly mentions that the “Sound Redirection” failed.
Click on Picture for better Resolution
Step 3 – Identifying the issue
To see what could be the problem, since a lot of information is available in the Terminal console, we started to scroll up in order to identify what could be the problem. Quickly, we have been able to identify the possible problem (see screenshot below)
Click on Picture for better Resolution
The screenshot provide quite good hints. So, the problem occurs when the script is trying to add sources files needed to perform the sound redirection installation process. Looking a little bit down, it seems that Linux Mint does not know about the apt-add-repository -s command/switch. Since some sources files are needed and since Linux Mint does not support the -s option, it make sense that the installation will not occur….
So, we know what the problem is…Now, we need a way to fix it…..
Finding a possible Fix
So, we have clearly identified the issue i.e. the script is using an unknown command in Linux Mint to get the sources files. So, now the question is how to get these sources files on Linux Mint. In this section, we will see if can manually enable this option (via the GUI) and then see if there is any ways to automate the process (via a command line option)….
Step 1 – How To enable Software Sources on Linux Mint…
Since we are not really familiar with Linux Mint, we have decided to first explore the GUI interface (software sources) to see if there was a possible way to enable Sources repo…Luckily, the option is indeed available. So, we have enabled the source repo via the GUI (see screenshot below) and we have decided to try to run the script again
Click on Picture for better Resolution
Step 2 – Execute the script (again)
After enabling this option, we have decided to re-run the script using again the -s switch. As you can see on the screenshot below, this time the script ran successfully and sound redirection was enabled and working
Click on Picture for better Resolution
To ensure and demonstrate that sound redirection was indeed working as expected, we have performed a remote session against our Linux Mint machine and we have checked the Sound Applet. As you can see, the correct xrdp sink objects are now available within our remote session and sound redirection is working as expected now
Click on Picture for better Resolution
Click on Picture for better Resolution
So, we have clearly identified the issue here. The script is using the apt-add-repository -s command and this specific command is not known by Linux Mint. We know that the workaround to this situation could be to manually enable sources repo before running the script and this should fix the issue. Obviously, we want to go to the next step and see if there is any way to automate this process.
After some investigations, we have noticed that in Linux Mint, when enabling the Sources Repo, a additional file is created under the /etc/apt/sources.list.d/ directory. So to automate the process, we would need to append into our script the necessary code to create and populate accordingly this file….
So, guess what ! We are working in the script version 1.4.5 that should include the fix for this detected issue. The script 1.4.5 will be really a small update and should be seen more as a maintenance release.
Click on Picture for better Resolution
Final Notes
In this post, we have quickly tackled a small issue affecting Linux Mint users. The xrdp-installer-1.4.4 will fail to configure and enable sound redirection on a Linux Mint. The reason is that the source repo addition in Linux Mint is a little bit different than other Ubuntu based Flavors. So, to avoid the issue, you will need to manually enable source repo before running the script and trying to enable sound redirection. This solution is to provide a really quick and dirty workaround…..
To permanently fix the issue, we have decided to work on the next version of the script (1.4.5) which will tackle this issue automatically. So, you will not need to enable source repo manually before executing the script. Everything will be done automatically for you…. The xrdp-installer-1.4.5 script should be seen as a maintenance release since no major features are changed and we are mainly fixing a minor issue.
Hope this will be useful to Linux Mint users… Please be patient as we are working on the next version of the script. When made available, please run it; test it and provide feedback if you have time….
Till next time
See ya
Thanks a lot for the Script! I have tried several workarounds for the xrdp Sound Issue on Linux Mint and your Script was the first solving the problem instantly 🙂
@Jan,
Thank you for visiting our blog and providing good feedback. Happy to see that this post was helpful..Since then, we have released a newer version of xrdp-installer script that take into account Linux Mint OS
Give it a try
Till next time
See ya