xRDP – Custom Installation Script Version 3.0 (Ubuntu 18.04,18.10 & 19.04)

Hello World, 

If you have followed up during this month, you have probably noticed that have been focusing again a little bit more than necessary on xRDP and Ubuntu Operating system.  With the release of Ubuntu 19.04, we have spend some time in trying to improve the xRDP installation process.   We have started from a manual installation and we have tried to tackle all the annoyances encountered when working with xRDP.  The following posts provide our installation process and our findings…  

Based on these posts, and their findings, it’s was clear that an updated version of the script would be welcome.  The small changes introduced in Ubuntu 19.04 have slightly affected the way xRDP needs to be installed and tweaked in order to provide the best user experience

In this post, we will present the new version of the script that integrate all the things and actions that can be done to provide a smooth installation experience while performing the installation from the sources (i.e. compiling the xrdp and xorgxrdp packages)

So, let’s see what’s the new version of the script looks like 

Note :  Please always check this page, to get the latest version of the script

Custom Install Script – Version 3.0

The previous script version was set to 2.4.  Adding Ubuntu 19.04 support only into the script would have lead us to increment the version of the script to 2.5.  However, because we have modified the code and integrated new ways of performing some post configuration actions, we had the feeling that setting the script version to 3.0 would make more sense.  The script includes the following changes 

  • Added support for Ubuntu 19.04 
  • to use Ubuntu desktop interface in the remote session, we have updated the code and we are using the .xsessionrc capabilities 
  • sound redirection option is still available. However, because xrdp-pulseaudio-installer package is not available in Ubuntu 19.04, we are compiling from sources 
  • -g parameter has been removed as the xsessionrc approach fixes the GDM login look and feel
  • integrate the patch for Ubuntu 18.04.2 by compiling against the correct version of xserver-xorg-core packages 

Prerequisites and assumptions

We assume that you have internet connection available and that you are indeed running one of the following version of Ubuntu 

  • Ubuntu 18.04 (up to Ubuntu 18.04.2)
  • Ubuntu 18.10
  • Ubuntu 19.04 
  • We have performed the test on a Virtual Machine running on Virtual box (on Windows 2012 R2) with Sound enabled !!!
  • No additional Desktop interface will be used. The remote desktop session will display the Ubuntu tweak Gnome Desktop interface

The Script version 3.0

Important Note :

If you copy/paste the script, you might encounter some issues because font formatting might be not maintained during the copy/paste operation. Please ensure that format is  accurate before launching the script. A downloadable version of the script is available at the bottom of the post

Disclaimer : As usual, use this at your own risk !! 

#!/bin/bash
#####################################################################################################
# Script_Name : install-xrdp-3.0.sh
# Description : Perform a custom installation of xrdp
# on ubuntu 18.04 and later
# Date : May 2019
# written by : Griffon
# Web Site :http://www.c-nergy.be - http://www.c-nergy.be/blog
# Version : 3.0
# History : 3.0 - Added support for Ubuntu 19.04 
#               - New code for Look'n feel using xsessionrc method
#               - New code for enabling Sound Redirection - compiling from source 
#               - Removed -g parameter 
# : 2.4 - Proper fix for U18.04.2 when xserver-xorg-core-hwe-18.04
# changed code to detect whicht package in use and perform most appropriate compilation 
# : 2.3 - Quick Fix Ubuntu 18.04.2 issue when xserver-xorg-core-hwe-18.04 installed
# : 2.2 - Add Support for Ubuntu 18.10 and Yaru Theme
# : 2.1 - Add logic to enable sound redirection for U18.04
#       - re-write code logic to include functions
#       - Removed support for Ubuntu 17.10 as reached end of support
# : 2.0 - Initial Version for Ubuntu system with Gnome Desktop
# : 1.x - Script for Ubuntu 16.04 or later 
# Disclaimer : Script provided AS IS. Use it at your own risk....
####################################################################################################

#---------------------------------------------------#
# Detecting if Parameters passed to script .... 
#---------------------------------------------------#

while getopts s: option 
do 
case "${option}" 
in 
s) fixSound=${OPTARG};; 
esac 
done

#---------------------------------------------------#
# Script Version information Displayed #
#---------------------------------------------------#

echo
/bin/echo -e "\e[1;36m !-------------------------------------------------------------!\e[0m"
/bin/echo -e "\e[1;36m ! Custom XRDP Installation Script - Ver 3.0                   !\e[0m"
/bin/echo -e "\e[1;36m ! Written by Griffon - May 2019 - www.c-nergy.be              !\e[0m"
/bin/echo -e "\e[1;36m !-------------------------------------------------------------!\e[0m"
echo

