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. Many thanks for your publications.

    First of all apologize for my English by, use Google automatic translation.

    Xrdp can not get the system discussed in this publication I work. I have reviewed and always get
    the same mistake.
    When I use the sesman Xvnc connection:
    VNC Error – problem connecting
    some problem

    With other single connections without text blue screen appears and the rao is disconnected.

    My environment is virtualization with Proxmox and new Ubuntu 16.04 and the script proposed in this article.

    Certainly I think there is an error near the end of scrip:
    #Issue Systemctl Reflect command to change and enable the service
    sudo systemctl daemeon-reload (error)
    sudo systemctl daemon-reload (ok)

    Thank You

  2. Hello José,

    you are correct, we have done a typo in the script… we will update the script and you should be able to access your desktop using sesman-Vnc option
    As specified in the post, to have drive redirection and clipboard, you should use the Session Manager option

    Thank for the feedback

    Till next time
    See ya

  3. When I try to connect via RDP after running this script, I get a light blue screen with no UI elements after entering my username and password. This is UbuntuMate 16.04, default install on Windows 10 Hyper-V.

  4. Hello there,
    final release of ubuntu 16.04 has changed some minor stuff…We might need to review and updated our script. Can you check that you have selected the proper option in the xrdp login box. Can you check the content of your /etc/xrdp/startwm.sh and check that after the set -e line, you have the following line mate-session ?

    Give us some days to have a look at it as we are overloaded with work….

    Till next time
    See ya

  5. Here’s the option I select at login:
    http://i.imgur.com/onGHXZ9.png

    Here’s the top of my /etc/xrdp/startwm.sh file:
    http://i.imgur.com/pEwMLTT.png

    For what its worth none of the options seem to work in the login box and when I tried to uninstall this and install the default xrdp package back it broke xrdp entirely (not sure which config step lingers). Default xrdp had been working out of the box on 16.04 final, but I was hoping to add the copy/paste functionality at long last.

  6. Hello Lotrdev,

    We have demonstrated that the redirection is working (check this link http://c-nergy.be/blog/?p=9229)
    On the other hand, a lot of people report indeed that ubuntu 16.04 seems to have introduced some changes that make xrdp not useable….
    We are looking into it but will not be able to provide an answer before 2-3 days as we are busy with heavy projects.
    In the meantime, can you provide us the content of the ~/.xsession-errors file so we can start investigating the issue and try to provide a valid workaround (if needed)
    Waiting for your feedback
    See ya

  7. Thanks for all the help, I do appreciate it and I completely understand your busy schedule. I’m just glad that in the near future I’ll finally be able to get copy/paste working. It’s going to make my life so much better.

    Here’s the output from my ~/.xsession-errors file. One thing to note is that I deleted the file and created a blank one, then tried to log in via xrdp, and no errors were added to the file. After a reboot the file looks as follows:

    openConnection: connect: No such file or directory
    cannot connect to brltty at :0
    mate-session[1472]: WARNING: Unable to find provider ” of required component ‘dock’
    grep: /home/{username}/.xinputrc: No such file or directory
    ** (process:1654): WARNING **: Warning: show_on_monitor_number is no longer a valid config option for the current version of Tilda.
    ** (process:1654): WARNING **: Warning: scroll_background is no longer a valid config option for the current version of Tilda.
    ** (process:1654): WARNING **: Warning: use_image is no longer a valid config option for the current version of Tilda.
    (nm-applet:1655): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion ‘window->update_and_descendants_freeze_count > 0’ failed
    /usr/lib/mate-optimus/mate-optimus-applet:7: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version(‘Gtk’, ‘3.0’) before import to ensure that the right version gets loaded.
    from gi.repository import Gtk, Gdk
    (nm-applet:1655): GLib-CRITICAL **: g_hash_table_remove_all: assertion ‘hash_table != NULL’ failed
    (nm-applet:1655): nm-applet-CRITICAL **: nma_icons_free: assertion ‘NM_IS_APPLET (applet)’ failed
    /usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:50: RuntimeWarning: You have imported the Gtk 2.0 module. Because Gtk 2.0 was not designed for use with introspection some of the interfaces and API will fail. As such this is not supported by the pygobject development team and we encourage you to port your app to Gtk 3 or greater. PyGTK is the recomended python module to use with Gtk 2.0
    warnings.warn(warn_msg, RuntimeWarning)
    sys:1: PyGIWarning: Caja was imported without specifying a version first. Use gi.require_version(‘Caja’, ‘2.0’) before import to ensure that the right version gets loaded.
    ** Message: Initializing gksu extension…
    (blueman-applet:1688): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion ‘window->update_and_descendants_freeze_count > 0’ failed
    /usr/lib/python3/dist-packages/blueman/plugins/applet/AppIndicator.py:8: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version(‘AppIndicator3’, ‘0.1’) before import to ensure that the right version gets loaded.
    from gi.repository import AppIndicator3 as girAppIndicator
    ERROR:dbus.proxies:Introspect error on org.bluez:/org/bluez: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service ‘org.bluez’: timed out
    ERROR:dbus.proxies:Introspect error on org.bluez:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service ‘org.bluez’: timed out
    ERROR:dbus.proxies:Introspect error on org.bluez:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service ‘org.bluez’: timed out

  8. Hello Lotrdev,

    we have tested and re-test the procedure and the script provided and this is working as expected on ubuntu 16.04 final release
    are you using the download link and run the script or do you copy/paste the text from the blog (which can cause formatting issues) ?
    are you connected to internet when running the script. If you are not connected, you need to download the xrdp package but also the xorgxrdp

    the xsession-errors shows more issues with mate-desktop than xrdp issues ….

    Can you check other logs such as /var/logs/xrdp

    Could try again the install on a virtual machine and check again

    Waiting for feedback
    till next time
    See ya

  9. I’ve used your guide and script for previous Ubuntu versions and rarely had have any issues. But with 16.04 I can’t make it fly. I have a VM running”minimal Ubuntu server install” on a ESXi server, with only the bare necessities installed. Do I need to have a full desktop installed first?

  10. @Christian,

    Ubuntu 16.04 has broken the standard xrdp install approach…We have already provided a quick workaround
    To answer your question, general steps are still valid
    1. install xrdp
    2. install alternate desktop
    3. tell your system to use your alternate desktop not via .xsession files but via /etc/xrdp/startwm.sh file

    Which kind of problems do you have ? screenshots possible ? Check you xrdp log files ans .xsession-errors files

    Hope this help
    Till next time
    See ya

  11. @Griffon
    I first ran the script as it is but that didn’t work, so I reverted back to my “pre-script snapshot” and ran each step manually. Had to install pkg-config (I think, my memory is a bit weak…).In the end I got errors to everything related to xrdp-genkeymap: “xrdp-genkeymap: unable to open display “.

    When I try to RDP to the machine I get a login in window, I type in my username/password and then it just a bluish blank screen.

    I’ll try again.

  12. Hello Christian,
    A first guess based on info you provided me : it’s the rdp client that drops the connection….

    If you have time and willing to investigate a little bit more the issue, we can try to perform some more debugging
    are you using any certificates while connecting through xrdp ?
    which kind of rdp client are you using ? microsoft rdp, xfreerdp,remminna…(which version ?)

    if you have another VM available, could you try to install from scratch again ubuntu 16.04 and run the script and see if you still have the issue ? All the machines involved in this test should not be joined to any Active Directory domains and only out-of-the-box group policies should be available if you are using windows

    To have even more output, can you try to start the xrdp with the -ns parameter
    Open two terminal windows
    in one, type sudo xrdp -ns
    in the other, type sudo xrdp-sesman -ns
    make your connection and you should see in the terminals bunch of info
    Check if something useful is displayed

    Waiting for your results and feedback

    Ps : we retested the script 3 times and it worked for us…..

    Till next time
    See ya

  13. Hello Griffon,

    I made a 16.04 Desktop installation, then ran the script, et voilà, it works! 🙂
    Must be something missing when done from a Server install. I know I got it to work from a bare 15.10 Server install with the xrdp that’s in the repos.

    However, clipboard is not working…

  14. @Chris,

    Hello,
    good to hear that the script is working at least for the desktop version…:-)
    the clipboard function should be working but might not working with all types of files….We will check this with the latest Ubuntu 16.04 desktop version with all updates and see if there is indeed a problem.
    We will try on a Server Edition and see if we can come up with something

    I want to thank you for your time and feedback provided… We will try to use all of this to update/improve information about the xrdp and ubuntu 16.04

    Thank man
    Till next time
    see ya

  15. I had originally been using the UbuntuMate flavor of Ubuntu, but since this script installs the mate environment I thought maybe that was the issue. I installed a clean Ubuntu 16.04 desktop version and still no dice. I’ll get you more logs, hopefully this afternoon. It’s very curious that its working in some environments and not in others.

    For what its worth I’m using Windows 10 RDP, and Hyper-V for my VM.

  16. @lotrdev,

    this is really strange. If you have a clean ubuntu install the xrdp feature should be working without any issues. in the xrdp login box, ensure that you select either the SessionManger or the xvnc-sesman session. If you simply need the xrdp feature,have a look at this post http://c-nergy.be/blog/?p=8952
    If you need to have disk redirection, you have to try again.

    We have done 10 installations lately using the script -> all working fine -> so I do not understand where your problem come from
    Waiting for any other feedback if any

    Till next time
    See ya

  17. Hello, good job!! (Sorry for my bad English)

    My problem is:
    Ubuntu is installed in Spanish and the session with RDP Client is loaded in English.
    The settings of languages is fine… (Set to Spanish)

    What is my problem ?
    Thanks

  18. Hello MaT,

    We have tested that part and indeed there seems to be a small issue with the keyboard. We will need to update the post to add our findings.
    So if you are using the Session Manager session (you have selected the first option in the xrdp login box), you will need to configure your language settings and keyboard settings within the remote session.
    With the Session Manager sesman option, it’s possible to configure the keyboard layout within your session and you should be then good to go

    Till next time
    See ya

  19. Thanks for the answer!

    From the interface Mate I try to change the language (No keyboard layout) and changes are not applied.
    Moreover, in this version of XRPD (neutrinolabs) is not yet resolved the issue of audio to client. This is true?

    🙂

  20. Hello MaT,

    Sorry for the late answer… Can you try this. In your remote desktop session, open the terminal windows and issue the command setxkbmap -layout es
    Then try to type something in gedit or pluma and tell us if this change the keyboard layout.
    If this is the case, this means that you can change the keyboard layout inside the remote session

    Hope this help
    Till next time

  21. This is a great step forward – I hope it will get the default someday.
    I have one question please – is possible to fix also the sound? The closest I found is :
    https://github.com/neutrinolabs/xrdp/issues/321
    Looks like is related also to pulse audio and a compile option for xrdp (something like –enable-simplesound but will not get recognized).

  22. Hello Radu,

    Some people succeeded in redirecting sound in xrdp. In the past, we had some success but it a while since we have tried this feature. This might be our next challenge :- ).. publishing a nice post about xrdp and sound redirection. At the moment, quite busy with my projects but as soon as we have time, we will have a look

    Till next time
    See ya

  23. I experimented it under ubuntu 16.04 but some how drives redirection does not work. The clipborad feature worked well. The thinclient_drives is empty then ensured that the only option selected in the local resources tab are the Clipboard option and the drive option.

  24. @Lauri,

    Can you try to restart your machine and give it a try again…. (some times the xrdp service get stuck and thin_client folder can be empty)
    Ensure that the remote desktop client is configured with the necessary settings ( I know you already mention that this was done)
    Which Session Manager are you using ? The X11VNC or the Session Manager Session. If you use the Sesman-XVNC do you have the same issue ?

    Please provide feedback if one of these fixed your issues so we can update the post and Improve xrdp support

    Hope this help
    Till next time
    See ya

  25. Ubuntu server 16.04

    Downloaded latest script from this page and i get this

    sudo ./install-xrdp-1-7.sh
    Installing prereqs for compiling xrdp…
    —————————————-
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    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).
    fuse is already the newest version (2.9.4-1ubuntu3).
    gettext is already the newest version (0.19.7-2ubuntu3).
    libfuse-dev is already the newest version (2.9.4-1ubuntu3).
    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).
    python-libxml2 is already the newest version (2.9.3+dfsg1-1).
    xserver-xorg-dev is already the newest version (2:1.18.3-1ubuntu2).
    xsltproc is already the newest version (1.1.28-2.1).
    nasm is already the newest version (2.11.08-1).
    libssl-dev is already the newest version (1.0.2g-1ubuntu4.1).
    0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
    Installing git software…
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    git is already the newest version (1:2.7.4-0ubuntu1).
    0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
    Installing alternate desktop to be used with xrdp…
    —————————————————-
    Hit:1 http://se.archive.ubuntu.com/ubuntu xenial InRelease
    Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
    Hit:3 http://se.archive.ubuntu.com/ubuntu xenial-updates InRelease
    Hit:4 http://se.archive.ubuntu.com/ubuntu xenial-backports InRelease
    Fetched 94.5 kB in 0s (230 kB/s)
    Reading package lists… Done
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    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 39 not upgraded.
    Desktop Install Done
    Moving to the ~/Download folders…
    ———————————–
    Ready to start the download of xrdp package
    ——————————————-
    Cloning into ‘xrdp’…
    remote: Counting objects: 16795, done.
    remote: Compressing objects: 100% (10/10), done.
    remote: Total 16795 (delta 3), reused 0 (delta 0), pack-reused 16785
    Receiving objects: 100% (16795/16795), 11.30 MiB | 563.00 KiB/s, done.
    Resolving deltas: 100% (10386/10386), done.
    Checking connectivity… done.
    Cloning into ‘xorgxrdp’…
    remote: Counting objects: 596, done.
    remote: Total 596 (delta 0), reused 0 (delta 0), pack-reused 596
    Receiving objects: 100% (596/596), 183.55 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (457/457), done.
    Checking connectivity… done.
    /usr/bin/autoconf
    /usr/bin/automake
    /usr/bin/libtoolize
    error, install pkg-config
    sudo: ./configure: command not found
    make: *** No targets specified and no makefile found. Stop.
    make: *** No rule to make target ‘install’. Stop.
    Installing X11VNC…
    —————————————-
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    x11vnc is already the newest version (0.9.13-1.2build1).
    0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
    Add/Remove xrdp packages…
    —————————
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following NEW packages will be installed:
    xrdp
    0 upgraded, 1 newly installed, 0 to remove and 39 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 … 198318 files and directories currently installed.)
    Preparing to unpack …/xrdp_0.6.1-2_amd64.deb …
    Unpacking xrdp (0.6.1-2) …
    Processing triggers for ureadahead (0.100.0-19) …
    Processing triggers for systemd (229-4ubuntu4) …
    Processing triggers for man-db (2.7.5-1) …
    Setting up xrdp (0.6.1-2) …
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following packages will be REMOVED:
    xrdp
    0 upgraded, 0 newly installed, 1 to remove and 39 not upgraded.
    After this operation, 1,620 kB disk space will be freed.
    (Reading database … 198369 files and directories currently installed.)
    Removing xrdp (0.6.1-2) …
    Processing triggers for man-db (2.7.5-1) …
    Installing and compiling xrdp…
    ——————————–
    /usr/bin/autoconf
    /usr/bin/automake
    /usr/bin/libtoolize
    error, install pkg-config
    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..
    No keyboard layout specified on the command line
    Trailing -layout option ignored
    Cannot open display “default display”
    sudo: xrdp-genkeymap: command not found
    Restart the Computer
    —————————-

  26. @Martin,

    Ok, we see that you are trying to install xrdp on the server edtion
    have you checked this post (see http://c-nergy.be/blog/?p=9433 ) ? Is this solving your issue ?
    In your log, we can see that the install-pkg is missing which leads to error

    Give it a try and provide feedback
    Till next time

    See ya

  27. Hello Mikhail,

    I have no clue on how to fix this if the error is related to cyrillic symbols

    Till next time
    See ya

  28. i see just a blue screen once i rdp into a desktop vm of ubuntu and the script finishes in vmware workstation

  29. Hi!

    For me, the clipboard is not working, if I copy any characters with “accents”. If the copied text contains accents, nothing is copied from xrdp->windows or windows->xrdp. Within xrdp, everything is working fine.

    Do you have any Idea, why that happens?

    OS is Debian 8, keyboard-layout is “german”.

    Thank you

  30. @Phil,

    Hello phil, at the moment I do not have really an idea of what can be blocking the clipboard
    questions : which session manager are you using Xvnc-manager or the Session-Manager ?
    If you use clipboard for text with no accents, is it working ?
    Have you checked that the remote desktop client is configured correcty ?
    Have you reboot at least once your Ubuntu machine and possibly your windows machine (to clear up the clipboard)

    If we have time, we will try to investigate a little bit further

    Hope this help
    Till next time
    See ya

  31. Hi Griffon,
    I’m facing the exact same problem as MaT raised at May 10, 2016.
    That is, my user interface language (not keyboard layout) is set Traditional Chinese,
    but somehow in my remote session all the interface becomes English.

    here is what i get in remote session:
    xxxx@xxxx-ubuntu:~$ locale
    LANG=
    LANGUAGE=
    LC_CTYPE=”POSIX”
    LC_NUMERIC=”POSIX”
    LC_TIME=”POSIX”
    LC_COLLATE=”POSIX”
    LC_MONETARY=”POSIX”
    LC_MESSAGES=”POSIX”
    LC_PAPER=”POSIX”
    LC_NAME=”POSIX”
    LC_ADDRESS=”POSIX”
    LC_TELEPHONE=”POSIX”
    LC_MEASUREMENT=”POSIX”
    LC_IDENTIFICATION=”POSIX”
    LC_ALL=

    Thanks.
    Dean

  32. Hi Griffon,
    fix to my problem in last post is as below,
    turn out the following 4 lines in the original “startwm.sh” are the solution to my problem
    —–
    if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
    fi
    —–
    In the script you link /etc/X11/Xsession to /etc/xrdp/startwm.sh, and it results that the above line would not be execute, so i modified your script as follows, and it works fine.

    — sudo mv /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
    +++ #sudo mv /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
    — sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh
    — #sudo ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh

    — sudo sed -i.bak ‘/set -e/a mate-session’ /etc/xrdp/startwm.sh
    +++ sudo sed -i.bak ‘/set -e/a mate-session’ /etc/X11/Xsession

  33. @Dean,

    Good spot Dean, Indeed, when we link the Xsession file, indeed, the Export language section is not executed.
    We will try to update the script to take that into account
    Good job 🙂

    Thank youf for Sharing this and for positive feedback

    Till next time
    See ya

  34. Hi Griffon,
    thank You for this script!
    On my ubuntu (16.04) copy & paste work perfectly.
    But log off does not work. I get an empty background and window keeps open.
    Does anyone have the same problem?

  35. @Marty,

    It seems indeed that there is the problem with the logout functionality….
    You can either close the remote desktop session by clicking the cross in the top blue bar of the remote desktop session (This will disconnect you but not really log you off
    or you can try the following if you are sure you have saved all your work
    From a terminal session, use pkill -KILLL -u

    Hope this help
    Till next time
    See ya

  36. Hello Griffon,
    pkill -KILLL -u does not work.
    It seems that the only way is clicking the cross.
    Thanks.
    Marty

  37. Hi,
    I can confirm the problems described by Marty and Phil (scripted XRDP installation with clipboard support).

    My client machine: Windows 10 (physical machine)
    My server machine: Ubuntu 16.04.1 desktop 64-bit (VM under vSphere 5.5)
    Location (both machines): Slovenia (non-English characters C,S,Z,c,s,z with caron, i.e. inverted circumflex (Č,Š,Ž,č,š,ž))

    Copy/paste between the RDP Window (gedit) and Windows (Notepad) works fine with text having only English characters, but does nothing when Slovenian characters with carons are included. (One strange effect of lesser importance is that, in Mate Terminal, Slovenian characters are displayed as (replaced by) question marks (‘?’); but they are displayed correctly in other applications i.e. gedit, and LibreOffice.)

    Logout fails (effectively freezes RDP access – which is a fatal drawback for normal use):
    During logout, the RDP window is cleaned, only the background remains (empty desktop). Then, instead of closing this window (empty desktop), the original Mate background (greenish) is replaced by the standard Ubuntu background (reddish; btw, I have gnome-session-flashback installed in addition to the native Unity, if this is of any importance). This empty window then remains opened. Closing it manually by clicking X in the top right corner (disconnecting the remote session) and logging again reopens this same empty desktop (with the Ubuntu background – reddish). Right click on the (empty) desktop opens the usual pop-up menu, I can right click on it and create a folder on the desktop, but that is about all that I can do; right click -> Open Terminal does nothing). Of course, Restarting the XRDP service resets this situation.

  38. @Igor,

    Thank you for the feedback.. Indeed, there are inconsistent results with XRDP software while supporting clipboard and redirection…Since Ubuntu 16.04, there was also some changes that affected the XRDP software and it’s becoming more work to have it working properly..

    Currently abroad for some projects and overloaded with work,…. will not have right away time to have a look at it…
    will try to check these issues with the Ubuntu 16.10 release and see if this can be fixed in some ways

    Thank for the visit and for sharing your experience while working with XRDP…

    Till next time
    See ya

  39. Hello Griffon,

    Thanks for the script. The script works but I have one issue with it.
    When I try to connect to my VM (Ubuntu Mate 16.04, installed from scratch) I get an error.

    “Connection problem, giving up.
    Some problem”
    In the same screen I can click the OK button and I am then presented with the login window and everything works as you described from that point.
    It isn’t a big problem, but what is annoying is that it takes up to 3 minutes before I am presented with this error.
    Do you have any ideas how I can solve this?

    Thanks in advance,
    Steve

  40. @Steve,

    as we did not experience this issue, I have no clue at the moment…. As we can now use Unity Desktop with XRDP (see http://c-nergy.be/blog/?p=9962, we will probably update this post and provides instructions to make it work…We might find more things and we might be able to fix your issue…
    However,be patient as I’m overwhelmed by work…..

    Hope this help
    Till next time
    See ya

  41. @Griffon

    Thnx for replying, I successfully installed Ubuntu 16.04 (Unity) & and xrdp using the guide you provided.
    Unfortunately I cannot compile my applications due to changes in the new version, so I’m stuck with 14.04.
    I’m going to test if I can get it working on 15.10 since this distro provides the same xrdp package as 16.04.

    Thanks for your help.
    Steve

  42. Hi!
    I’m trying to get xrdp running with redirection on Raspbian 8. What are the changes I would have to make to this script? Anybody firm with the differences between Ubuntu und Debian/Raspbian?

    Thanks,
    Steffen

  43. @Steffen,

    never tried on Rasbpian, so I would need to test it first and see how it works. but in theory, this should be working as your are compiling the package from source

    Till next time
    See ya

  44. Thanks for the description on how to get this up and running.

    Is there also a way to do this using packages from a repository? It would be nice to be able to update using a package manager like apt.

  45. @Arie,
    As far as I know, there is no packages released for xrdp 0.9. You have to compile it. If you looking for packages from repositories, you can use ubuntu and xrdp package 0.6.1-xxxx which is available and provide remote desktop functionalities but no drive redirection nor clipboard functionalty…

    Till next time
    See ya

  46. @Griffon,

    When i tested it, rdp went completely off. My guess is that some directories you use are Ubuntu-exclusive and different on Debian. But my knowledge is just not sufficient to determine the changes to the script that need to be made.

  47. @Seffen,

    Currently abroad for work….if time permit will try to perform install on a Debian..

    till next time
    See ya

  48. Hi,

    First, thanks a lot for this amazing script.

    Then it seems that ctrl+alt+arrow is not caught by mate.
    I set the rdp client (windows) with “apply windows key combination on remote computer”, everything is working -including ctrl+alt+t- but the ctrl+alt+arrow combination.

    Do you know how to fix that ?

    Thanks again,
    Antoine

Leave a Reply