XRDP – Enabling Drives Redirection Feature & Clipboard

Hello World,

In our previous post, we have seen how we could include Drives Redirection support while using xRDP software. This was one of the most wanted feature that was requested by xRDP users.  These features were already supported since a long time in xRDP as long as you were using the x11RDP software as backend infrastructure.

In our previous post, we have demonstrated how we could enable drives redirection while using the standard x11vnc software in conjunction with xRDP.  This combination (x11vnc and xrdp) does not seem to provide clipboard support.  

To have the drives redirection and clipboard feature working, you need to have the backend infrastructure to support the extensions used by the xRDP software to provide such capabilities.  In the past, the only option was to use the x11RDP solution.  However, the team behind the xrdp software solution has come with a new rdp driver module that support drives redirection and clipboard support. Using this module, there is no need to compile or recompile the X11R6 or the X11RDP binaries (for more information see  this link)

To have drives redirection and clipboard support available within the xrdp session, there is a need to perform a custom installation of xRDP.  For some time now, we have provided a scripted solution that really simplifies the custom installation of the xRDP software solution

The script provided below will compile all the necessary modules including the new rdp driver module necessary to enable drives redirection and clipboard support.  The script will configure your system to use the new rdp driver module as default when performing your xRDP connection.  However, the script also provide backward compatibility meaning that you will be able to connect to your xRDP session via the standard Xvnc session manager as well.

Let’s check this new version of our xrdp-install.sh script and check what’s new…..

The Custom Installation Script (version 1.7)

Assumptions

Before running this script, be aware of the following assumptions

  • We have tested the script on Ubuntu 16.04 Beta
  • We are installing Mate-Desktop as alternative Desktop.  If you want to use another, you will have to update the script provided hereafter
  • We have performed the test on a Virtual Machine running on Hyper-V Server and Virtualbox
  • Your virtual machine is connected to Internet (so you can download the necessary packages for the installation to occur). If you are not connected to internet, you can still manually download the xrdp package and modify the install-xrdp-1.7.sh script accordingly

Previous Script versions

Version 1.7 includes the necessary logic to perform a custom xRDP installation which will include Drives Redirection and Clipboard options while using the new Session Manager option.  This version of the script provides Drives Redirection (only) if you decide to choose the standard x11vnc session manager option in the xRDP login page.

Version 1.6 includes the necessary logic to perform a custom xRDP installation which will include Drives Redirection while using the standard x11vnc session manager.

Version 1.5 included the possibility to configure automatically the keyboard layout to be used during xrdp session (experimental).

The script version 1.7

The script can be downloaded. A link has been made available at the end of this post  

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.

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

################################################################
# Script_Name : xrdp-install.sh
# Description : Perform an automated custom installation of xrdp
# on ubuntu 15.04 or later when systemd is used
# Date : April 2016
# written by : Griffon
# Web Site :http://www.c-nergy.be - http://www.c-nergy.be/blog
# Version : 1.7
#
# Disclaimer : Script provided AS IS. Use it at your own risk....
#
##################################################################
 
##################################################################
#Step 1 - Install prereqs for compilation
##################################################################
 
echo "Installing prereqs for compiling xrdp..."
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

#Install git 
echo "Installing git software..."
sudo apt-get -y install git 
 
 
##################################################################
#Step 2 - Install the desktop of you choice
################################################################## 
 
#Here, we are installing Mate Desktop environment 

echo "Installing alternate desktop to be used with xrdp..."
echo "----------------------------------------------------"
sudo apt-get -y update
sudo apt-get -y install mate-core mate-desktop-environment mate-notification-daemon --force-yes
echo "Desktop Install Done"
 

##################################################################
#Step 3 - Obtain xrdp packages and xorgxrdp packages
################################################################## 
 
#-Go to your Download folder
echo "Moving to the ~/Download folders..."
echo "-----------------------------------"
cd ~/Downloads

#Download the xrdp latest files
echo "Ready to start the download of xrdp package"
echo "-------------------------------------------"
git clone https://github.com/neutrinolabs/xrdp.git

#move to xorgxrdp folder and download needed packages
cd xrdp/
git clone https://github.com/neutrinolabs/xorgxrdp.git
 
##################################################################
#Step 4 - compiling xorgxrdp packages
################################################################## 
cd xorgxrdp 
sudo ./bootstrap 
sudo ./configure 
sudo make
sudo make install
cd ..

##################################################################
#Step 5 - Fallback scenario - using x11vnc sesman
################################################################## 
 