#--------------------------------------------------------------------------#
# -----------------------Function Section - DO NOT MODIFY -----------------#
#--------------------------------------------------------------------------#

#---------------------------------------------------#
# Function 1 - Install Prereqs...
#---------------------------------------------------#

install_prereqs() {

echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Installing PreReqs packages..Proceeding.    ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo
/bin/echo -e "\e[1;33m |-| Detecting xserver-xorg-core package installed \e[0m"

xorgver=$(dpkg-query -W -f ='${Status}\n' xserver-xorg-core | awk {'print $3'})

if [[ "$xorgver" = *not-installed* ]]; 
then
# - hwe 18.04 is installed
/bin/echo -e "\e[1;32m |-| xorg package version: xserver-xorg-core-hwe-18.04 \e[0m"
echo
sudo apt-get -y install libx11-dev libxfixes-dev libssl-dev libpam0g-dev libtool libjpeg-dev flex bison gettext autoconf libxml-parser-perl libfuse-dev xsltproc libxrandr-dev python-libxml2 nasm xserver-xorg-dev-hwe-18.04 fuse pkg-config git intltool xserver-xorg-core-hwe-18.04
else
# - hwe 18.04 not installed
/bin/echo -e "\e[1;32m |-| xorg package version: xserver-xorg-core \e[0m"
echo
sudo apt-get -y install libx11-dev libxfixes-dev libssl-dev libpam0g-dev libtool libjpeg-dev flex bison gettext autoconf libxml-parser-perl libfuse-dev xsltproc libxrandr-dev python-libxml2 nasm xserver-xorg-dev fuse pkg-config git intltool xserver-xorg-core
fi

}

#---------------------------------------------------#
# Function 2 - Download XRDP Binaries... 
#---------------------------------------------------#
get_binaries() {

echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Download xRDP Binaries.......Proceeding. ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo

cd ~/Downloads

## -- Download the xrdp latest files
echo
/bin/echo -e "\e[1;32m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;32m ! Preparing download xrdp package !\e[0m"
/bin/echo -e "\e[1;32m !---------------------------------------------!\e[0m"
echo
git clone https://github.com/neutrinolabs/xrdp.git
echo
/bin/echo -e "\e[1;32m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;32m ! Preparing download xorgxrdp package !\e[0m"
/bin/echo -e "\e[1;32m !---------------------------------------------!\e[0m"
echo
git clone https://github.com/neutrinolabs/xorgxrdp.git

}

#---------------------------------------------------#
# Function 3 - compiling xrdp... 
#---------------------------------------------------#

compile_source() {

# -- Compiling xrdp package first

echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Compile xRDP packages .......Proceeding. ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo

cd ~/Downloads/xrdp
sudo ./bootstrap
sudo ./configure --enable-fuse --enable-jpeg 
sudo make

#-- check if no error during compilation

if [ $? -eq 0 ]
then 
/bin/echo -e "\e[1;33m |-| Make Operation Completed successfully \e[0m"

else 
echo
echo
/bin/echo -e "\e[1;31m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;31m ! Error while Executing make !\e[0m"
/bin/echo -e "\e[1;31m ! The Script is exiting.... !\e[0m"
/bin/echo -e "\e[1;31m !---------------------------------------------!\e[0m"
exit
fi
sudo make install

echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Compile xorgxrdp packages....Proceeding. ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo

cd ~/Downloads/xorgxrdp 
sudo ./bootstrap 
sudo ./configure 
sudo make

# check if no error during compilation 
if [ $? -eq 0 ]
then 
echo
/bin/echo -e "\e[1;33m |-| Make Operation Completed successfully \e[0m"
echo
else 
echo
/bin/echo -e "\e[1;31m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;31m ! Error while Executing make !\e[0m"
/bin/echo -e "\e[1;31m ! The Script is exiting.... !\e[0m"
/bin/echo -e "\e[1;31m !---------------------------------------------!\e[0m"
exit
fi
sudo make install

}

#---------------------------------------------------#
# Function 5 - create services .... 
#---------------------------------------------------#

enable_service() {
echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Creating xRDP services.......Proceeding. ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo

sudo systemctl daemon-reload
sudo systemctl enable xrdp.service
sudo systemctl enable xrdp-sesman.service
sudo systemctl start xrdp

}

