XRDP – How To Remote Connect to Unity Desktop on Ubuntu 16.04

Hello World,

Today, we will show you how you can use the xRDP software package and make a remote desktop connection into the Unity Desktop Environment. Yes ! You read it correctly, with this procedure, you will be able to access your Unity Desktop through Remote Desktop ! No need to install alternate Desktop such as xfce, Mate, LXDE,….

You still do not believe it ! Have a quick look at our previous post, we have demonstrated that it was possible to connect to the Unity Desktop using the xRDP Software solution.    Today, we will provide you the recipe we have used in order to make it happening…

Tons of people have been asking us if this was possible..Some time ago, we provided a dirty workaround (see this post : XRDP – How to connect to console or how to connect to Unity Desktop). Today, we are providing not a workaround but a viable solution to have users connect to their Unity Desktop

Before you are getting too excited, you have to know that the solution do have some limitations but the solution seems to be workable.  We will try to provide some tips to overcome the limitation we have detected….

Disclaimer : 

We didn’t perform extensive testing yet so you might find out that something does not work as expected.  We will not be liable for any errors,omissions,problems,damages…arising from using this information. All the information is provided AS-IS. Use this procedure at your own risk !  

Bring xRDP & Unity to the next Level

Assumptions

When we have performed our installation & testing, we have been using the following infrastructure

  • We have performed a Fresh installation of the Ubuntu 16.04.1 LTS Released
  • We have performed the installation on a Virtual Machine running on Hyper-V Server and Virtualbox

We are assuming that

  • Your Ubuntu 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 necessary packages from this blog and copy them to your Ubuntu machine
  • You have your Ubuntu machine installed,configured and have the latest patches installed…
  • Your Ubuntu computer is running 16.04.1

Note : This process might be working with Ubuntu 14.04 and later but we did not test it…

Installation Process 

Step 1 – Download TigerVNC Server package

In this installation process, this is really the tricky part.  We need to install the tigervnc software solution but there is no Ubuntu packages available for Ubuntu 16.04.  If you look on the official TigerVNC repository, you will see that there is no deb packages for Ubuntu 16.04.

You will need to either compile Tigervnc package on your own or find an existing debian package that can be used with Ubuntu 16.04.

Our Tigervnc deb package available for download 

For your convenience, we are providing you a Tigervnc debian package that we have been using for our test.  You can try to use this package but we cannot guarantee that this package would work for you. We will also not provide any support if the package is not working for you.  You can give it a try and see if it works….(use it at you own risk !)

Box-download-48Download Tigervnc Deb Package (for Ubuntu 16.04.1 – 64 bit)

 

Step 2 – Install the TigerVNC Server package

1 –  Open a Terminal console and move to your Download folders (or location where you have saved the packaged downloaded above)

cd Downloads

Click on picture for better Resolution

2 – In the terminal console, type the following

sudo dpkg -i tigervncserver_1.6.80-4_amd64.deb

You might see some warning and errors messages. Ignore these messages for the moment…

Click on picture for better Resolution

3 – To ensure that all the dependencies are installed, issue the following command in the Terminal console

sudo apt-get install -f

Click on picture for better Resolution

Step 3 -Install the xrdp package

1 –  Open a Terminal console and issue the following command

sudo apt-get install xrdp -y

You might be asked to provide a password (because you are using sudo command)

Click on picture for better Resolution

Step 5 – Configure the xrdp settings 

You need to specify which desktop to start while connected through xRDP session.  To perform this action, you would need to create and populate either the .xsession file (per user) or the /etc/startwm.sh (all users) with the proper configuration information (as described below)

1 –  Open a Terminal console and issue the following command (if you have only one user on your system)

echo unity>~/.xsession

or

sudo sed -i.bak '/fi/a #xrdp multi-users \n unity \n' /etc/xrdp/startwm.sh

Step 6 – Configure the xrdp keyboard Settings 

Note :  You need to perform this action on the local Ubuntu machine (and not through the xrdp connection !!)

By default, the xRDP login screen will use an en-us keyboard layout. You remote session will also be using the en-us keyboard layout.  If you are using a different keyboard layout than the english one, you need to perform the following actions in order to update the configuration of the xrdp software.

