Ubuntu 14.10 – How to install XRDP and have it working

xrdp14.10_logo

Hello World,

This is the moment of the year where a new release of Ubuntu will be made available.  Ubuntu 14.10 will be released on October 28h 2014 and we already released the traditional post about how to perform a fresh install.  So, it’s time to check if the xrdp package combined with the Unity desktop is working or not.

If you follow me, you know that we have already explained how to configure xrdp software using different versions of Ubuntu.  If you didn’t know about that,  you can have a look at the following posts :

We have also explained how you could reconnect to an existing session, using different methods

Since Ubuntu 12.10, Unity-2d desktop environment does not exists anymore.  Since then, you cannot remotely connect to your Unity Desktop using either vnc solution or xrdp solution.  To have xrdp working against a recent version of ubuntu, you need to install a alternate  desktop interface.   We have already described how to install these desktops and have them working in conjunction with xrdp.  Check these posts

As you can see, we have posted quite a lot of information regardint xrdp and Ubuntu.  So, in this post, we will perform a standard installation of xrdp and see if Ubuntu 14.10 can still be accessed remotely from a Windows machine

Let’s Go !

Install XRDP Package from Ubuntu Repository

In this post, we will be installing the standard xrdp package from the Ubuntu Repository. In order to perform the installation of the xrdp package, you will login into your ubuntu 14.10 machine.

Using the Dash button, in the search box, type Terminal

Click on Picture for Better Resolution

Click on the terminal icon and the Terminal console will open

In the Terminal, type the following command

sudo apt-get install xrdp

You will be prompted for your password

Click on Picture for Better Resolution

You will be then informed about the package size. To proceed with the installation, press Y

Click on Picture for Better Resolution

Wait for the completion

When done, you need to install an alternate desktop environment. So, let ‘s move to the next section….

Choose your alternate Desktop Environment to be used with xRDP

 

Now that you have installed the xrdp package, you need to install the alternate desktop to be used during remote session.  As mentioned earlier, you can select from different Desktop Environment.  We will describe here after the installation process of some of them.

Note : From the list below, you select your preferred desktop interface (i.e. only one desktop interface) and you install it and then you move to the next section

xfce Desktop Interface

The xfce desktop is the de facto desktop that’s installed when people want to use xrdp on ubuntu.  Xfce is a light   desktop interface and work ok with xrdp.  However, the xfce interface is a little bit too old and aged to compete with other desktop available out there.  If you would like to use the xfce desktop in conjunction with xrdp  from a terminal session, type the following command

sudo apt-get update

sudo apt-get install xfce4 

Click on Picture for Better Resolution

You might be prompted for a password.Enter the password and press enter . You will be then informed about the package size. To proceed with the installation, press Y

Wait for the completion

LXDE Desktop Interface

The LXDE desktop is also a quite standard desktop interface and quite lite. Compared to xfce interface, the lxde has  a more modern look n feel.  If you would like to use the lxde desktop while connecting via xrdp, you can perform the following actions

sudo apt-get update

sudo apt-get install lxde

 

MATE Desktop Interface

Mate Desktop is gaining some attention since this desktop is the most approching version of not-working-anymore     gnome 2 under Ubuntu.  This desktop interface is really working well and provide a known interface to users who had   experience with gnome 2 interfaces.  If you would like to use the mate desktop in conjunction with xrdp  from a terminal session, type the following command

sudo apt-get update

sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

Note : 

There is a new Mate-desktop package (1.8.1) available directly from ubuntu repository.  We did not install this one because we have encountered a small issue after the installation.  The Unity greeter is replaced by the Mate-desktop greeter.  If I have to choose between Unity and Mate-destkop greeter, I think that the unity greeter has a better look n feel than the other one.

If you would like to try the  Ubuntu Remix MATE 1.8.1, you can issue the following command 

sudo apt-add-repository ppa:ubuntu-mate-dev/ppa

sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install –no-install-recommends ubuntu-mate-core ubuntu-mate-desktop

 

Configure xrdp to use your desktop environment

At this stage, you have normally installed your preferred desktop (can be xfce,mate or lxde). Now, you have to tell xrdp that it needs to use this desktop while performing your remote desktop connection.  One way to configure your system is to create and update the .xsession file.

Note :

If you have multiple users on the system that needs to connect, you will need to configure the xsession file for each user !   (or you can update the startwm.sh file to automate the process – this is the topic of a near to come post)

In order to configure your xsession file (based on your preferred Desktop), you will need to execute the following operations

xfce Desktop Interface

If you have installed the xfce desktop interface,  from the terminal console, you will issue the following command

echo xfce4-session >~/.xsession

Restart the xrdp service by issuing the following command

sudo service xrdp restart

LXDE Desktop Interface

If you have installed the xfce desktop interface,  from the terminal console, you will issue the following command

echo lxsession -s LXDE -e LXDE > ~/.xsession 

Restart the xrdp service by issuing the following command

sudo service xrdp restart

MATE Desktop Interface

If you have installed the xfce desktop interface,  from the terminal console, you will issue the following command

echo mate-session >~/.xsession

Restart the xrdp service by issuing the following command

sudo service xrdp restart

Test your xrdp connection

At this stage, you should have a basic xrdp working solution. When I say basic, I mean that you can indeed connect to your remote Ubuntu machine but if you disconnect your session and try to connect again, you will each time open a new session.

Go to your windows machine, start remote Desktop client and enter the ip address/name of your ubuntu machine

Click on Picture for Better Resolution

You should see then the login screen of xrdp presented to you. Note that, at this screen (and because we have not configured keyboard layout yet), the keyboard layout is set to English by default.

Click on Picture for Better Resolution

Note : Ensure that in the module drop down box, you have selected the option sesman-Xvnc if you want to have a working xrdp session.

Enter your username and password and Press OK

You will see a dialog box showing the login process

Click on Picture for Better Resolution

If everything is configured correctly,you should see your desktop loading and you should be able to perform your work through this desktop environment.

xfce desktop via xRDP

Click on Picture for Better Resolution

lxde desktop via xRDP

Click on Picture for Better Resolution

mate desktop via xRDP (my favourite)

Click on Picture for Better Resolution

Configure your Keyboard layout at the xrdp Login screen

As explained above, with no special configuration, the xrdp login screen keyboard layout is set to english by default.  if you need to change it to another keyboard layout, you should proceed with the following actions

This is the command you should issue in order to change the keyboard layout to be used during xrdp sessions…

Step 1 : You go to the /etc/xrdp directory

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

Step 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

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

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

Reconnect to the same session 

Important Update

In the ubuntu 14.10 final release, the xrdp package has been updated and it seems that you do not need to configure anything else in order to reconnect to your session.  The package has been fixed.  So, now after you have performed your installation, and after configured your xrdp keyboard layout correctly,  you should be able to connect to the xrdp server. If you disconnect and reconnect again, you should see your running session available.  Cool ! Finally somebody has fix this !

We have not checked yet if on  Ubuntu 14.04, if you update the xrdp package you can end up with the same result (but we assuming so)….