#---------------------------------------------------#
# Function 6 - Install Gnome Tweak Tool.... 
#---------------------------------------------------#

install_tweak() 
{
echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Installing Gnome Tweak...Proceeding... ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo
sudo apt-get install gnome-tweak-tool -y
}

#--------------------------------------------------------------------#
# Fucntion 7 - Allow console Access ....
#--------------------------------------------------------------------#

allow_console() 
{
echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Granting Console Access...Proceeding... ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo
sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
}

#---------------------------------------------------#
# Function 8 - create policies exceptions .... 
#---------------------------------------------------#

create_polkit()
{
echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Creating Polkit File...Proceeding... ! \e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo

sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/45-allow.colord.pkla" <<EOF
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes

[Allow Package Management all Users]
Identity=unix-user:*
Action=org.debian.apt.*;io.snapcraft.*;org.freedesktop.packagekit.*;com.ubuntu.update-notifier.*
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF

}

#---------------------------------------------------#
# Function 9 - Fixing Theme and Extensions .... 
#---------------------------------------------------#

fix_theme()
{
echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Fix Theme and extensions...Proceeding... !\e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo
sudo sed -i.bak "4 a #Improved Look n Feel Method\ncat <<EOF > ~/.xsessionrc\nexport GNOME_SHELL_SESSION_MODE=ubuntu\nexport XDG_CURRENT_DESKTOP=ubuntu:GNOME\nexport XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg\nEOF\n" /etc/xrdp/startwm.sh
echo
}

#---------------------------------------------------#
# Function 10 - Enable Sound Redirection .... 
#---------------------------------------------------#

enable_sound()
{
echo
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
/bin/echo -e "\e[1;33m ! Enabling Sound Redirection... !\e[0m"
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m"
echo

# Step 1 - Enable Source Code Repository
sudo apt-add-repository -s 'deb http://be.archive.ubuntu.com/ubuntu/ '$codename' main restricted'
sudo apt-add-repository -s 'deb http://be.archive.ubuntu.com/ubuntu/ '$codename' restricted universe main multiverse'
sudo apt-add-repository -s 'deb http://be.archive.ubuntu.com/ubuntu/ '$codename'-updates restricted universe main multiverse'
sudo apt-add-repository -s 'deb http://be.archive.ubuntu.com/ubuntu/ '$codename'-backports main restricted universe multiverse'
sudo apt-add-repository -s 'deb http://be.archive.ubuntu.com/ubuntu/ '$codename'-security main restricted universe main multiverse'
sudo apt-get update

# Step 2 - Install Some PreReqs
sudo apt-get install git libpulse-dev autoconf m4 intltool build-essential dpkg-dev -y
sudo apt build-dep pulseaudio -y

# Step 3 - Download pulseaudio source in /tmp directory - Do not forget to enable source repositories
cd /tmp
sudo apt source pulseaudio

# Step 4 - Compile
pulsever=$(pulseaudio --version | awk '{print $2}')
cd /tmp/pulseaudio-$pulsever
sudo ./configure

# step 5 - Create xrdp sound modules
sudo git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
cd pulseaudio-module-xrdp
sudo ./bootstrap 
sudo ./configure PULSE_DIR="/tmp/pulseaudio-$pulsever"
sudo make

#Step 6 copy files to correct location (as defined in /etc/xrdp/pulse/default.pa)
cd /tmp/pulseaudio-$pulsever/pulseaudio-module-xrdp/src/.libs
sudo install -t "/var/lib/xrdp-pulseaudio-installer" -D -m 644 *.so
sudo install -t "/usr/lib/pulse-$pulsever/modules" -D -m 644 *.so
echo

}

fix_ssl() 
{ 
echo 
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m" 
/bin/echo -e "\e[1;33m ! Fixing SSL Cert Issue ... !\e[0m" 
/bin/echo -e "\e[1;33m !---------------------------------------------!\e[0m" 
echo sudo adduser xrdp ssl-cert 
}

#--------------------------------------------------------------------------#
# -----------------------END Function Section -----------------#
#--------------------------------------------------------------------------#

#--------------------------------------------------------------------------#
#------------ MAIN SCRIPT SECTION -------------------# 
#--------------------------------------------------------------------------#

#---------------------------------------------------#
# Step 0 - Try to Detect Ubuntu Version.... 
#---------------------------------------------------#

version=$(lsb_release -sd) 
codename=$(lsb_release -sc)