In my case, I’m using a Belgian French keyboard, so I had to tell xrdp to use the belgian french keyboard as well.  To do that, you need to perform the following actions :

1 : You go to the /etc/xrdp directory

2 : you issue the command setxkbmap -layout <%your layout%> to define which keyboard map/layout to use

Click on Picutre for better Resolution 

3 : create a copy of the km-0409.ini file into the same directory. It seems that this is the default file used by xrdp to define the keyboard layout. You will need to use sudo in order to be able to write into the directory

4 : Check that you have a backup of your file by typing the dir or ls command

5 : update the file by issuing the following command sudo xrdp-genkeymap km-0409.ini

Click on Picutre for better Resolution 

You can achieve the same results using the following command line script. In your terminal console; simply copy/paste this text and it will try to find out automatically your keyboard layout

# 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

Step 7 – Reconnect to the Same Session

Since Ubuntu 14.10, a new xrdp package has been made available in the Ubuntu repository. This package fixes a long time issue related to the fact that users could not reconnect to the same session.  If you are using the package xrdp 0.6.1-1 or later, you do not need to perform any customization, you will reconnect automatically to the same session.

Test your Setup & Connect to Unity 

To test your configuration, simply start your remote desktop client from a Windows machine, type in the hostname or ip address of the Ubuntu computer to connect to and try to connect.  If everything is working as expected, you should see first the xrdp login box

Click on picture for better Resolution

And then after providing the credentials, you should see your Unity Desktop inside the xRDP Session….. (isn’t it cool :-))

Click on picture for better Resolution

 

Detected Issues (so far…)

Missing Mouse cursor 

The first time you connect to Unity through xRDP, you might see that the mouse cursor is not visible or missing. The workaround is to right-click on the desktop and click on open Terminal option. As soon as you perform this action, you will see the big cross mouse cursor

Missing indicator panel 

If you look on the right top of your desktop while connected through xRDP, you will notice that there is no indicator icons over there.  At the moment, we didn’t find a way to bring this one back in the xRDP Session.

To fix this issue, you have to modify your .xsession file. the .xsession file should look like the following

Credits for the code below :

/usr/lib/gnome-session/gnome-session-binary --session=ubuntu &
/usr/lib/x86_64-linux-gnu/unity/unity-panel-service &
/usr/lib/unity-settings-daemon/unity-settings-daemon &

for indicator in /usr/lib/x86_64-linux-gnu/indicator-*; 
do
  basename=`basename ${indicator}`
  dirname=`dirname ${indicator}`
  service=${dirname}/${basename}/${basename}-service
  ${service} &
done

unity

 

Logout option not available or not working 

Because the indicator is not available, you cannot select the logout option.  In Ubuntu 16.04, via the Dash, you can look for the logout icon. If you click on it, you will not be logged out.  If you try the command line, issuing the gnome-session-quit –logout, this will not working either.

Workaround :

you either disconnect from the xrdp session and your session will be still running on the ubuntu machine.  You can try to use the command line pkill -u <your user name>. This will kill the xRDP Session but will also kill you connection on the ubuntu machine if you were locally logged on.

You could also use the following command line.  This should kill your xrdp session only

ps -ef h | grep Xvnc | grep `whoami` | tr -s " " | cut -d " " -f2 | xargs kill -9

Performance Issues

Some people complains that the performance were not that great. So far we didn’t investigate this. As more people would use the Unity Desktop, you might be able to have some hints and see where the performance lies…

 

Final Notes 

Voila ! We did it ! At this stage, you should be able to access your Unity Desktop through xRDP package.  You can now perform a remote desktop connection to your Ubuntu computer and enjoy the same interface as the one you are using when logged on locally on the system.

To achieve this results, the only thing that needed is to replace the aging vnc server software (vnc4server,x11vnc,…) with a more recent vnc server solution.  By simply changing the backend vnc server component of the xRDP solution, it is now possible to connect to your Unity Desktop….(This is so cool….:-) )

I hope that you will enjoy your new remote experience and you will provide us some feedback about this totally new experience…

Till next time

See ya