#Install the X11VNC
echo "Installing X11VNC..."
echo "----------------------------------------"
sudo apt-get -y install x11vnc

#Add/Remove Ubuntu xrdp packages (used to create startup service)

echo "Add/Remove xrdp packages..."
echo "---------------------------"
sudo apt-get -y install xrdp
sudo apt-get -y remove xrdp
 
##################################################################
#Step 6 - compiling xrdp packages
################################################################## 
 
#Compile and make xrdp

echo "Installing and compiling xrdp..."
echo "--------------------------------"

# needed because libtool not found in Ubuntu 15.04 and later
# Need to use libtoolize

sudo sed -i.bak 's/which libtool/which libtoolize/g' bootstrap

sudo ./bootstrap
sudo ./configure --enable-fuse --enable-jpeg
sudo make
sudo make install

#Final Post Setup configuration
echo "---------------------------"
echo "Post Setup Configuration..."
echo "---------------------------"

echo "Set Default xVnc-Sesman"
echo "-----------------------"

sudo sed -i.bak '/\[xrdp1\]/i [xrdp0] \nname=SessionManager-Griffon \nlib=libxup.so \nusername=ask \npassword=ask \nip=127.0.0.1 \nport=-1 \nxserverbpp=24 \ncode=20 \n' /etc/xrdp/xrdp.ini

echo "Symbolic links for xrdp"
echo "-----------------------"

sudo mv /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh
sudo mkdir /usr/share/doc/xrdp
sudo cp /etc/xrdp/rsakeys.ini /usr/share/doc/xrdp/rsakeys.ini

## Needed in order to have systemd working properly with xrdp
echo "-----------------------"
echo "Modify xrdp.service "
echo "-----------------------"

#Comment the EnvironmentFile - Ubuntu does not have sysconfig folder
sudo sed -i.bak 's/EnvironmentFile/#EnvironmentFile/g' /lib/systemd/system/xrdp.service

#Replace /sbin/xrdp with /sbin/local/xrdp as this is the correct location
sudo sed -i.bak 's/sbin\/xrdp/local\/sbin\/xrdp/g' /lib/systemd/system/xrdp.service
echo "-----------------------"
echo "Modify xrdp-sesman.service "
echo "-----------------------"

#Comment the EnvironmentFile - Ubuntu does not have sysconfig folder
sudo sed -i.bak 's/EnvironmentFile/#EnvironmentFile/g' /lib/systemd/system/xrdp-sesman.service

#Replace /sbin/xrdp with /sbin/local/xrdp as this is the correct location
sudo sed -i.bak 's/sbin\/xrdp/local\/sbin\/xrdp/g' /lib/systemd/system/xrdp-sesman.service

#Issue systemctl command to reflect change and enable the service
sudo systemctl daemon-reload
sudo systemctl enable xrdp.service

# Set keyboard layout in xrdp sessions
cd /etc/xrdp 
test=$(setxkbmap -query | awk -F":" '/layout/ {print $2}') 
echo "your current keyboard layout is.." $test
setxkbmap -layout $test
sudo cp /etc/xrdp/km-0409.ini /etc/xrdp/km-0409.ini.bak
sudo xrdp-genkeymap km-0409.ini

## Try configuring multiple users system 
sudo sed -i.bak '/set -e/a mate-session' /etc/xrdp/startwm.sh
 
echo "Restart the Computer"
echo "----------------------------"
sudo shutdown -r now

If you have a quick look at the script, you will see that there is a step 4 header.  As explained earlier, to include drives redirection and clipboard support, we need to use the new rdp driver module. The step 4 shows you how to compile and install this new rdp module

How to use this Script (version 1.7)

We will not repeat what has been already explained in our previous posts.  We provide here a quick explanation on how to use the script and run it. 

You first need to grab a copy of this script.  To avoid formatting issues, we have made the script available for download.  The download link is available at the end of this post.  

Then you have to mark the script as executable.  You can do this using the command line  by issuing the following command  chmod +x  ~/Downloads/xrdp-install-1-7.sh (adapt the path to reflect path location)

To execute the script, simply open your terminal console, navigate to the folder where the file is located and issue the following command

sudo ./xrdp-install-1-7.sh

As mentioned before,  we assume that you have internet connection and you will be able to download all the necessary packages needed to perform this configuration.

Note : The script will download the necessary files under the ~/Download folders.

Wait for completion of the script.  The machine will reboot automatically when done.  The operation can take up to 30 minutes to complete