echo
/bin/echo -e "\e[1;33m |-| Detecting Ubuntu version \e[0m"

if [[ "$version" = *"Ubuntu 18.04"* ]];
then
/bin/echo -e "\e[1;32m |-| Ubuntu Version : $version\e[0m"
echo
elif [[ "$version" = *"Ubuntu 18.10"* ]];
then
/bin/echo -e "\e[1;32m |-| Ubuntu Version : $version\e[0m"
echo
elif [[ "$version" = *"Ubuntu 19.04"* ]];
then
/bin/echo -e "\e[1;32m |-| Ubuntu Version : $version\e[0m"
echo
else
/bin/echo -e "\e[1;31m !------------------------------------------------------------!\e[0m"
/bin/echo -e "\e[1;31m ! Your system is not running Ubuntu 18.04 Edition and later !\e[0m"
/bin/echo -e "\e[1;31m ! The script has been tested only on Ubuntu 18.04 and later !\e[0m"
/bin/echo -e "\e[1;31m ! The script is exiting... !\e[0m" 
/bin/echo -e "\e[1;31m !------------------------------------------------------------!\e[0m"
echo
exit
fi

/bin/echo -e "\e[1;33m |-| Detecting Parameters \e[0m"

#Detect if argument passed
if [ "$fixSound" = "yes" ]; 
then 
/bin/echo -e "\e[1;32m |-| Sound Redirection Option...: [YES]\e[0m"
else
/bin/echo -e "\e[1;32m |-| Sound Redirection Option...: [NO]\e[0m"
fi

#---------------------------------------------------------#
# Step 1 - Executing the installation & config tasks .... #
#---------------------------------------------------------#

echo
/bin/echo -e "\e[1;36m !-------------------------------------------------------------!\e[0m"
/bin/echo -e "\e[1;36m ! Installation Process starting.... !\e[0m"
/bin/echo -e "\e[1;36m !-------------------------------------------------------------!\e[0m"
echo
/bin/echo -e "\e[1;33m |-| Proceed with installation..... \e[0m"
echo

install_prereqs
get_binaries
compile_source
enable_service
install_tweak
allow_console
create_polkit
fix_theme
fix_ssl

if [ "$fixSound" = "yes" ]; 
then 
enable_sound
fi

#---------------------------------------------------#
# Step 2 - Credits .... 
#---------------------------------------------------#
echo
/bin/echo -e "\e[1;36m !-----------------------------------------------------------------------!\e[0m"
/bin/echo -e "\e[1;36m ! Installation Completed                                                !\e[0m"
/bin/echo -e "\e[1;36m ! Please test your xRDP configuration.A Reboot Might be required...     !\e[0m"
/bin/echo -e "\e[1;36m ! Written by Griffon - April 2019 - 3.0 - Install-xrdp-3.0.sh           !\e[0m"
/bin/echo -e "\e[1;36m !-----------------------------------------------------------------------!\e[0m"
echo

 

How to Use the Script

The script usage has not changed since the previous version.  So, instead of repeating the same information, we will summarize the necessary actions and options that are available with this version of the script.

Step 1 – Set Execute Right on the script

Download the install-xrdp-3.0.sh script to your system.  You need to mark the script as executable . To do this, perform the following action in a terminal console

chmod +x  ~/Downloads/install-xrdp-3.0.sh

Note : Adjust the path where the install-xrdp-3.0.sh script to reflect your environment

Step 2 – How to execute the script ? 

Like the previous version of the script, you can decide to execute the script with no parameters to perform a “standard installation”.  This installation mode will not compile the xrdp sound modules need to support sound redirection.  

Before running it, ensure that internet connection is available (so you can download the necessary packages needed for the installation) 

Standard way

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 

 ./install-xrdp-3.0.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….

When the script has finished, we recommend to reboot the system.  After the reboot, a user should be able to perform a remote connection to the Ubuntu machine and will be presented with the Ubuntu Gnome Desktop interface with the Dock bar and the appropriate Yaru theme enabled.  This installation will not configure sound redirection feature.   However, if at a later stage, you want to implement the Sound redirection option, you could re-run the script and pass the parameters to enable the options selected.   The script will re-run and pass the new parameters and your system should be working with the additional features enabled. 

Enabling Sound redirection 

To enable sound redirection features within your remote desktop session,  it’s possible to pass the -s parameter to the script.  In other words, in order to enable sound redirection at installation time, you will need to execute the following syntax