We have spoken about this subject in the past.  If you search on our blog, you will find different ways to achieve that.  The best way consist of performing a custom installation and use x11VNC software. (see this post http://c-nergy.be/blog/?p=5439)

Another way consist of modifying some configuration files. This method might be the preferred one by some users because you can still use the xrdp package from Ubuntu repository and being able to reconnect to the same session. Check this post http://c-nergy.be/blog/?p=5382  – Section how to reconnect to existing session )

This post is becoming serioulsy long so we will stop here and come back on some additional configuration you might want to perform.

Final Notes

As you can see the process has not changed that much when using xrdp and remote desktop client tool. The processes described for ubuntu 14.04 are still applicable for ubunt 14.10.  So, if you are used to install and configure xrdp with Ubuntu, this version should not be a problem for you.

In the coming weeks, we will update the post related to the custom xrdp installation. We will also show you how you could use xrdp solution to access Unity Desktop interface and have access to the console session.    Don’t get overexcited.  This is really a dirty workaround where you can indeed access the console session. Because you access the console session, you should be able to access also the Unity Desktop

Till next time

See ya

36 thoughts on “Ubuntu 14.10 – How to install XRDP and have it working

  1. Connecting to Sesman ip 127.0.0.1 port 3350
    sesman connect ok
    sending login info to session manager please wait…
    xrdp_mm_process_login_response: login successful for display
    started connecting
    connecting to 127.0.0.1 5910
    error – problem connecting

    have edited startwm.sh to point to xfce4 as per the first option of this install. still not working, ufw disabled, ports are all open. what am i doing wrong? its a remote server connection via ssh, i cannot see the server desktop environment.

  2. hello John,

    I have no clue of what the problem could be. Can you provide me more information ? I just provide you a checklist of things you might wanna check. I’m assuming that some of these steps are not relevant for you but I listed them here…

    1. have you installed the xrdp package
    2. can you check that vnc4server is installed as well (xrdp has a dependency on vncserver)
    3. in the login box xrdp, can you ensure that you select the option sesman-xvnc
    4. Can you login once on your ubuntu machine (not via xrdp) using he xfce desktop option ?
    5. Can you check that no typo is present in the .xsession file
    6. can you check that xrdp and vnc server is started on the ubuntu (ps aux | grep *vnc*)
    7. Can you provide a extract of your log files when you trying to access the xrdp ? (xrdp log files)
    8. try to restart your server completely and try again.

    if nothing fix your issue, provide us the content of the log files and the content of .xsession

    Hope this help
    Till next time
    See ya

  3. This page helped for LXDE… Particularly the last comment, where they mentioned that adding “lxsession -e LXDE -s Lubuntu” to the end of startwm.sh

  4. Thank for the input.
    This information has already been discussed in another post (in the comment section) but this might be still useful

    Till next time
    See ya

  5. In the section titled “Test your xrdp connection” you describe connecting using a Windows client but do not mention using an Ubuntu client to test the connection. Is there no Ubuntu client because this is a Windows-only protocol? The other possibility is that using Ubuntu is so obvious that you didn’t feel it was needed in which case I apologize. Your instructions are so detailed they attract a noob like me. So if you could just say a word about which app is best on the client side in Ubuntu (if it’s even possible) I would appreciate it. I’m using Ubuntu 14.10 on the server side and 14.04 as the client. I am upgrading from Ubuntu 12.04 and NoMachine’s free server which is no longer available so I really appreciate your nice post here for doing remote sessions on 14.10.

  6. Hello Mike,

    There are plenty of remote desktop client on Linux. The main tools (or most common tools) are rdesktop or freerdp (remmina rdp client).
    You are right in the fact that we never explained how to connect from a linux machine. As soon as we have some time, we will write a small post
    that would cover connections from Linux boxes

    Thank for the visit
    Hope this help

    Till next time
    see ya

  7. Thanks, that was very helpful. I tried Remmina as a client following the rest of your instructions and it worked great! The instructions for Windows works except I was able to use the Ubuntu computer name in Remmina instead of the IP address (thankfully since my IP’s are dynamic).

    The xfce desktop is OK but I thought I would try the Mate desktop but the install failed with the line:

    sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

    The response was as follows:

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package mate-core
    E: Unable to locate package mate-desktop-environment

    I expect a PPA is required but the xfce desktop is fine for me so I did not pursue it further.

  8. Hello Mike,

    Happy to hear that you were able to perform rdp connection from Ubuntu/linux machines. For the MATE desktop, you have to add the ppa indeed. In the post, you sould see the commands to include the mate desktop from ubuntu repository. I will check for the command you issued. we are aware that some changes have occured at repository level…

    As soon as I have some time, I will update or provide a new post about these topics

    Till next time
    See ya

  9. I tried on my 14.10 Ubuntu, but upon connecting with my client, I only get a black screen.

    No errors, no nothing, just a blank black screen.

    Any suggestions?

    I’m using the defaults all the way

  10. HEllo Lars,

    Which alternate desktop are you using (MATE/LXDE/XFCE) ?
    have you updated the .xsession file with the correct information ?
    if you need to have multiple users connected to the system, have you updated the startwm.sh accordingly (Enable multiple users to connect via xrdp – HowTo Configuration)

    If you have a blanks screen; it’s usually means that no alternate desktop is installed or you have made a mistake in the .xsession or startwm.Sh file

    You have logs files for xrdp and for .xession. have a look at them to see if you can see where the problem lies

    Hope this help
    Till next time

  11. I didn’t realize I needed a desktop interface in addition to XRDP before reading this. I used MATE and it worked perfectly, first try. Thanks.

  12. Hi

    I am using Xubuntu 14.10 64-Bit. I followed your instruction and have xRDP as well as vncserver installed. When I log in the RDP, I briefly get a gray screen, then it disconnects. Any suggestions?

  13. Hello Lynn,

    can you try to modify your file /etc/xrdp/startwm.sh which should look like this
    #!/bin/sh

    if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
    fi

    startxfce4
    and check if this is working….

    we assume that you have installed xrdp package (including the vnc4server)……

    Let us know if this is working…

    Till next time

  14. have problem with layout =(
    why it is very difficult

    setxkbmap does not worked:
    xkb extension not present on :10.0

  15. Hello There,

    You have to run the setxbkmap command while locally logged on on your ubuntu. In general, you are receiving the xkb extension error when you run the command while you are connected to your xrdp session. You do not run this command through your XRDP Session but locally.

    Hope this help

    till next time
    See ya

  16. Hi

    Thank you for the detailed explanation.
    According to your instruction, I installed MATE on my Ubuntu 14.10. I connect to my Ubuntu from Windows 7 successfully. However, I do not see the opened programs there. I see just the desktop!
    Any suggestion?

    Regards

  17. Hello Ros,

    Did you connect a first time through xrdp, open some applications, disconnect from the xrdp session and reconnect back to the session. If you did that, you should connect to the same XRDP session.

    IF you were logged in your ubuntu machine physically (not using any remote desktop access or vnc access), open applications and then used xrpd -> You will not see your applications in XRDP. You are connected to two different user session.

    IF you really need to connect to the “Console” Session, you can try the following trick (see : http://c-nergy.be/blog/?p=5956)

    I hope this answer you question

    Till next
    Best Regards

  18. This is a great tutorial thanks!, now I have my ubuntu server up and running and can be accessed through rdp, my problem now is with the installation of the editor “Atom”, once is installed I can’t open it because of this error “Xlib: extension XInputExtension missing on display 13.0” if you have some clue about what can I do to solve it please share it! thanks again!

  19. Hello Roman,

    thank for the feedback…
    the problem seems related to atom which has some dependencies that are not supported when connecting via xrdp…
    other people have the problems but no solutions have been found yet

    We will try to keep an eye on it and see if we can come up with something
    Hope this help
    Till next time
    see ya

  20. I saw the comment you left to Lynn @Griffon
    “Hello Lynn,

    can you try to modify your file /etc/xrdp/startwm.sh which should look like this
    #!/bin/sh

    if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
    fi

    startxfce4
    and check if this is working….

    we assume that you have installed xrdp package (including the vnc4server)……

    Let us know if this is working…

    Till next time”

    How would I do this if I wanted to run Gnome, and I already have it installed? Thanks!

  21. Hello Michael,

    If you mean Gnome 3 -> this is not supported by xrdp (as far as we know). this is why you have to install an alternate desktop environment.
    The desktop environment can be mate-desktop (similar to gnome 2), xfce, kde, lxde,lxqt. To see which command you need to insert in your file, please read the XRDP FAQ post (check http://c-nergy.be/blog/?p=5984). Have a look to Question 3 and consecutive ones

    Hope this help
    Till next time
    See ya

  22. Because it might help somone like me someday.

    I was logging into remote connection for ubuntu 14.10 fine but screen was black. i tried several pages and tried to fix this.

    What it finally was.

    When i would connect in i had my username in the username field and it was causing the issue. I deleteed it and it asked for my username and password and it worked great after that.

  23. hello there,

    i’m running ubuntu server 16.04 on a RPI 3. Xfce4 is installed so is xrdp. I also run the echo xfce4-session >~/.xsession command . To make the story short whenever i try to log from win10 using Remote Desktop I can log into Ubuntu but I get gray/black dotted screen with a X cursor. Theres no way I can get it to work. Does anyone can help?

  24. @Davide,

    Please review the following post http://c-nergy.be/blog/?p=8952
    Using the .xsession file is not working anymore, you have to update the startwm.sh with the command that start your desktop interface (xfce-session for xfce or mate-session for MATE desktop…..)

    Hope this help
    Till next time
    See ya

  25. Which GUI desktop is the best to use? I mean which one work out of the box? What is the difference between xrdp and/or VNC? Which on is better for me to use?

    Thank you,

  26. @Lidia,

    In ubuntu 14.10, the best option (for us) would be Mate-Desktop. You need to install the component and configure it on your ubuntu box

    If you are using ubuntu 16.10, you can use the Unity interface (Out of the box) with some minor issues. for full details, have a look at http://c-nergy.be/blog/?p=10196

    If you want to use another Ubuntu distribution (but still based on Ubuntu 16.10), have a look at the xrdp section of the blog to see what can be done. The best starting point would be this link http://c-nergy.be/blog/?p=10273. We will update links as we publish the article about the Desktop environment we are using

    I hope this would be helpful
    Till next time
    See ya

  27. Yo man i need some help i have been using xrdp for 3 months and then i did something made the other day and now when i open remote desktop and so on its all black i can’t login! what is going on?

  28. I have a PCduino3 nano running Ubuntu 14. Have tried everything I can find on the internet to solve this message: XRDP_mm_process_loging_respone: login failed. The MAC get RDP connecting, but gets an error message:
    XCFE4 is installed.
    The full message is:
    connecting to sesman ip 127.0.0.1 port 3250
    sesman connection ok
    sending info to seaman manger, please wait..
    xrdp_mm_process_loging_respone: login failed.
    I think the problem is the password.
    who command yields two “root” and “linaro” for username.
    ls /home yields “linaro”
    Changing “linaro” password does not help.
    Looking at /etc/ “shadow” shows no username.
    If I logout and try logging in as “linaro” password does not work.
    I am using Microsoft Remote Desktop.
    Any suggestions would be greatly appreciated.
    Thank you,
    Bill

  29. @Bill Batie,

    It seems indeed that the password you entered is not valid…. Can you check that the keyboard layout is the correct one ? by default, xrdp login in older version of Ubuntu would use En-US layout by default.
    Secondly, can you check the log files to see if there is any hints that would help us correct the issue (check /var/log/xrdp.log and /var/log/xrdp-sesman.log and possibly ~/.xsession
    third ensure that a vnc server is installed and running as well

    Hope this help
    Till next time
    See ya

  30. No xrdp.log. xrdp-sesman.log just listed failures. X11vnc was installed. Gave up and re-installed the image and followed you procedure again except use LXDE instead of XFCE.
    Everything works fine now.
    Thank you,
    Bill Batie

Leave a Reply