76 thoughts on “XRDP – How To Remote Connect to Unity Desktop on Ubuntu 16.04

  1. Hello there,
    I’m wondering is there anyway to make it work with XFCE (Xubuntu) 16.04 ? I’d love to use RDP because it’s faster than the current method I’m using to remote connect (x2go).

    Thank you.

  2. @Hector,

    If you are using Xubuntu, the procedure should be working for you as well. Install the TigerVNC software, install xrdp and try to connect. If this fails, you need to configure your .xsession file and tell him to start xfce-session

    If we have time, we will write a post on how to have it working on different Ubuntu Flavors..

    Till next time
    See ya

  3. Hi,

    Great tutorial, almost everything work for me… but without luck I have problem. I can successfully connect to xrdp, but after I put login and password I have only grey screen and start of unity fails.

    In log file .xsession-error:
    localuser:michal being added to access control list
    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 109 (X_ChangeHosts)
    Value in failed request: 0x5
    Serial number of failed request: 6
    Current serial number in output stream: 8
    openConnection: connect: No such file or directory
    cannot connect to brltty at :0

    Could you give me any ideas, how to solve that case?

  4. Hi Griffon

    First a huge thank you, I have followed your xrdp guides since 13.04 and they have always worked and been extremely useful. 🙂

    Unfortunately, I cannot get 16.04 to work. When using mstcs from Win7, I just get ‘error – problem connecting’.

    Any advice would be appreciated, thanks

    Here is what .xsession-errors says: (I removed my username)

    Xsession: X session started for at Sat 17 Sep 11:16:35 BST 2016
    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 109 (X_ChangeHosts)
    Value in failed request: 0x5
    Serial number of failed request: 6
    Current serial number in output stream: 8
    localuser:[consored] being added to access control list
    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 109 (X_ChangeHosts)
    Value in failed request: 0x5
    Serial number of failed request: 6
    Current serial number in output stream: 8
    openConnection: connect: No such file or directory
    cannot connect to brltty at :0
    /etc/xrdp/startwm.sh: 3: [: x: unexpected operator
    compiz (core) – Info: Loading plugin: core
    compiz (core) – Info: Starting plugin: core
    compiz (core) – Fatal: No XKB extension
    Xlib: extension “XInputExtension” missing on display “:10.0”.
    compiz (core) – Info: Loading plugin: ccp
    compiz (core) – Info: Starting plugin: ccp
    compiz (core) – Info: Loading plugin: composite
    compiz (core) – Info: Starting plugin: composite
    compiz (core) – Fatal: No composite extension
    compiz (core) – Error: Plugin initScreen failed: composite
    compiz (core) – Error: Failed to start plugin: composite
    compiz (core) – Info: Unloading plugin: composite
    compiz (core) – Info: Loading plugin: opengl
    compiz (core) – Info: Starting plugin: opengl
    compiz (core) – Error: Plugin ‘composite’ not loaded.

    compiz (core) – Error: Plugin init failed: opengl
    compiz (core) – Error: Failed to start plugin: opengl
    compiz (core) – Info: Unloading plugin: opengl
    compiz (core) – Info: Loading plugin: compiztoolbox
    compiz (core) – Info: Starting plugin: compiztoolbox
    compiz (core) – Error: Plugin ‘composite’ not loaded.

    compiz (core) – Info: Loading plugin: vpswitch
    compiz (core) – Info: Starting plugin: vpswitch
    compiz (core) – Info: Loading plugin: snap
    compiz (core) – Info: Starting plugin: snap
    compiz (core) – Info: Loading plugin: mousepoll
    compiz (core) – Info: Starting plugin: mousepoll
    compiz (core) – Info: Loading plugin: resize
    compiz (core) – Info: Starting plugin: resize
    compiz (core) – Fatal: No composite extension
    compiz (core) – Fatal: No composite extension
    Segmentation fault (core dumped)

  5. @John pearce,

    Just a guess
    If I look at your logs; I see this line /etc/xrdp/startwm.sh: 3: [: x: unexpected operator -> So, I m assuming that you have populated the startwm.sh file and added the Unity command. If this is correct, it seems that you have a typo in the file….

    As this is quite new procedure, I would recommend to go step by step…
    1./install tigerVNC (and check this one is running and working)
    2./Install xrdp package
    3./Populate the .xsession with only unity command first (do not try the workarounds for the notification panel)
    4./Restart and give it a try

    If you have time and want to help, can you try the procedure on a clean ubuntu machine (like a virtual machine) and provide feedback….so we can collect and share this info

    Hope this help
    Till next time
    See ya

  6. @Michal,

    I remember that the first time I tried this procedure I had exactly the same behavior…but i do not remember what i did to fix it.. (I think it was related to the vnc4server package still being used)

    Is this a clean install of Ubuntu or upgraded system ?
    Have you performed all the steps described in the post….

    1.install tigervnc (and check that the service is running and working as expected)
    2. install xrdp
    3. update the .xsession file and add only the command unity
    4. restart your system and give it another try.

    If you did that, try remove and reinstall the xrdp package and check that the vnc4server package is not installed when installing the xrdp package…
    Check that the tigervnc package is the one effectively used for the xrdp connection (try re-install tigervnc and check output on the screen..maybe something went wrong with the tigervnc install…)

    If it is still fails, provide again the logs…so we can try to provide some help and share any findings about this new procedure

    if you have time and want to help (as this procedure is quite new), you could try to install a fresh ubuntu and test the procedure and provide feedback as well on new installation)

    Hope this help
    Till next time
    See ya

  7. @Griffon

    Hi, thanks for the quick reply. I checked to see if tigervnc is running using “ps aux | grep ‘tiger'” and also “ps aux | grep ‘vnc'” and both returned nothing. Do I need to manually start tigervnc or should it just start following the install?

    I could also be a noob here and I’m not checking correctly…..

  8. Hi Griffon,

    I tried your guide and I was able to connect to the vnc server.

    However, I got a blank screen

    Below is the error log from my .xsession-errors logs:

    openConnection: connect: No such file or directory
    cannot connect to brltty at :0
    Xsession: X session started for test at Isn Sep 19 20:31:37 MYT 2016
    localuser:leow being added to access control list
    openConnection: connect: No such file or directory
    cannot connect to brltty at :0
    upstart: gnome-keyring-ssh main process (2217) killed by TERM signal
    upstart: gnome-session (Unity) main process (2326) terminated with status 1
    upstart: logrotate main process (2205) killed by TERM signal
    upstart: bamfdaemon main process (2263) killed by TERM signal
    upstart: upstart-dbus-session-bridge main process (2272) terminated with status 1
    upstart: hud main process (2313) killed by TERM signal
    upstart: indicator-bluetooth main process (2366) killed by TERM signal
    upstart: indicator-power main process (2375) killed by TERM signal
    upstart: indicator-datetime main process (2378) killed by TERM signal
    upstart: indicator-printers main process (2387) killed by TERM signal
    upstart: indicator-session main process (2392) killed by TERM signal
    upstart: indicator-application main process (2398) killed by TERM signal
    upstart: Disconnected from notified D-Bus bus

    Am I missing anything?

    Thanks

    Regards,
    Singapore

  9. @Singapore,

    Hello there, we are looking into this issue, you are not the only one mentioning issues with this new procedure
    Can you describe you current configuration ? Please answer following questions

    Which Ubuntu Version are you running (Ubuntu 16.04.1 or previous version)?
    Is this a fresh installation of ubuntu or existing one ?
    Are you using the .xsession file or the startwm.sh file for the unity command ?
    Try to use the .xsession file only and only add the command unity in it
    have you installed and checked that the vncserver running is actually the Tigervnc (and not vnc4server) ?

    If you want to help in improving this procedure (and if you have time), can you try to install an alternate desktop and then try to launch the unity command to see what could be the errors and get some more inputs ?

    So far, we have not been able to reproduce this error but we are looking and working on that so we can provide some updates about the topic

    Hope this help
    Till next time
    See ya

  10. @John Pearce,

    It should start automatically. Checking on my system, I do not have a tigervnc but simply a vncserver service.
    Simply check that the vnc4server is not installed (try to remove it, if it’s not there, you will be notified – sudo apt-get remove vnc4server)
    Is this a fresh install of Ubuntu 16.04.1 + updates or comes from ugprades ????

    Check your Startwm.sh file, your logs report an error about unexpected or unknown operator….

    Till next time
    See ya

  11. Connect is good 🙂 But I am still can not change the layout during operation 🙁
    Ubuntu 16.04 Unity XRDP

  12. @Mikhail,

    Thank you for the feedback …for the keyboard use the standard way so far using the keygen utility…We have to check again but normally you should be able inside the xrdp session to issue the setxkbmap command
    so in theory, you should be able to set different keyboards -> we will check and provide information later on this topic

  13. @Griffon, thanks for the blog.
    I’ve an Ubuntu 16.04, and installed per your instructions directly on it.
    It worked for me the 1st time, hurrah, made the .xsessions mod and then after the recommended logout with the kill stopped working.
    Now when I try win10/ mstsc.exe I get a screen but its blank – no response from ubuntu16.04/xrdp/tigerVnc.
    I made the .xsession simple just “unity”
    My .xsession-errors reliably says
    openConnection: connect: No such file or directory
    cannot connect to brltty at :0
    ——
    no matter what I try. I rename the .xsession-errors each attempt to monitor when its created.
    I’ve tried reinstalling xrdp, and also
    sudo dpkg -i tigervncserver_1.6.80-4_amd64.deb
    I do have one wrinkle, I initially installed xfce4, but now have completely removed it
    dpkg –get-selections | grep xfce
    shows no xfce.
    I’m not very knowledgeable on this but the .xsession-errors is only created when I login from my console. So its only starting up when I login in
    I have tried
    rm ~/.gconf ~/.gconfd ~/.metacity ~/.compiz-1 ~/.config/compiz-1 ~/.config/dconf -rf
    per a comment on rm ~/.gconf ~/.gconfd ~/.metacity ~/.compiz-1 ~/.config/compiz-1 ~/.config/dconf -rf

    thanks for any insights

  14. @Steve,

    Is then your problem fixed ? can you connect to your unity desktop now ?
    Are you performing a secure xrdp connection through ssh ? if this is the case, then yes, you would need to install ssh

    Till next time
    See ya

  15. @Neilh20,

    No clue at the moment..have to test but have no time. Do not worry about the .xsession-errors. the errors you see are quite common and does not prevent you to use XRDP. I have exactly the same errors when I connect to Unity via XRDP and it goes through

    will try to perform some testing about that

    Till next time
    See ya

  16. I’m trying to get this to work on lubuntu – and use the lxde environment.

    What did you put in the .xsession file to get LXDE to launch? with “LXDE” i get an error connecting after it establishes the session.

    THANKS!!

  17. @Jonathah Thomas.

    If you are using Lubuntu edition, you can try the following options

    option 1 – .xsession file empty (because you have only one desktop session defined, it might take the lxde automatically
    Option 2 – modify .xsession and have the following line in .xsession file: lxsession -s LXDE -e LXDE > ~/.xsession (this might fail as you have installed the full lubuntu desktop env)
    Option 3 – modify .xsession and have the following line in .xsession file : lxsession -s Lubuntu -e LXDE

    Hope this help
    Till next time
    See ya

  18. This works perfectly and if you replace unity with gnome-shell (after an apt-get install gnome-shell) it is lightening fast. Thank you very much.

  19. Hello @All,

    first:thanks for the great HowTo!

    I face two problems currently:
    1) I still do not get the indicator panel. Nod Idea why….
    2) I need to log on on the physical machine first (once) to mount my HDD’s form the file explorer (seems to be a rights problem)

  20. @Markus,

    You should see the indicator panel if you look in the post in the Detected issues section…..
    The indicator panel should show up but there are still some other issues..
    The post describse a process that still work in progress in order to have unity interface running through xrdp….
    We are working on a new post that could provide better functionalities….

    For the other issue, I do not understand the mount my hdd part…what are you trying to do .?

    Till next time
    See ya

  21. I am able to connect except I just see the desktop background. There is no sidebar or task bar at the top. I can right click and open a terminal session and see files or folders that I create while connected via remote desktop but that is about it. Any ideas?

  22. @Dave,

    Can you provide more info about your setup…. Which version of Ubuntu are you using 16.04, 16.10,…Which version of xrdp are you using ? can you check 0.6.x or 0.9.x ?
    Can you check the ~/.xsession-errors file to see if any hints or info can be useable ?

    have you checked the section Detected issues and populated the file with the proper content in order to see the top bar and indicator bar..
    Waiting for your feedback

    Till next time
    See ya

  23. Hello Griffon,

    >For the other issue, I do not understand the mount my hdd part…what are you trying to do .?
    I have installed two additional HDD in my PC which show up in the file manager as HHD device 1 and 2. the get mounted only if I press the HD1 or HDD2 button in the file manager. (OK, I could have mounted them properly via fstab …, but anyway). And exactly this is failing when I’m connect remotely with an error message regarding insufficient rights. Also with running some proprietary tools I also experience issue which can be explained due to missing rights. However everything works perfectly when done directly in front of the machine.
    Is there any difference in rights when logged in remotely?

    >You should see the indicator panel if you look in the post in the Detected issues section…
    >The indicator panel should show up..
    I have tried to do what is described in this mentioned section. But it died not work out for me.
    That’s why I’ve asked.

  24. @Markus,

    Got it for hdd, but I have no clue because we never had such situation…but there is a difference between console and remote session (especially in latest version)
    So you have access to your unity desktop through xrdp but not the indicator panel…right ? have you tried to run the command in a terminal console within your remote session and
    see which kind of error you might have. as an alternative, you could install gnome 2 and use the gnome 2 panel and menu as a replacement

    Hope this help
    Till next time
    See ya

  25. @Peter
    I followed your instructions, and everything works just fine.
    There are no problems with neither logout nor performance.
    I am able to connect from Windows (Remote Desktop Connection) and Ubuntu (Remmina).

  26. @Aslak,

    Thank you for the feedback and sharing your findings…
    As updates are deployed to Ubuntu, we have seen that some of the problems or issues tends to be fixed with time….
    Thanks again for the visit…

    Till next time
    See ya

  27. This doesn’t work.
    Unity always crashes with “composite” error.
    XFCE works ok, but then the keyboard layout is stuck on US layout.
    I believe the code has too many bugs and is not really ready for general use.

  28. @Peter Farrow,

    We are sorry to hear that the guide didn’t help you in setting up xRDP with Unity. It actually works as you can see in this small video (http://c-nergy.be/blog/?p=10011)
    Unity with xRDP is still new and work in progress…but with time… it should become easier.
    The keyboard issue should be fixable….You need to change either using the xrdp keygen utility or even within the xrdp, you should be able to change keyboard layout easily…

    Till next time
    See ya

    Till next time
    See ya

  29. Great guide and worked perfectly when I tried connecting from RDP client on windows, however on the Microsoft RDC client running on a macBook (OS Sierra), I get connection issues. The client initially connects and I see the x desktop and the graphics status panel appears as normal, but then I get the message:
    connecting to sesman ip 127.0.0.1 port 3530
    sesman connect ok
    sending login info to session manager, please wait…
    xrdp_mm_process_login_response: login successful for displa
    started connecting
    connecting to 127.0.0.1 5910
    error – problem connecting

    OK

  30. @Paul,

    first check the version of xRDP you are using (is it 0.6.x or 0.9.x) ?
    This error usually means that there is a problem with the vncserver. Are you sure that the vnc server is running ? can you check logs to see if you can find more information about the error. Have you tried at least 2 login ? It happens that the first one fails and the second one is just kicking in… May be check this post as well (http://c-nergy.be/blog/?p=10196). it’s for ubuntu 16.10 and this might you provide you with some more insight ?

    Hope this help
    Till next time
    See ya

  31. Hi, I am running XRDP v0.6.1-2 (there is an xrdp service showing in systemd as running).
    vncserver is not running (and configured not to run at startup). I have tigervncserver (tiger 1.6.80-4) installed, but I don’t see it listed as a service under systemd (I am using webmin to view services). Should this appear as a service in the list?

    I can logon from Windows 10 using the regular mstsc.exe client just fine. Its just with the MS client running on a Mac that I have issues.
    As far as logging in, I don’t get past the error screen I mentioned. I can try 10 times straight with no improvement. From windows logs in 1st time without issue.
    Thanks, Paul

  32. I tried your Mate procedure first and then this one. When I use RDP I still get the Mate desktop rather than Unity. My .xsession file contains only ‘unity’. Any ideas?

  33. @Zaphod,

    Restart your machine (to be sure that you do not connecting to an existing session where Mate Desktop is running)
    Empty the .xsession file and try to login. You should get a black screen or a gray screen or connection should fail.
    IF you try to connect and the mate desktop is still shown (while the .xsession file is empty), check the /etc/xrdp/startwm.sh file and ensure that you have the correct Desktop Env. defined
    Check logs to see if any info can help us to find out the problem

    Hope this help
    Till next time
    See ya

  34. Hi,

    I can connect to my machine fine, but I can’t login!

    Connecting to sesman IP 127.0.0.1 port 3350
    sesman connect ok
    sending login info to session manager, please wait…
    xrdo_mm_process_login_response: login successful for display
    started connecting
    connecting to 127.0.0.1 5910
    tcp connected
    error – problem connecting

    Any ideas?

    Thanks!

    — MK

  35. @Jeff,

    Thank you for the feedback and positive comments….
    we are always pleased when one of our post is useful and can bring added value to the community

    Till next time
    See ya

  36. @Mike K.

    I do not really have an idea about what could be causing the issue. Root causes could be multiple. Can you have a look at the xrdp logs and see if you could see if additional info or message can help provide some directions into solving this issue. Check basic stuff as well, Firewall is off, check that the machine is listening to port 5910,…
    Have you tried to connect multiple times or once only. you should try at least two time to see if you could go through…

    Hope this help
    Till next time

    See ya

  37. I have this working correctly on one system and another it won’t do anything but go to a black screen after successful login.

    I’m completely at a loss. These are essentially identical virtual Ubuntu 16.04.01 LTS. I’ve copied the config files from the working one to the non-working one. I’ve uninstalled and re-installed xrdp and tigervnc.

    It always ends up at a black screen with the logs showing it reconnecting to the display.

  38. @Jared,

    This is a strange one… First, I would check which version of xrdp you are running on both systems (is it version 0.6.xxx or 0.9.xx). Maybe an Ubuntu updates has changed the version of xrdp and you should then change the session manager to perform the connection. you should use the xrdporg option. When connecting to your Ubuntu machine with the black screen, if you right-click do you see a contextual menu, if yes, open a command prompt and issue the command to start the Desktop environment… (unity)….Another thing that you might want to check is, when remote login into your system, are you using the same user account…and both accounts are logged on at the same time… Try to reboot the machine, do not logoff to console and only try to remote desktop,…. what’s the results…

    Hope this help
    Keep us updated with the issue so we can try to help you
    Till next time
    See ya

  39. I have exactly the same issue with Mike K and some others…

    Connecting to sesman IP 127.0.0.1 port 3350
    sesman connect ok
    sending login info to session manager, please wait…
    xrdo_mm_process_login_response: login successful for display
    started connecting
    connecting to 127.0.0.1 5910
    tcp connected
    security level is 2(1 = none, 2 = standard)
    sending share flag
    receiving server init
    error – problem connecting

    log:

    Log:

  40. Xsession: X session started for at Sunday 12 February 22:40:44 AEST 2017
    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 109 (X_ChangeHosts)
    Value in failed request: 0x5
    Serial number of failed request: 6
    Current serial number in output stream: 8
    localuser:roy being added to access control list
    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 109 (X_ChangeHosts)
    Value in failed request: 0x5
    Serial number of failed request: 6
    Current serial number in output stream: 8
    openConnection: connect: No such file or directory
    cannot connect to brltty at :0
    compiz (core) – Info: Loading plugin: core
    compiz (core) – Info: Starting plugin: core
    compiz (core) – Fatal: No XKB extension
    Xlib: extension “XInputExtension” missing on display “:10.0”.
    compiz (core) – Info: Loading plugin: ccp
    compiz (core) – Info: Starting plugin: ccp
    compiz (core) – Info: Loading plugin: composite
    compiz (core) – Info: Starting plugin: composite
    compiz (core) – Fatal: No composite extension
    compiz (core) – Error: Plugin initScreen failed: composite
    compiz (core) – Error: Failed to start plugin: composite
    compiz (core) – Info: Unloading plugin: composite
    compiz (core) – Info: Loading plugin: opengl
    compiz (core) – Info: Starting plugin: opengl
    compiz (core) – Error: Plugin ‘composite’ not loaded.

    compiz (core) – Error: Plugin init failed: opengl
    compiz (core) – Error: Failed to start plugin: opengl
    compiz (core) – Info: Unloading plugin: opengl
    compiz (core) – Info: Loading plugin: commands
    compiz (core) – Info: Starting plugin: commands
    compiz (core) – Info: Loading plugin: grid
    compiz (core) – Info: Starting plugin: grid
    compiz (core) – Error: Plugin ‘composite’ not loaded.

    compiz (core) – Error: Plugin init failed: grid
    compiz (core) – Error: Failed to start plugin: grid
    compiz (core) – Info: Unloading plugin: grid
    compiz (core) – Info: Loading plugin: move
    compiz (core) – Info: Starting plugin: move
    compiz (core) – Fatal: No composite extension
    compiz (core) – Fatal: No composite extension
    Segmentation fault (core dumped)

  41. @Roy,

    Ok, We see that indeed some people are encountering such issue when connecting via xrdp to Ubuntu 16.04….. If possible, the only advice we could provide would be test (and then possible upgrade your system to Ubuntu 16.10…. Because of the xrdp package has been updated to the latest version this could probably fix you issue… You can have a look at the following post that provide instructions to install xrdp on Ubuntu 16.10 (cfr http://c-nergy.be/blog/?p=10196) and check if it works for you….

    Check the comment section (one of the last comment) where a reader has provided a workaround in order to have the desktop start when login into the xrdp session n

    Hope this help
    Till next time
    See ya

  42. Hi Griffon,

    Thanks a lot for your guidance. Now I could connect Ubuntu from Win7. But I have a problem that the “firefox” can’t be open via remote desktop [it’s ok to open it via UltraVNC].

    Could you help check? Thanks in advance.

  43. @huhaohoo,

    No idea of what the problem could be….Some people reported this kind of issues but we never experienced the situation….
    We would need to look for this and try to see what would be the problem…

    Till next time
    See ya

  44. Thanks a lot for the comprehensive guide! I managed to setup XRDP on Ubuntu 16.04 following your guide and connecting from a Windows 10 machine works fine. However i’m facing few minor annoying things which i’ve been trying to resolve during the last few days without any success.
    – Clipboard is behaving strange. For example is i select a text from the terminal in Ubuntu i’m able to paste it in Windows. But if i select something from let’s say Firefox or a name of a file from Nautilus it’s not copied.
    – Scrolling with two fingers on a touch pad is not working. scrolling with a regular mouse however works fine.
    I tried playing with VertTwoFingerScroll=1 option, but i haven’t managed to fix it so far, probably i’m not putting the option in the right place.
    – Even though i have disabled all sounds in Ubuntu, sound is trying to pass through the RDP connection. Example for this is the following – connect from Windows to Ubuntu 16; open a terminal; press and hold backspace; a clicking noise starts coming from the speakers of the Windows machine and the picture gets frozen until the clicking noise stops. it’s quite annoying because if you hold it longer, the clicking noise will continue longer and during that time the RDP connection is totally frozen until the noise stops.

    i know those issues are quite specific, but i’ll appreciate it if you take a look and let me know if you have a solution for them.

  45. @d_ave,

    Thank you to bring this points to our attention. We will try to have a look at some of them but not all. We are currently quite busy and we have not much time to blog lately.
    We will do our best
    Thank for the visit and the feedback
    Till next time
    See ya

  46. Thanks for this guide. I am using i3 wm for xrdp. So I have just put “i3” in my .xsessions file.
    Everything seems to work fine, but tab completion in Terminal freezes for a while (1-2 seconds). This happens on both bash and zsh shells. Also, I see Vim freezing sometimes.
    Any guess why tab completion or Vim is freezing, any suggestion to stop this?

Leave a Reply