./install-xrdp-3.0.sh -s yes

When script execution is completed, the machine will not reboot so you can review the installation and detect possible elements that’s preventing the script execution.  At completion, it’s recommended to reboot the machine so the changes made to the system can be applied accordingly. 

Step 3 – Test your configuration 

After a good reboot, you should be able to test your configuration.  Using your favourite remote desktop client, perform a connection.  You will be presented with the green login page from xRDP.  Provide your credentials and if everything is working as expected, you should see your Ubuntu Desktop interface loading and you are ready to go and perform your work on the remote machine. 

As a reminder, the same user can be connected either on the local machine or on the remote machine, not both at the same time.  If a user is locally connected, and the same user tries to perform a remote desktop connection, the process will fail…If you disconnect from your remote session, you can reconnect to the same session and proceed with your work…. 

 

Download the Script 

Please download the script :  install-xrdp-3.0.sh

Final Notes

This is it for this post ! 

Out of the box, it’s possible to install the xrdp package and obtain the basic functionality (i.e. perform a remote desktop connection to an Ubuntu computer).   However, look’n feel and the user experience with the default installation is not optimal.  This is why we came up with the scripted installation approach. The scripted installation basically perform the additional configuration steps that would improve the user experience and increase user acceptance.    So far, we have maintained 2 scripts. 

  • The Std-install-xrdp-xx.sh script is using the xRDP packages found in Ubuntu repositories to perform the installation and then post configuration actions are executed as well 
  • The Install-xrdp-xx.sh script is compiling from sources xRDP packages and then perform post configuration actions. 

The Std install script and the custom install script have been updated and the code has been reviewed in order to include all the new ways of configuring an Ubuntu machine in order to use xRDP and have the best user experience.  We are already looking forward and preparing new version of the script (Ubuntu 18.10 end of support – Ubuntu 19.10 coming, Ubuntu 20.04 LTS…). We still have some ideas and topics we haven’t talked about it which could be integrated into the next version of the script…. 

Next version of the script(s) might be full of surprise….:-)  

Stay tuned  

That’s is for today 

Till next time 

 

 

 

 

 

 

 

 

  •  

 

 

 

 

 