Test your xRDP Connection

Grab the ip address or name of the linux machine, go to your windows machine and start your remote desktop client.

xrdp_redir_2

Click on picture for better resolution

If everything has been running as expected, you will see the xrdp login screen displayed.  In the drop down box, the option SessionManager-Griffon should be selected.  Do not change this option. Provide your user account and password and proceed.

xrdp_redir_1

Click on picture for better resolution

When the login process has been completed, you will access your MATE Desktop through the rdp client. Mate-desktop has been customized and we are using the mutiny feature to have the remote session looking similar to the console session where unity is used  (to see how to use mutiny, see this post).

xrdp_redir_3

Click on picture for better resolution

 

Note :  

The script has configured your system to use by default the SessionManager-Griffon session manager.  Note that if there is a need, you can also decide to perform a remote desktop connection to your Ubuntu machine and select from the xRDP login dropdown box the Xvnc-Sesman option. You should be able to connect using either default option or the Xvnc-Sesman option

 

Test your Drives redirection and Clipboard support

The first time you connect to your remote Ubuntu computer via xRDP, the clipboard feature should be working immediately.  Clipboard feature allow you to copy/paste files between your Windows machine and your Linux remote session.  The clipboard function does not seem to support drag and drop.

Based on your remote desktop client configuration settings, it’s possible that you will see the thin_clients icon on your Ubuntu desktop (while connected through xRDP) but that no drives have been redirected to your system.

xrdp_redir_6

Click on picture for better resolution

To redirect your drives to your xrdp remote session, you have to ensure that the only option selected in the local resources tab are the Clipboard option and the drive option.  Check the screenshot below and ensure that you have the same settings.

xrdp_redir_4

Click on picture for better resolution

xrdp_redir_5

Click on picture for better resolution

When these settings have been set accordingly, you should see the thin client folder populated with redirected drives coming from your Windows machine.

Minor Issues & fixes

Ubuntu Theme not set when you login locally to Ubuntu

Because we have installed the mate-desktop (via the script) on the Ubuntu system, when you login back to the Ubuntu machine interactively (not via the xrdp software), you will notice that the look’n feel of your system has changed a little bit. You might end up with a system that look like the following

U16_Xrdp_4

Click on picture for better resolution

To fix it, simply set back the theme to the default one (i.e. Ambiance) and you should be back to normal.

U16_Xrdp_6

Click on picture for better resolution

After a few seconds, you should see the familiar look n feel of your Ubuntu desktop

U16_Xrdp_7

Click on picture for better resolution

Keyboard layout in Session Manager

There is another small issue if you are using the session manager option in the xrdp login box.  During the login box, the keyboard layout you have set will be configured correctly.  However, when working in your remote desktop session, the keyboard layout might be different to the one you have configured on your Ubuntu system.

To fix that, you will simply need to add the keyboard layout you want to use during your remote desktop session and you will be able to switch between keyboard layout.  This operation can be performed inside the remote desktop session and changes will not get lost if you reboot your system.

 

Download Script

For your convenience, we are providing a downloadable version of the script. You can find it here

Final Notes

This conclude our post related to xRDP, rdp driver module and the possibility to use drive redirections and clibpoard feature in a mixed infrastructure.  As these features are really requested by a lot of users, we hope that the scripts and information provided through this blog can help them

I hope you enjoyed these posts

Till next time

See ya

 

 