7 thoughts on “xRDP – Custom Installation Script Version 3.0 (Ubuntu 18.04,18.10 & 19.04)

  1. Hello Griffon,

    Thanks for the great script !!
    Version 3.0 is no longer available for download.
    I changed the path to 3.1 and was able to download the next version.
    But…
    The script stops shortly before the end.
    ./bootrap
    ./configure
    make
    Does not work because it executes the commands at wrong folder
    Maybe this will help you!
    Thank you for all your work!
    Chris

  2. @Chris,

    Thank you for notifying us :-). We have updated the link and now the download link should be pointing to the correct version
    About the error ! can you provide us a screenshot or tell us at which level the script is failing (when compiling xrdp or xorgxrdp) ? Do you have have internet connection on the machine and which folder is missing… would it be the xrdp folder because the source was not downloaded

    Thank again for letting us know and if you can provide us with the requested info, this would be great so we can fix any issues with this script

    Till next time
    See ya

  3. Hello Griffon,

    It would be my pleasure to help you.
    Thanks for your quick reply.

    What did not work.
    The VM (Ubuntu 18.10 incl. All updates) has Internet access.

    Step by step
    chmod + x /Install-xrdp-3.0.sh
    sudo ./install-xrdp-3.0.sh

    After a short time this message appears:

    ./Install-xrdp-3.0.sh: Zeile 126: cd: /root/Downloads/xrdp: Datei oder Verzeichnis nicht gefunden
    sudo: ./bootstrap: Befehl nicht gefunden
    sudo: ./configure: Befehl nicht gefunden
    make: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden. Schluss.

    !———————————————!
    ! Error while Executing make !
    ! The Script is exiting…. !
    !———————————————!

    He is looking for a directory called “bootstrap” but this is not in the folder of the installation script, the directory is under the automatically create subfolder xrdp.

    ./xrdp/.bootstrap

    Which logs do you need?
    Does the script create a log file?

    Greetings!

  4. Line 126:

    cd ~/Downloads/xrdp
    sudo ./bootstrap
    sudo ./configure –enable-fuse –enable-jpeg
    sudo make

    I think so:
    He indicates that the data is expected under “Downloads”.
    My script is in the home directory – not under “Downloads”

    So the mistake lies in the fact that the script must be in the download folder in order for the installation to work properly?

  5. After moving it into Download:

    root@srv1:/home/c-0309# sudo ./Install-xrdp-3.0.sh

    !————————————————————-!
    ! Custom XRDP Installation Script – Ver 3.0 !
    ! Written by Griffon – May 2019 – http://www.c-nergy.be !
    !————————————————————-!

    |-| Detecting Ubuntu version
    |-| Ubuntu Version : Ubuntu 18.10

    |-| Detecting Parameters
    |-| Sound Redirection Option…: [NO]

    !————————————————————-!
    ! Installation Process starting…. !
    !————————————————————-!

    |-| Proceed with installation…..

    !———————————————!
    ! Installing PreReqs packages..Proceeding. !
    !———————————————!

    |-| Detecting xserver-xorg-core package installed
    |-| xorg package version: xserver-xorg-core

    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut.
    Statusinformationen werden eingelesen…. Fertig
    autoconf ist schon die neueste Version (2.69-11).
    bison ist schon die neueste Version (2:3.0.4.dfsg-1ubuntu1).
    flex ist schon die neueste Version (2.6.4-6.2).
    fuse ist schon die neueste Version (2.9.8-1ubuntu1).
    libfuse-dev ist schon die neueste Version (2.9.8-1ubuntu1).
    libjpeg-dev ist schon die neueste Version (8c-2ubuntu8).
    libtool ist schon die neueste Version (2.4.6-4).
    libx11-dev ist schon die neueste Version (2:1.6.7-1).
    libxfixes-dev ist schon die neueste Version (1:5.0.3-1).
    libxml-parser-perl ist schon die neueste Version (2.44-2build3).
    libxrandr-dev ist schon die neueste Version (2:1.5.1-1).
    pkg-config ist schon die neueste Version (0.29.1-0ubuntu2).
    python-libxml2 ist schon die neueste Version (2.9.4+dfsg1-7ubuntu1).
    intltool ist schon die neueste Version (0.51.0-5ubuntu1).
    nasm ist schon die neueste Version (2.13.03-2).
    gettext ist schon die neueste Version (0.19.8.1-8ubuntu0.1).
    git ist schon die neueste Version (1:2.19.1-1ubuntu1.1).
    libpam0g-dev ist schon die neueste Version (1.1.8-3.6ubuntu3).
    libssl-dev ist schon die neueste Version (1.1.1-1ubuntu2.2).
    xserver-xorg-core ist schon die neueste Version (2:1.20.1-3ubuntu2.1).
    xserver-xorg-dev ist schon die neueste Version (2:1.20.1-3ubuntu2.1).
    xsltproc ist schon die neueste Version (1.1.32-2ubuntu0.1).
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

    !———————————————!
    ! Download xRDP Binaries…….Proceeding. !
    !———————————————!

    ./Install-xrdp-3.0.sh: Zeile 94: cd: /root/Downloads: Datei oder Verzeichnis nic ht gefunden

    !———————————————!
    ! Preparing download xrdp package !
    !———————————————!

    fatal: Zielpfad ‘xrdp’ existiert bereits und ist kein leeres Verzeichnis.

    !———————————————!
    ! Preparing download xorgxrdp package !
    !———————————————!

    fatal: Zielpfad ‘xorgxrdp’ existiert bereits und ist kein leeres Verzeichnis.

    !———————————————!
    ! Compile xRDP packages …….Proceeding. !
    !———————————————!

    ./Install-xrdp-3.0.sh: Zeile 126: cd: /root/Downloads/xrdp: Datei oder Verzeichn is nicht gefunden
    sudo: ./bootstrap: Befehl nicht gefunden
    sudo: ./configure: Befehl nicht gefunden
    make: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden. Schluss.

    !———————————————!
    ! Error while Executing make !
    ! The Script is exiting…. !
    !———————————————!
    root@srv1:/home/c-0309# ^C
    root@srv1:/home/c-0309# cd Down
    bash: cd: Down: Datei oder Verzeichnis nicht gefunden

  6. The script switches between the users root and c-0309.

    That seems to be the problem!
    I do not run the script as c-0309 but as root.

    Would it be better to work with the user c-0309 and then with the command “sudo”?

  7. @Chris,

    Sorry for the delay… indeed, the script is designed to run as a standard user and no root account (this is security best practice).. Thank to your feedback, we might update the script again and try to catch this situation
    Thanks for the feedback and till next time

    See ya

Leave a Reply