80 thoughts on “XRDP – Enabling Drives Redirection Feature & Clipboard

  1. @Madec Antoine,

    In the past, it was a known issue that some keyboard key would not work as expected,
    You can try to follow the following post (see http://c-nergy.be/blog/?p=3858). At the bottom of the post, you have some ready to use ini file. If your language layout match one of these, give it a try and let us know if they are still valid

    Hope this Help
    Till next time
    See ya

  2. @Griffon

    Thanks you so much, but as previously said this is not a keyboard layout issue.
    I am using a regular qwerty keyboard (US), my name is french but I’m currently working in the US.
    I bought a dell laptop at best buy in the US. Nothing more standard :p

    Here are more clues of what the issue might be:
    – xrdp 0.6 with Gnome: ctrl+arrow are working fine
    – using your script + ini file of the previous working xrdp: ctrl+arrow still does not work
    – using your script: ctrl+alt+ works perfectly
    – using your script: in terminator (terminal), alt+arrow works perfectly
    – using your script: when trying to edit a shortcut with ctrl+alt+arrow, nothing happens like I am not pressing anything on the keyboard
    – the host is an uptodate Ubuntu 16.04, except for the 1st working test with xrdp where it is a centOS 5
    – the machine I launch rdp from is an uptodate Windows10 64bit
    – my laptop is a DELL inspiron 13″ 7368, us keyboard

    So far I have to use ctrl+super+arrow to switch workspaces and it is still a great UX.
    Once again, thanks for the script. If I find the cause of this issue I will keep you posted.

    Cheers,
    Antoine

  3. @Antoine,

    Merci pour le feedback… Quand on aura un peu de temps; on essayera de mettre a jour les fichiers ini
    Thank for the feedback and sharing your findings…

    Till next time
    See ya

  4. Thank you for the script, it is great!
    Used your script to install everything on Ubuntu 16.04.1 LTS
    The clipboard works fine for text. But for some reason I’m unable to copy files from windows pc to ubuntu, copy from windows and then paste at ubuntu does not work it simply greyed out. Vice versa (ubuntu to windows) works fine.
    I also found out thinclient_drivers which is mount to the desktop. I can browse files but when I press ctrl+copy it completely hangs file manager in ubuntu. I’m not able to open additional window of file manager. Other programs continue to work. And I’m not able to log in through RDP once again to ubuntu.
    Copy to windows PC using thinclient_drivers works fine.

    What could be the problem?

    Best regards.

  5. @Vasily,

    It can happen indeed that the drive redirection and clipboard functionalities are not always working as expected. Rebooting the system usually fix the issue till next time.
    We will look into the issue and try to provide some useful tips… Redirection and Clipboard capability is becoming requested more and more and we are expecting to see more issues which should lead to improvements

    Till next time
    See ya

  6. I’ve got en error on Step 4 – compiling xorgxrdp packages
    ##################################################################.
    sudo ./bootstrap.
    sudo ./configure.
    sudo make

    Screenshot:
    http://vbios.com/tmp/ss/20161113-011510.png

    ———————————
    libtool: error: ignoring unknown tag NASM
    libtool: compile: ./nasm_lt.sh nasm -felf64 -DELF -D__x86_64__ -I. -I. amd64/yv12_to_rgb32_amd64_sse2.asm -fPIC -DPIC -o amd64/.libs/yv12_to_rgb32_amd64_sse2.o
    nasm -felf64 -DELF -D__x86_64__ -I./ -I./ amd64/yv12_to_rgb32_amd64_sse2.asm -DPIC -o amd64/.libs/yv12_to_rgb32_amd64_sse2.o
    amd64/yv12_to_rgb32_amd64_sse2.asm:256: fatal: expected `%endif’ before end of file
    Makefile:863: recipe for target ‘amd64/yv12_to_rgb32_amd64_sse2.lo’ failed
    make[1]: *** [amd64/yv12_to_rgb32_amd64_sse2.lo] Error 1
    make[1]: Leaving directory ‘/home/anr/Downloads/xrdp/xorgxrdp/module’
    Makefile:410: recipe for target ‘install-recursive’ failed
    make: *** [install-recursive] Error 1
    —————————————-

    Ubuntu 16.04.1 LTS

    Someone can help me?
    Thank you.

  7. @Kit;

    Didn’t got this kind of error (or did not notice)
    The question is now… have you proceed with the installation even with the error or the error is blocking the rest of the process ?
    We have seen that in some cases nasm related error can be ignored (used for backward compatibility) and installation is just processing fine and xrdp is working nicely..

    Please note that with Ubuntu 16.10, you can have the redirection feature enabled by default as this version ship with xrdp 0.9.0
    Have a look at

    http://c-nergy.be/blog/?p=10165 to install xrdp on Ubuntu 16.10 and using Mate Desktop as Alternate Desktop
    or
    http://c-nergy.be/blog/?p=10196 to install xrdp on Ubuntu 16.10 and try to use Unity Desktop as default desktop in Remote session

    Hope this Help
    Till Next Time

    See ya

  8. I have been trying for ages to get copy/paste working in remote desktop between Windows and a remote Debian machine. Your script works great! Thank you.

    Windows 8, Debian 8.6

  9. Kit>> I’ve got en error on Step 4 – compiling xorgxrdp packages

    Screen shot shows “fatal: expected ‘%endif’ before end of file”. I got the same on the latest git from xrdp. Look in “yv12_to_rgb32_amd64_ses2.asm”. Mine had a “#endif” instead of “%endif”. Changed it and now it complies.

    Sorry if this is stated wrong. I’m new at all this Linux stuff.

  10. @Ted,

    Thank you for the feedback and the visit in our blog
    We always happy to see that the info provided here can be useful in some ways

    Till next time
    See ya

  11. @HornBlower,

    Thank you for sharing your experience with us. We are glad that your problem has been solved and you can enjoy your new xrdp installation….

    Till next time
    See ya

  12. @Leonid,

    We are sorry to hear that the script did not work for you… We have really few users reporting about the failure… Have you run the script based on the described scenario (tested on Ubuntu only and not any other flavors,…)
    Can you check why you cannot connect to your xrdp server anymore ? Is the service not starting anymore ?

    Till next time
    See ya

  13. hello, i have try your script, but sadly, it dont work anymore :/

    I try it from a fresh 16.04 serveur, and hade somme issue
    i have install all dependencies required that i missed like make etc… but during install, when configure the xorg, it tell me there is no xrdp 0.9. i had to compile xrdp before i can compile xorg

    for the “Set Default xVnc-Sesman, i had to change “\[xrdp1\]” by “\[x11rdp\]/i

    but still, when i try log, nothing happen, it accept my login/pass, but stay on the blue background screen …

    help would be appreciate !!

    ps :
    also i have see you use
    #Script_Name : xrdp-install.sh
    when the file i have download is install-xrdp.sh, not big deal ^^

  14. feeel soooo stupid !
    do that as root dont work, need
    i hade do “echo unity > ~/.xsession” as root… and login rdp using another account
    log as user, then “echo unity > ~/.xsession” and voila !

  15. @Ender,

    We see that your problem is solved if you run it as root. However, thank you for letting us know that you had some issues with the script
    Your comments will force us to check the script and to update it as there is a lot of changes that happened on the XRDP side

    Thank you for the visit and stay tuned for updated info
    Till next time
    See ya

  16. This script is not working for fresh installation because the xorgxrdp has dependency on xrdp package.
    You will failed on the configure of xorgxrdp by following error:

    configure: error: Package requirements (xrdp >= 0.9.0) were not met:
    No package ‘xrdp’ found
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    Alternatively, you may set the environment variables XRDP_CFLAGS
    and XRDP_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    Try to go back script 1.5 which has no xorgxrdp involved.

  17. @Brian,

    This version of the script is not working out of the box as a lot of changes occured in the xrdp software.. A new version has been released where new instructions needs to be executed…. the script would work if you define the path of the xrdp package in the PKG_CONFIG_PATH….Nevertheless, thank you for letting us know…
    We will need to update all our information about xrdp as there is a lot of changes ongoing….

    Stay tuned for updated and new version of the scripts and step by step guides
    Till next time
    See ya

  18. could you provide with a roll-back script in order to uninstall all this xrdp set-up? It didn’t work for me, just messed my former xrdp set-up 🙁

  19. @Beri,
    sorry it didn’t work for you 🙁
    We do not have an roll-back script yet…. we still need to adapt our initial script to fix this….
    By the way, this script was a little bit old as it was tested only on Ubuntu 16.04 beta version
    a newer version of the scrit (still with no rollback capabilities) can be find here http://c-nergy.be/blog/?p=10513
    You can try to run it and see if this would fix your issues
    this includes the drive redirections as well

    Hope this help
    till next time
    See Ya

  20. I’m tried it on my headless Raspberry Pi
    This script totally destroyed xrdp working for me.
    It worked fine out of the box with “apt-get install xrdp”, but the clipboard didnt to its work so I uninstalled it and tried to install it with your script ot make that work.

    Then I had lots of problems where the login screen would stay blank (seemed like not being able to connect to the sesman or to the desktop).
    Now I tried to uninstall everything installed with your script and carefully removed all files connected to xrdp.

    But now I can’t install it anymore “A dependency job for xrdp.service failed. See ‘journalctl -xn’ for details.” where it points me to some sesman problem “PID file /var/run/xrdp-sesman.pid not readable (yet?) after start.”

  21. @Johan,
    Normally to get rid of xrdp while performing the custom installation, you should perform the following actions
    To completely remove xrdp
    remove directory /usr/local/xrdp
    remove directory /etc/xrdp
    remove file /var/run/xrdp.pid
    remove file /var/run/sesman.pid
    remove any startup links added to /etc/init.d or /etc/rcX.d

    The post you referring is a little bit outdated and you should have a look at the following ones

    http://c-nergy.be/blog/?p=10513
    http://c-nergy.be/blog/?p=10144
    http://c-nergy.be/blog/?p=10165

    Please note also we never tried the script on a raspberry box and we do not know which os you are running as well….

    Hope this help
    till next time
    See ya

  22. Hi Griffon,

    Thanks your script.
    I am using Ubuntu-16.04, now the “xrdp” and “xorgxrdp” default Exec Path is /usr/local/sbin/xrdp

    ExecStart=/usr/local/sbin/xrdp $XRDP_OPTIONS
    ExecStop=/usr/local/sbin/xrdp $XRDP_OPTIONS –kill

    There is no need to do the following in the script.

    #Replace /sbin/xrdp with /sbin/local/xrdp as this is the correct location
    sudo sed -i.bak ‘s/sbin\/xrdp/local\/sbin\/xrdp/g’ /lib/systemd/system/xrdp.service

    The xrdp will not launch correctly after modify the PATH.

  23. @FredLien,

    Hello Thank you for the feedback…we have indeed noticed that the script is not up to date anymore because xrdp team has been releasing new versions quickly lately which changed the xrdp install behavior
    We have taken into account your comment and included in the new release of the script

    Till next time
    See ya

  24. hi,
    I have tried to run the script on ubuntu 16.04 LTS but it was break.
    it seems that it fails in the last step. it has some bugs there.
    if u have an idea how can I solve it?
    thx!
    Eli.

    This is the stdout I am getting:

    Installing prereqs for compiling xrdp…
    —————————————-
    Reading package lists…
    Building dependency tree…
    Reading state information…
    autoconf is already the newest version (2.69-9).
    bison is already the newest version (2:3.0.4.dfsg-1).
    flex is already the newest version (2.6.0-11).
    gettext is already the newest version (0.19.7-2ubuntu3).
    libjpeg-dev is already the newest version (8c-2ubuntu8).
    libpam0g-dev is already the newest version (1.1.8-3.2ubuntu2).
    libtool is already the newest version (2.4.6-0.1).
    libx11-dev is already the newest version (2:1.6.3-1ubuntu2).
    libxfixes-dev is already the newest version (1:5.0.1-2).
    libxml-parser-perl is already the newest version (2.44-1build1).
    libxrandr-dev is already the newest version (2:1.5.0-1).
    nasm is already the newest version (2.11.08-1).
    fuse is already the newest version (2.9.4-1ubuntu3.1).
    libfuse-dev is already the newest version (2.9.4-1ubuntu3.1).
    libssl-dev is already the newest version (1.0.2g-1ubuntu4.8).
    python-libxml2 is already the newest version (2.9.3+dfsg1-1ubuntu0.2).
    xserver-xorg-dev is already the newest version (2:1.18.4-0ubuntu0.2).
    xsltproc is already the newest version (1.1.28-2.1ubuntu0.1).
    0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
    Installing git software…
    Reading package lists…
    Building dependency tree…
    Reading state information…
    git is already the newest version (1:2.7.4-0ubuntu1.1).
    0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
    Installing alternate desktop to be used with xrdp…
    —————————————————-
    Hit:1 http://il.archive.ubuntu.com/ubuntu xenial InRelease
    Hit:2 http://il.archive.ubuntu.com/ubuntu xenial-updates InRelease
    Hit:3 http://il.archive.ubuntu.com/ubuntu xenial-backports InRelease
    Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
    Hit:5 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease
    Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [54.7 kB]
    Get:7 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64×64 Icons [50.2 kB]
    Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [35.8 kB]
    Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64×64 Icons [52.2 kB]
    Fetched 295 kB in 0s (397 kB/s)
    Reading package lists…
    Reading package lists…
    Building dependency tree…
    Reading state information…
    mate-core is already the newest version (1.12.0+1).
    mate-desktop-environment is already the newest version (1.12.0+1).
    mate-notification-daemon is already the newest version (1.12.1-1).
    0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
    Desktop Install Done
    Moving to the ~/Download folders…
    ———————————–
    Ready to start the download of xrdp package
    ——————————————-
    fatal: destination path ‘xrdp’ already exists and is not an empty directory.
    fatal: destination path ‘xorgxrdp’ already exists and is not an empty directory.
    /usr/bin/autoconf
    /usr/bin/automake
    /usr/bin/libtoolize
    /usr/bin/pkg-config
    autoreconf: Entering directory `.’
    autoreconf: configure.ac: not using Gettext
    autoreconf: running: aclocal –force -I m4
    autoreconf: configure.ac: tracing
    autoreconf: running: libtoolize –copy –force
    libtoolize: putting auxiliary files in ‘.’.
    libtoolize: copying file ‘./ltmain.sh’
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, ‘m4’.
    libtoolize: copying file ‘m4/libtool.m4’
    libtoolize: copying file ‘m4/ltoptions.m4’
    libtoolize: copying file ‘m4/ltsugar.m4’
    libtoolize: copying file ‘m4/ltversion.m4’
    libtoolize: copying file ‘m4/lt~obsolete.m4’
    autoreconf: running: /usr/bin/autoconf –force
    autoreconf: running: /usr/bin/autoheader –force
    autoreconf: running: automake –add-missing –copy –force-missing
    configure.ac:8: installing ‘./compile’
    configure.ac:6: installing ‘./missing’
    module/Makefile.am: installing ‘./depcomp’
    autoreconf: Leaving directory `.’
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for a thread-safe mkdir -p… /bin/mkdir -p
    checking for gawk… no
    checking for mawk… mawk
    checking whether make sets $(MAKE)… yes
    checking whether make supports nested variables… yes
    checking whether make supports nested variables… (cached) yes
    checking for gcc… gcc
    checking whether the C compiler works… yes
    checking for C compiler default output file name… a.out
    checking for suffix of executables…
    checking whether we are cross compiling… no
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking whether gcc understands -c and -o together… yes
    checking for style of include used by make… GNU
    checking dependency style of gcc… gcc3
    checking for an ANSI C-conforming const… yes
    checking build system type… x86_64-pc-linux-gnu
    checking host system type… x86_64-pc-linux-gnu
    checking how to print strings… printf
    checking for a sed that does not truncate output… /bin/sed
    checking for grep that handles long lines and -e… /bin/grep
    checking for egrep… /bin/grep -E
    checking for fgrep… /bin/grep -F
    checking for ld used by gcc… /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld… yes
    checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface… BSD nm
    checking whether ln -s works… yes
    checking the maximum length of command line arguments… 1572864
    checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format… func_convert_file_noop
    checking how to convert x86_64-pc-linux-gnu file names to toolchain format… func_convert_file_noop
    checking for /usr/bin/ld option to reload object files… -r
    checking for objdump… objdump
    checking how to recognize dependent libraries… pass_all
    checking for dlltool… no
    checking how to associate runtime and link libraries… printf %s\n
    checking for ar… ar
    checking for archiver @FILE support… @
    checking for strip… strip
    checking for ranlib… ranlib
    checking command to parse /usr/bin/nm -B output from gcc object… ok
    checking for sysroot… no
    checking for a working dd… /bin/dd
    checking how to truncate binary pipes… /bin/dd bs=4096 count=1
    checking for mt… mt
    checking if mt is a manifest tool… no
    checking how to run the C preprocessor… gcc -E
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking for dlfcn.h… yes
    checking for objdir… .libs
    checking if gcc supports -fno-rtti -fno-exceptions… no
    checking for gcc option to produce PIC… -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works… yes
    checking if gcc static flag -static works… yes
    checking if gcc supports -c -o file.o… yes
    checking if gcc supports -c -o file.o… (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries… yes
    checking whether -lc should be explicitly linked in… no
    checking dynamic linker characteristics… GNU/Linux ld.so
    checking how to hardcode library paths into programs… immediate
    checking whether stripping libraries is possible… yes
    checking if libtool supports shared libraries… yes
    checking whether to build shared libraries… yes
    checking whether to build static libraries… yes
    checking CFLAGS for maximum warnings… -Wall
    checking whether C compiler accepts -Wwrite-strings… yes
    checking for __attribute__((format))… yes
    checking for pkg-config… /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0… yes
    checking for XORG_SERVER… yes
    checking for XRDP… no
    configure: error: Package requirements (xrdp >= 0.9.0) were not met:

    No package ‘xrdp’ found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables XRDP_CFLAGS
    and XRDP_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.
    make: *** No targets specified and no makefile found. Stop.
    make: *** No rule to make target ‘install’. Stop.
    Installing X11VNC…
    —————————————-
    Reading package lists…
    Building dependency tree…
    Reading state information…
    x11vnc is already the newest version (0.9.13-1.2build1).
    0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
    Add/Remove xrdp packages…
    —————————
    Reading package lists…
    Building dependency tree…
    Reading state information…
    The following NEW packages will be installed:
    xrdp
    0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded.
    Need to get 0 B/215 kB of archives.
    After this operation, 1,620 kB of additional disk space will be used.
    Selecting previously unselected package xrdp.
    (Reading database …
    (Reading database … 5%
    (Reading database … 10%
    (Reading database … 15%
    (Reading database … 20%
    (Reading database … 25%
    (Reading database … 30%
    (Reading database … 35%
    (Reading database … 40%
    (Reading database … 45%
    (Reading database … 50%
    (Reading database … 55%
    (Reading database … 60%
    (Reading database … 65%
    (Reading database … 70%
    (Reading database … 75%
    (Reading database … 80%
    (Reading database … 85%
    (Reading database … 90%
    (Reading database … 95%
    (Reading database … 100%
    (Reading database … 304918 files and directories currently installed.)
    Preparing to unpack …/xrdp_0.6.1-2_amd64.deb …
    Unpacking xrdp (0.6.1-2) …
    Processing triggers for systemd (229-4ubuntu17) …
    Processing triggers for ureadahead (0.100.0-19) …
    ureadahead will be reprofiled on next reboot
    Processing triggers for man-db (2.7.5-1) …
    Setting up xrdp (0.6.1-2) …
    Reading package lists…
    Building dependency tree…
    Reading state information…
    The following packages will be REMOVED:
    xrdp
    0 upgraded, 0 newly installed, 1 to remove and 26 not upgraded.
    After this operation, 1,620 kB disk space will be freed.
    (Reading database …
    (Reading database … 5%
    (Reading database … 10%
    (Reading database … 15%
    (Reading database … 20%
    (Reading database … 25%
    (Reading database … 30%
    (Reading database … 35%
    (Reading database … 40%
    (Reading database … 45%
    (Reading database … 50%
    (Reading database … 55%
    (Reading database … 60%
    (Reading database … 65%
    (Reading database … 70%
    (Reading database … 75%
    (Reading database … 80%
    (Reading database … 85%
    (Reading database … 90%
    (Reading database … 95%
    (Reading database … 100%
    (Reading database … 304968 files and directories currently installed.)
    Removing xrdp (0.6.1-2) …
    Processing triggers for man-db (2.7.5-1) …
    Installing and compiling xrdp…
    ——————————–
    sed: can’t read bootstrap: No such file or directory
    sudo: ./bootstrap: command not found
    sudo: ./configure: command not found
    make: *** No targets specified and no makefile found. Stop.
    make: *** No rule to make target ‘install’. Stop.
    —————————
    Post Setup Configuration…
    —————————
    Set Default xVnc-Sesman
    ———————–
    Symbolic links for xrdp
    ———————–
    ———————–
    Modify xrdp.service
    ———————–
    sed: can’t read /lib/systemd/system/xrdp.service: No such file or directory
    sed: can’t read /lib/systemd/system/xrdp.service: No such file or directory
    ———————–
    Modify xrdp-sesman.service
    ———————–
    sed: can’t read /lib/systemd/system/xrdp-sesman.service: No such file or directory
    sed: can’t read /lib/systemd/system/xrdp-sesman.service: No such file or directory
    xrdp.service is not a native service, redirecting to systemd-sysv-install
    Executing /lib/systemd/systemd-sysv-install enable xrdp
    Cannot open display “default display”
    your current keyboard layout is..
    Cannot open display “default display”
    No keyboard layout specified on the command line
    Trailing -layout option ignored
    sudo: xrdp-genkeymap: command not found
    Restart the Computer
    —————————-

  25. I am using 6.5 esxi Vmware server 1st version a. Wanted to create sort of a terminal server using Linux.
    Experimented with Linux Mint but it was not stable enough. It was fast but the settings always dropped and went into “disgusto funko” mode.

    I notice you guys appear to compile your own version of rdp. It seems that way anyway. I recognize the authentication error. Must set “security_layer=rdp” in /etc/xrdp/xrdp.ini I am guessing that this is probably something introduced by their new code.

    The one thing that worked on Mint correctly was copy paste of large files. This setup with Ubuntu will copy files only if they are under 10megs. Anything larger throws a “Error splicing file: Bad file descriptor” error. Note copy from C drive of remote computer works fine.

  26. @Bob Merrit,

    Thank you for the feedback and the visit. The post is relatively old and since then, new version of xrdp packages and new version our installation script for xrdp are available through this blog.
    Interesting point ! We never checked the max size for copying files through xrdp capabilities. We will give it a try and post some info possibly
    Keep in touch
    Till next time
    See ya

Leave a Reply