Page 1 of 1

How to use xRDP for remote access to Ubuntu 14.04

How to use xRDP for remote access to Ubuntu 14.04
   318

To remotely control my Windows machines, I always prefer to use RDP (Remote Desktop Protocol) as it performs much nicer than VNC (Virtual Network Computing). VNC has this streak of “JPEG” quality and slow behavior, whereas RDP is fast and crystal clear.

RDP is however a proprietary protocol from Microsoft. So how can we use RDP to control our Ubuntu box remotely?

This is where xRDP comes in play, an open source remote desktop protocol (RDP) server. It actually runs VNC protocol over RDP as far as I understand, yet if behaves much better than VNC by itself (possibly because of the used desktop manager). Since Ubuntu 12.10 (if I’m not mistaken), xRDP doesn’t seem to work with the Ubuntu desktop anymore … unless you use an alternative desktop manager. This seems related to 3D acceleration and nobody seems to care (since 2011, according to bug reports).

Note : if you really need Copy/Paste functionality between the two machines, then please use Ubuntu’s default installed “Desktop Sharing” instead (MacOS X users read this forum post).




Desktop Manager

Since the current desktop manager of Ubuntu (Unity which runs on Gnome) no longer seems to work with xRDP, an alternative desktop manager needs to be installed.

I tried OpenBox, but wasn’t very impressed by the amount of work needed to get a reasonable desktop.

We will use another desktop manager that has been around for quite a long time is XFCE, which is lightweight and fast.

Note : A light weight desktop manager helps making a remote desktop connection much more enjoyable.

Installing xRDP and XFCE

Installing xRDP and XFCE is pretty easy, once you know what to do …

Just make sure you have an Internet connection before you start.

Using a newer xRDP for newer Linux distro’s … 

This article is already pretty dated (2014!), but for those wanting to install xRDP under a newer Ubuntu version (eg. v16.x), consider using a newer xRDP version like so (thanks EZ for the tip!):


sudo add-apt-repository ppa:hermlnx/xrdp
sudo apt-get update
sudo apt-get install xrdp

 

Step 1 – Install xRDP

We will use sudo and apt-get to update your system and install xRDP. Keep in mind that sudo will ask for your admin password.


1
2
sudo apt-get update
sudo apt-get install xrdp

Step 2 – Install XFCE4

Again we will use sudo and apt-get:


1
sudo apt-get install xfce4

  Optional, recommended by Neal, install XFCE4 terminal and 2 icons sets:


1
2
3
4
5
# Install XFCE4 terminal (way better than xterm)
sudo apt-get install xfce4-terminal

# Install icon sets
sudo apt-get install gnome-icon-theme-full tango-icon-theme

Step 3 – Configure xRDP

In this step we modify 2 files to make sure xRDP uses xfce4.

First we need to create or edit our .xsession  file in our home directory.
We can either use nano or simply redirect an echo statement (easier):


1
echo xfce4-session >~/.xsession

The second file we need to edit is the startup file for xRDP, so it will start xfce4.


1
nano /etc/xrdp/startwm.sh

The content should look like this (pay attention to the last line):


1
2
3
4
5
6
7
8
#!/bin/sh

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

startxfce4

Step 4 – Restart xRDP

To make all these changes effective, restart xRDP as such:


1
sudo service xrdp restart

Testing your xRDP connection

On the computer that will remotely control your Ubuntu machine, start you RDP client.

Windows comes standard with a Remote Desktop client (mstsc.exe – you can start it from a command prompt, or find the shortcut to Remote Desktop under Accessories).

For a Mac, Microsoft actually has a Remote Desktop Client which can be found in the Apple App Store, or you can use Cord (free).

Whichever client you use, most work with either the computer network name or IP address of your Ubuntu machine.

To find the IP address on your Ubuntu box, type:


1
hostname -I

(note: this is a capital “i”)

Depending on your RDP client capabilities and settings (for example: Microsoft RDP Client allows automatic login), you might or might not see the login screen.

Here we enter our Ubuntu username and password and click “OK”, after which briefly a window will show with the login process and you’ll have access to your Ubuntu machine, even though the desktop looks different. One downside I’ve discovered so far is that the clipboard is NOT being synchronized … so Copy and Paste between machines does not work properly.

 

xRDP - Login screen

xRDP – Login screen

xRDP - Your Ubuntu xfce4 desktop

xRDP – Your Ubuntu xfce4 desktop

 

Support Us ...


Your support is very much appreciated, and can be as easy as sharing a link to my website with others, or on social media.

Support can also be done by sponsoring me, and even that can be free (e.g. shop at Amazon).
Any funds received from your support will be used for web-hosting expenses, project hardware and software, coffee, etc.

Thank you very much for those that have shown support already!
It's truly amazing to see that folks like my articles and small applications.

Please note that clicking affiliate links, like the ones from Amazon, may result in a small commission for us - which we highly appreciate as well.

Comments


There are 318 comments. You can read them below.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.

  • Jul 21, 2014 - 6:26 PM - willy - Author: Comment Link

    Great Guide man very detailed as usual. this kind of stuff is what keeps making come back to your site. BTW im guessing you arr from NED if so Congrats man one of the greatest soccer teams. Love how they play. anyway by using this guide i was able to understand the whole concept of remote session vs vnc. I’ve been using vnc for a while but now that is about to change thanks to this awesome guide. ok just a lil note once i tried this i started looking for something a lil bit more native that a RDP port on ubuntu and i came accross this awesome project called X2GO great project should check it out man. Again thanks for all this great information you post on your site. keep up the good work

    Reply

    willy

    • Jul 21, 2014 - 8:03 PM - hans - Author: Comment Link

      Thanks Willy 

      Yeah, I’m from the Netherlands, although I have been living in the USA for almost 11 years now … 

      I have briefly looked at X2GO, but lost interest when I noticed the confusing setup/install – I’ll give it another try for sure! 

      Thanks 

      Reply

      hans

    • Jun 8, 2015 - 2:51 AM - Vijay Comment Link

      i have a Ubuntu 14.04 desktop installed.. 

      but when i tired to connect RDP into Ubuntu 14.04 machine from Win7 laptop, the connections established and then disconnected within a minute.

      if any suggestions would be grate :)

      Reply

      Vijay

      • Jun 9, 2015 - 3:58 AM - hans - Author: Comment Link

        Hi Vijay!

        Are you connecting over WiFi?

        If I’d have my gear nearby (I’m currently moving from the U.S. to Europe – so most of my stuff is in a big sea-container), I’d be able to help you. But maybe there is a log file you can find stating why the connection. Sorry that I can’t point you straight to the log files, but maybe this post at SourceForge might help you.

        Reply

        hans

      • Jul 1, 2015 - 11:43 PM - sam Comment Link

        I had the same problem without xfce. After adding .xsession on home directory with file content “xfce4-session”, problem solved.

        Reply

        sam

      • Jul 2, 2015 - 1:11 AM - hans - Author: Comment Link

        Thanks Sam for posting a solution! 

        Reply

        hans

  • Sep 5, 2014 - 4:10 PM - Dave Booth Comment Link

    Excellent solution, thank you!   I’d already installed xfce4 but xrdp was still displaying wrongly, the change that worked was to add ‘startxfce4’ to startwm.sh.  This is the first site I’ve come across that displays the working content of startwm.

    Reply

    Dave Booth

  • Sep 26, 2014 - 4:14 AM - John Leenen Comment Link

    Thanks Hans, this is really great! Everything’s working fine. A small remark: there’s a typo error in the filename of the startup file for xRDP: you missed the ‘t’ in startwm.sh, but that’s peanuts.

    Reply

    John Leenen

  • Sep 30, 2014 - 10:03 PM - julienb Comment Link

    thank you very much clear, easy and so usefull

    Reply

    julienb

  • Oct 7, 2014 - 1:50 PM - Hector Comment Link

    thank you very much for posting. Solved my problem!

    Reply

    Hector

    • Oct 8, 2014 - 2:32 AM - hans - Author: Comment Link

      Thank you Hector! Always appreciate it when readers take the time and effort to leave positive feedback! 

      Reply

      hans

  • Oct 9, 2014 - 6:38 AM - Pra sin - Author: Comment Link

    unable to start xrdp application in ubuntu14.04

    Reply

    Pra sin

  • Oct 9, 2014 - 6:59 AM - Sanket Atre Comment Link

    Thanks for all relevant details in easy steps …..!!!

    It works for me :)

    Reply

    Sanket Atre

    • Oct 9, 2014 - 7:01 AM - hans - Author: Comment Link

      Thank you for taking the effort to leave a positive feedback – very much appreciated! 

      Thanks 

      Reply

      hans

  • Oct 18, 2014 - 2:01 AM - ben Comment Link

    when i try to open a programe it opens in my old desktop not the one that is showing on the connected computer

    any idea how to fix this

    Reply

    ben

    • Oct 18, 2014 - 3:04 AM - hans - Author: Comment Link

      Could it be that you missed some steps in step 3? (config)

      Reply

      hans

      • Oct 18, 2014 - 8:35 PM - ben Comment Link

        its a gnome application only there is no way to vnc into gnome is there

        Reply

        ben

      • Oct 19, 2014 - 3:17 AM - hans - Author: Comment Link

        As far as I understand, this all depends on your windows-manager,… you’ll need a Gnome compatible one.

        Text I found at RealVNC (source):

        How do I get Gnome/KDE as my window manager [for VNC]?

        VNC will automatically detect your default window manager, and load this when you connect to your Xvnc session. If for some reason this is not the case, or you’d like to use a different window manager other than the default, you’ll need to edit

        ~/.vnc/xstartup

        This will not affect existing VNC desktops, only new ones. 

        The line to change reads:

           twm &

        The correct replacement depends upon the window manager you want to run and is not something we can provide a comprehensive solution for.

        However, for most versions of Gnome, use:

           gnome-session &

        For most versions of KDE, use:

           startkde &

        Reply

        hans

  • Oct 23, 2014 - 2:29 PM - Morholt Comment Link

    Thanks for the tut. only one small detail you have to use Sudo again for editing the config file. Otherwise you cant save the file. This tut works for Peppermint and other ubuntu based os too. 

    dank je nogmaals voor de tut..heb een tijd gezocht voor een goed oplossing! :)

    Reply

    Morholt

  • Oct 30, 2014 - 6:28 PM - Radu Comment Link

    Thanks for the guidelines. One more questions though: how do I connect from a Windows client to the session I already have running on the Linux desktop? I have found many posts about reconnecting to the same remote session, however, that is still different from the desktop session I leave behind. How do I tap into that one? I need an experience similar to the remote desktop behavior between two Windows machines. I need to connect to the Linux box (which is  Xubuntu 14.04) and land on the session I left behind when working directly at the desk.

    I searched for this a lot, I read this post twice, still have the question ..  

    If the info is here and I missed it (twice) I promise 10 push-ups for each reply that rubs my nose in the explanation  

    Thanks !!

    Reply

    Radu

    • Oct 31, 2014 - 4:29 AM - hans - Author: Comment Link

      Hi Radu,

      Haha, no need for push-ups!

      It sounds like you would want to use VNC for this. As far as I recall, VNC uses the existing desktop and each time you connect you’ll see the desktop you left behind. I’m not a big VNC fan, but it does work. Did you give that a try?
      (push ups for me if this only works that way when VNC server is used under Windows )

      Reply

      hans

      • Oct 31, 2014 - 11:07 AM - Radu Comment Link

        Hi Hans,

        Yes, I am trying to achieve what you described but using XRDP. I couldn’t do it so far, nor anybody told me that it is just not possible. I’d take that as progress too, at least I abandon a hopeless path. I am playing with VNC. Not quite my favorite, a bit heavy weight. I couldn’t get it to work all the way, still have to figure out some security details between the client and the server. For a while the two were not seeing each other, got past that part, now I am trying to get them to talk to each other and apparently the server has a bit of an attitude

        Will continue to push ahead with VNC while keeping an eye out for XRDP advice, be it “forget it, it is known it’s not possible”.

        Thanks again !!

        Reply

        Radu

      • Nov 1, 2014 - 2:50 AM - hans - Author: Comment Link

        I see we share the same sympathies when it comes to VNC. Wish someone would implement a generic interface, not bitmap driven, for Windows, Mac, Linux, etc. But I guess it’s more complicated than just wishing ….

        I understand what you’d like to accomplish, but for that the session has to remain active somehow. My experience with Linux is somewhat limited, might a limitation for security reasons, etc. Did you check this topic: HOWTO: Set up VNC Server with resumable sessions?

        Reply

        hans

  • Nov 10, 2014 - 10:47 AM - Bobonsnow Comment Link

    xRDP question:  Anyone know, by default, the max number of unique concurrent session using xRDP?

    I’m finding this question more elusive than expected.  Thanks  -Bob

    Reply

    Bobonsnow

    • Nov 10, 2014 - 11:00 AM - Bobonsnow Comment Link

      Feel free to delete.  Finally found the answer (MaxSessions=x in sesman.ini).

      Reply

      Bobonsnow

    • Nov 10, 2014 - 11:02 AM - hans - Author: Comment Link

      Good info none the less … I found this at the xRDP Wiki:

      The maximum number of concurrently running RDP sessions is by default limited to 10 and can be changed using the UCR variable xrdp/sessions/max.


      Reply

      hans

  • Nov 19, 2014 - 10:19 AM - Alejandro Comment Link

    Hi guys, 

    I do all the steps in the guide but i’m still not able to connect to my Ubuntu through Win7 using -mstsc.exe- (both machines it the same lan).

    Btw, what if i want to connect from outside the local network?

    Thanks in advance!

    This is my startwm.sh file:

    #!/bin/sh
    if [ -r /etc/default/locale ]; then
      . /etc/default/locale
      export LANG LANGUAGE
    fi
    startxfce4
    . /etc/X11/Xsession
    Reply

    Alejandro

    • Nov 19, 2014 - 10:30 AM - hans - Author: Comment Link

      Hi Alejandro,

      unfortunately, I’m traveling right now and do not have access to my computers … so trying a few things is difficult.

      If you want to work from outside of your LAN (ie. WAN or Internet), then you’d need to map the used ports in your modem/router. I unfortunately do not have the info on me which port(s) this would be  … 

      Reply

      hans

    • Feb 4, 2016 - 9:52 AM - Raymondo Comment Link

      It needs to be like this:

      #!/bin/sh

      if [ -r /etc/default/locale ]; then

        . /etc/default/locale

        export LANG LANGUAGE

      fi

      startxfce4

      Reply

      Raymondo

  • Nov 20, 2014 - 2:06 PM - Mike Comment Link

    Followed ur steps, only thing I had to do was reboot server, rdp window would connect, but blank screen, after reboot, was good to go.  thank you

    Reply

    Mike

    • Nov 21, 2014 - 2:42 AM - hans - Author: Comment Link

      Thanks Mike for leaving a positive feedback! Glad to hear the article was helpful for you! 

      Reply

      hans

  • Nov 26, 2014 - 11:35 PM - salman Comment Link

    Hi sir\madam,

     am salman i need some clarification about windows remote desktop and xRDP function.And xRDP how its working based on ip address or system name.

    by 

    salman

    Reply

    salman

    • Nov 27, 2014 - 2:46 AM - hans - Author: Comment Link

      Hi Salman,

      a few things depend on your setup, but IP address will always work, and machine/system name will work if the name gets resolved by your PC or router properly.

      Reply

      hans

    • Nov 29, 2014 - 8:24 AM - SALMAN Comment Link

      Hi ,

           Its working fine Normaly  we are entering on IP base e:g(192.168.1.1.).But we are  try to entering on that system name used e:g sys001

      would u plz explain how to enter on name useing in xrdpa… 

       

      Reply

      SALMAN

    • Nov 30, 2014 - 3:13 AM - hans - Author: Comment Link

      Your router has to resolve the name properly, which is done differently for each router.
      I use DD-WRT on my router, which offers DNSMasq. Or in other words: in my router I can make an “alias” that translates to the desired IP address. You can even assign multiple “names” to one IP address (ideal when you’re running a local webserver but you have several virtual hosts on one server).

      Unfortunately most run of the mill routers do not offer this feature … to work around that issue, I ran DSNMasq on one of my servers for a while (although a little more cumbersome to do), and set the default DNS server to that server.

      Check your router and see if it has this option.

      An alternative is using the “hosts” file on your machine (under Linux under “/etc”) which maps an IP address to a name.

      Another alternative, is when your router automatically assigns an IP address automatically to the machine, in this case the internal DNS of the router should know how to translate this as well.

      When using a fixed IP address, most routers do not know how to properly translate a name to the correct IP address,… unfortunately.

      Hope this helps a little bit … 

      Reply

      hans

  • Nov 28, 2014 - 6:19 AM - Alex - Author: Comment Link

    Thank you for this nice guide :)

    Reply

    Alex

  • Dec 2, 2014 - 9:01 AM - SAnthony Comment Link

    Worked first try… Best I’ve ever seen RDP work on Ubuntu!!!

    Reply

    SAnthony

    • Dec 3, 2014 - 2:58 AM - hans - Author: Comment Link

      Thanks Santhony, glad to hear it worked great for you! 

      Thank you very much for leaving a positive feedback here – it’s much appreciated! 

      Reply

      hans

  • Dec 17, 2014 - 11:07 AM - Paul Comment Link

    Thanks for this guide, but I spent extra 5 minutes realizing that login name can’t be ‘ubuntu’ since it is configured to be NOPASSWORD. For RDP into ec2 ubuntu instance, we need to create another user:

    sudo adduser xxx // add user xxx and some detail data will be prompted to answer
    sudo adduser xxx sudo // add xxx into sudo group

    Reply

    Paul

    • Dec 17, 2014 - 12:08 PM - hans - Author: Comment Link

      Thanks Paul for this valuable tip! 

      I honestly would not have thought of that … 

      Reply

      hans

  • Dec 22, 2014 - 4:34 PM - JustinB Comment Link

    Thank you for the guide…it was very concise and helpful.

    Reply

    JustinB

  • Dec 23, 2014 - 10:37 AM - justen Comment Link

    Thanks for this! Everything worked perfectly on the first go with four easy steps, almost. Two minutes. Three things I saw, YMMV…

    1) Connecting with just 8bpp (256 colors) generates a completely unusable, skewed display. Not just ugly. Unreadable. It looks like a monitor with the wrong frequency. 16, 24, and 32bpp all work fine, just not 8bpp. I almost jumped to the conclusion things weren’t working. I just had to reconnect with a higher color depth. I suppose this depends on video settings, etc, on the host.

    2) The default colors for the terminals were a black cursor, and lots of black text, on a black background. I first thought my terminal wasn’t working, until I changed the color scheme. No big deal, because I first tested Chrome and Thunderbird which worked fine so I figured it was something easy. Again, probably dependent on my host’s environment.

    3) Shutdown and restart from the drop-down menu don’t work. Both just log me out and disconnect me. I have to do a sudo shutdown -[h|r] 0 from the terminal. Permissions problem?

    Reply

    justen

    • Dec 25, 2014 - 4:32 AM - hans - Author: Comment Link

      Hi Justen!

      Thank you for your tips/observations! 

      As for the shutdown/restart issue: I never really looked at it, but it could indeed be a security issue, where by default this is not allowed over a remote connection (ie. I think Windows doesn’t allow that either).

      Merry Christmas! 

      Reply

      hans

    • Jul 19, 2015 - 9:05 AM - thiemo Comment Link

      Hi there,

      I had also problems with 15bpp. Switched to 16bpp and all works fine.

      Thanks!

      Thiemo

      Reply

      thiemo

      • Jul 20, 2015 - 2:29 AM - hans - Author: Comment Link

        Hi Thiemo!

        I’m not all that familiar with the color depth settings under Linux, but as far as I recall it’s done in 8, 16 or 32 bit, maybe that’s why 15 bpp fails?

        Reply

        hans

  • Jan 1, 2015 - 11:51 PM - yukc Comment Link

    Hi Sir,

    This article really save a lot of time to me to study and surf web page to figure out how to use remote desktop to control my ubuntu 14.04 from Windows 7.

    Thanks a lot and happy new year!

    yukc

    Reply

    yukc

    • Jan 2, 2015 - 3:10 AM - hans - Author: Comment Link

      Hi Yukc,

      thank you very much for the nice feedback and a Happy 2015 for you as well! 

      Reply

      hans

  • Jan 2, 2015 - 10:09 PM - Andrew Comment Link

    Hans…awesome job.  I have just one question.  I am trying to control my existing programs that are running on my Kubuntu 14 server.  When I RDP into my linux box from my windows box I am not seeing the existing programs that are running on the linux box.  It just seems to give me a desktop in which I could start something new.  I know that when I RDP into my windows box from work I can see all the programs that are running on my home box.  Any suggestions.  ( I loaded the Kubuntu desktop onto my Ubuntu 14 server. ) Thanks man!!  Bring back RUUUUUUD!  ;)  Andrew

    Reply

    Andrew

    • Jan 3, 2015 - 3:38 AM - hans - Author: Comment Link

      Hi Andrew,

      I know exactly what you mean with this: I’d prefer to continue an existing “session” as well, so everything on my computer screen is identical to my remote desktop screen, including open applications etc.

      I have not spend a lot of time on it, but as far as I could see, this is appears to be not an option under Linux – mind you that my knowledge and experience is somewhat limited on that one.

      Funny thing is that this feature we are looking for right now, used to annoy me under Windows, but now it’s something I’d love to see under Linux … 

      Reply

      hans

  • Jan 16, 2015 - 10:17 PM - Fran Comment Link

    Great job on detailed instructions. Tried like 1 year ago vino, x11vnc server, vnc4server and couldn’t get performance as with windows mtsc or using teamviewer, so I gaved up. Now with xrdp I can really make use of low end computers to log into more powerful one with great performance. For some reason I had a time out issue when inactivity, but overcomed by installing a stopwatch a letting it run while all the session. I’m going to read a little more and will try to change some settings to see if session time out go away. Also I did tried to enable local sound but didn’t worked.

    Thanks for sharing.

    Reply

    Fran

    • Jan 17, 2015 - 2:38 AM - hans - Author: Comment Link

      Hi Fran,

      thanks for the positive feedback – it’s much appreciated 

      Neat and simply trick to avoid time-outs! But I’m sure there must be a better way – I have yet to run into this problem, since I usually only connect when needed. But I can imagine if you’re doing some kind of remote monitoring that this might happen.

      I did find a blogpost about some xRDP tips, mainly talking about reconnecting to an existing session, maybe it’s useful.

      Reply

      hans

  • Jan 23, 2015 - 7:33 AM Comment Link
    PingBack: blog.bachi.net

    […] Using Windows RDP to Access your Ubuntu Instance How to use xRDP for remote access to Ubuntu 14.04 […]

  • Jan 24, 2015 - 5:29 AM - direse Comment Link

    Thanks it is realy cool

    Reply

    direse

  • Jan 25, 2015 - 6:45 AM - Mike Comment Link

    Thanks for the guide!

    Reply

    Mike

  • Jan 29, 2015 - 1:11 AM - Ravi Masadi Comment Link

    Thank you for the guide. it helped me in connecting from windows 7 Enterprise version to ubuntu 14.04

    Reply

    Ravi Masadi

    • Jan 29, 2015 - 3:25 AM - hans - Author: Comment Link

      Hi Ravi Masadi!

      Thank you very much for leaving a positive feedback, it makes it worth writing articles like these!

      Thanks!

      Reply

      hans

  • Feb 3, 2015 - 1:51 AM - sandeep Comment Link

    thanks it’s works perfectly on aws Ubuntu instance 

    Reply

    sandeep

  • Feb 7, 2015 - 6:22 AM - Rafayel Comment Link

    Thank you very much. Exactly what i need. Everything works like it is described in the guide

    Reply

    Rafayel

  • Feb 17, 2015 - 1:31 AM - Sohil Jain Comment Link

    Thank You. This works fine.

    Reply

    Sohil Jain

    • Feb 17, 2015 - 3:04 AM - hans - Author: Comment Link

      Thanks Sohil Jain for taking the effort to post a positive feedback .
      Glad to hear the article was useful to you.

      Reply

      hans

  • Feb 24, 2015 - 10:18 AM - matrix Comment Link

    thanks for this guide

    i’m a neww be on ubuntu’s world. and need your help!

    I’m now able to access my ubuntu desktoo via RDP but I’m not able to install updates or manage the network connections, etc… For installation i’m not becoming autherntication window for my username.

    Even into a terminal window in this rdp session i’m not able to execute cmds

    what should i do to get authentication message?

    Thx a lot

    Reply

    matrix

    • Feb 24, 2015 - 12:49 PM - hans - Author: Comment Link

      Hi Matrix,

      don’t worry – I’m not an expert either ….

      As far as I recall, you need to tweak a file in the directory of the root user:

      This is what I found on the Ubuntu forum which seems to work very well, not sure how much it’s related to the problem you’re seeing:

      Create a blank .Xauthority file in the home directory of the user you are connecting with. Be sure to log in as that user (either graphically, or via the terminal), then run:

      touch ~/.Xauthority
      chmod 600 ~/.Xauthority

      I have not tested this – I’m traveling so I cannot access my computers.

      Reply

      hans

  • Feb 26, 2015 - 2:32 AM - matrix Comment Link

    hi Hans,

    thank you for reply. I’ve tried your suggestion but without success

    Reply

    matrix

    • Feb 26, 2015 - 4:39 AM - hans - Author: Comment Link

      I apologize for being able to test this myself, but in another forum post I found:

      Add to /etc/xrdp/sesman.ini: (not sure if this will help)

      [Security]
      AllowRootLogin=1

      I have to keep guessing here as well. Sorry about that. 

      Reply

      hans

  • Mar 10, 2015 - 8:53 AM - Lior Comment Link

    Hi Hans,

    There are not enough ways to appreciate my gratitude to your wonderful guide.

    There are so many ways and alternatives to set up access to Ubuntu such as vnc4server, tightvnc and so on, but your guide was DA BOMB!

    works perfectly and with such little amount of digging and adapting the tool to the host OS using various scripts and settings and even when getting access – it comes with tons of bugs where as your solution works perfectly and smoothly with in minutes!

    keep up the good work,

    Lior

    Reply

    Lior

    • Mar 10, 2015 - 8:58 AM - hans - Author: Comment Link

      Thanks Lior! 

      I very much appreciate that you took the effort to leave such a cool comment!
      Mind you though that I had to dig a lot before I could find a way that worked for me – credit also goes to all the other users out there that helped me get to this method. 

      Thanks again – it’s a motivator for me to keep going! 

      Reply

      hans

  • Apr 2, 2015 - 8:58 AM - Matthew Comment Link

    Just a quick note of thanks – really needed to get another user connected to my computer today and, under the gun, found this excellent tutorial. Really superb work.

    Matthew

    Reply

    Matthew

    • Apr 2, 2015 - 1:43 PM - hans - Author: Comment Link

      Great Matthew! 

      Glad to hear you had a good use for it, and I very much appreciate you taking the time to post a nice comment! Awesome! 

      Reply

      hans

  • Apr 2, 2015 - 10:46 AM - Nick Comment Link

    Well done!   Works a charm under Win8.1 Pro.

    Reply

    Nick

  • Apr 15, 2015 - 8:46 PM - Uma Comment Link

    Thanks. Works like Charm

    Reply

    Uma

  • Apr 17, 2015 - 2:55 AM - Luke Comment Link

    Thanks for this guide – even a Linux noob like me got it!

    Reply

    Luke

    • Apr 17, 2015 - 3:34 AM - hans - Author: Comment Link

      Thank Luke for the positive feedback – makes writing articles like this worthwhile! 

      p.s. I’ve been using Linux on and off since 1991 (went from Minix to the first commandline version of Linux) and I stil consider myself a noob … 

      Reply

      hans

  • Apr 20, 2015 - 3:48 PM - Manohar Comment Link

    Thanks for the help Its working 

    Reply

    Manohar

  • Apr 23, 2015 - 4:05 PM - Salam Comment Link

    Wionderful, easy to follow and worked fine, much easier that whay I have doen on a fedora box

     However, it seems that I can not copy/paste between windows and my ubuntu RDP session, any idea on how to make this possible?

    2nd, in xfce4, we don’t have the usual terminal , instead there is Xterm and UIterm which are not configurable / customized easily.

    So many thanks again for you detailed and useful information

    Reply

    Salam

    • Apr 24, 2015 - 3:50 AM - hans - Author: Comment Link

      Hi Salam,

      Thank you for leaving a nice feedback! 
      It’s much appreciated.

      As for the Copy/Paste issue, I’m currently no where near my computers (traveling),…

      I did find this post (from 2012!), but have not been able to investigate it’s usefulness yet … 
      Seems XFCE might not properly support clipboard functionality – even though the documentation says it should work.

      You could try autocutsel, see this post.

      Reply

      hans

      • Apr 24, 2015 - 12:44 PM - Salam Comment Link

        Thanks for the respone, 2nd idea did not work after installing autocutselect

        Reply

        Salam

      • Apr 25, 2015 - 3:37 AM - hans - Author: Comment Link

        Bummer … 

        I will take a look once I get home again, but that could take several weeks 

        Reply

        hans

  • Apr 24, 2015 - 4:08 AM - justen Comment Link

    FWIW, it seems to work fine with Ubuntu 15.04 (just released 4/23/2015). It works for me, anyway, with 15.04 as a server and 14.04LTS as the client. No promises.

    Reply

    justen

    • Apr 24, 2015 - 5:23 AM - hans - Author: Comment Link

      Thanks Justen for letting us know .

      Definitely worthwhile info for myself and others who eventually will switch to Ubuntu 15 as well .

      Reply

      hans

  • Apr 24, 2015 - 10:08 AM - marcos Comment Link

    Hi I have a question maybe you can answer me.

    the script /etc/xrdp/startwm.sh  execute everytime we login with credentials.

    So if I use root credentials this script will run as root.

    But if I use normal user this script will run as a normal user.

    I would like to run a command as a root even when I am running this script as a normal user.

    The command runs a vnc video recorder.

    The idea is that I do not want that a normal user stop my video recorder vnc.

    Any idea how to do it in /etc/xrdp/startwm.sh?

    Thanks.

     

    Reply

    marcos

    • Apr 25, 2015 - 3:40 AM - hans - Author: Comment Link

      Hi Marcos,

      interesting problem haha … 
      I would try to start the said application from Terminal using “sudo” or a Super user shell with “sudo su”.
      This should be possible to do as a regular user, but the password of root is asked for this.

      Reply

      hans

  • May 6, 2015 - 5:44 AM - Vijay Kadadi Comment Link

    Thank you very much , it  works like cherry on cake.

    Regards,
    VK

    Reply

    Vijay Kadadi

    • May 6, 2015 - 8:48 AM - hans - Author: Comment Link

      Hi Vijay,

      great to hear that! Thank you for taking the time to post a nice feedback! 

      Reply

      hans

  • Jun 1, 2015 - 3:46 PM - Marko Comment Link

    Hi Hans,

    I am running ubuntu 15.04 in Azure. I followed the guide but when I try to connect I only get a grey screen. Any suggestions?

    greetings,

    Reply

    Marko

    • Jun 2, 2015 - 3:31 AM - hans - Author: Comment Link

      Hi Marko,

      can you let us know what you see happening (step-by-step) when booting your computer?
      A “grey screen” does’t say much to me, well maybe only that it fails to boot from the “new” partition? 
      (no pun intended)

      Reply

      hans

      • Jun 2, 2015 - 5:19 AM - Marko Comment Link

        I “ordered” a vm : Ubuntu 15.04 on Azure.

        I can connect with ssh.

        Followed you guide for installing xrdp and xfce.

        When I connect with a rdp client I see;

        – a screen with the start of xrdp,

        – after that only a grey screen with a mouse pointer.

        Does this help?

        Reply

        Marko

        • Jun 4, 2015 - 1:40 PM - Seth Comment Link

          Any luck Marko?  I’m having the same issue.  My startwm.sh file looks good.  I’m running 14.04 LTS.

          Reply

          Seth

        • Jun 5, 2015 - 4:02 AM - hans - Author: Comment Link

          Hi Seth,

          I’m no where near my equipment (big move from the US to Europe) to test this, but could it be that XFCE is not installed?

          sudo apt-get install xubuntu-desktop gksu leafpad synaptic
          Reply

          hans

      • Jun 2, 2015 - 6:09 AM - hans - Author: Comment Link

        Seems your Windows manager (XFCE) is not starting.

        Check the file “/etc/xrdp/startwm.sh“, the content should look something like this:

        #!/bin/sh
        if [ -r /etc/default/locale ]; then
          . /etc/default/locale
          export LANG LANGUAGE
        fi
        startxfce4

        Reply

        hans

        • Jun 10, 2015 - 2:53 PM - Marko Comment Link

          Hi Hans,

          I have the same content in startwm.sh as you mentioned.

          When I start a session from a RDP client on my mac I connect to : [server-ipadres]:52082 (port configured for RDP on setup in Azure),

          the xRDP windows opens and asks for a password, 

          after entering the passwd the following messages are in the Connection log window:

          connecting to sesman ip 127.0.01 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

          Does this provide any insight on what I doing wrong?

          Reply

          Marko

          • Jun 10, 2015 - 3:07 PM - Marko Comment Link

            restarting (after entering passwd in the rep client) has the result that the Connection log window of xRDP doesn’t show anymore but my gray-screen again.

            Marko

          • Jun 11, 2015 - 1:54 AM - hans - Author: Comment Link

            I’m guessing (!) there is an issue between xRDP and your Windows Manager (xfce).

            The login seems to work just fine, and it looks like xRDP tries to talk to XFCE (or whichever Windows Manager you’d like to use), but fails in doing so.

            Is XFCE installed?

            hans

          • Jun 11, 2015 - 9:21 AM - Marko Comment Link

            yes, I used the link you gave above.

            Marko

          • Jun 12, 2015 - 3:01 AM - hans - Author: Comment Link

            I did find a related post at UbuntuForums.

            This person was talking about TightVNCServer – he had to remove xrdp, vnc4server, tightvnc, as they seemed to be installed in the wrong order.

            He had to install tightvncserver, then install xrdp.

            Please see: bug 375755 and 220005.

            It seem important to do tightvnc before xrdp. Doing things in this manner will cause xrdp to use tightvncserver instead of vnc4server. 

            I have no idea if this will get the desired effect.

            Another post at SourceForge suggests (for Gnome users – not sure if you’re using Gnome) that “/usr/local/xrdp/startwm.sh” should look like this:

            #!/bin/sh
            gnome-session

            This post (also at SourceForge) suggests, as I suspect, that your Windows manager is not starting.
            You could try to start xRDP manually from the command-line and add the “–no-daemonize” option so error messages by “xrdp-sesman” are made visible.

            Another post, in the same thread suggests:

            Usually you can see the problem if you type

            Xvnc :10

            at a command prompt. If it does start, try to connect to it with vncviewer.

            And finally ….

            The problem could also be related to the VNC viewer you’re using.
            On my Mac I’ve tried ScreenSharing, but found it to not work so reliable when connecting to a Linux box, and I started using VNC Viewer instead which works like a charm (it’s free).

            hans

          • Oct 3, 2016 - 2:35 PM - Sergey Comment Link

            I doubt that this problem has something to do with the order in which xrdp and tightvnc or vnc4server are installed.
            I’ve seen a connection log identical to this:

            connecting to sesman ip 127.0.01 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

            when I had no VNC server installed but was trying to connect with “sessman-Xvnc” option.

            You might also probably see something like this:

            
            
            1
            [ERROR] another Xserver is already active on display 10

            in /var/log/xrdp-sesman.log. This might not be entirely accurate and mean that Xvnc server could not be started on a given display. In more recent xrdp versions there’s a word “might” added to that error message so it reads “… might already be active …”.

            So in order for this to work, I think we should check whether Xvnc server is installed and can be run with a following command:

            Xvnc :10

            One of these VNC servers that are listed in xrdp package recommended dependencies should work:

            • vnc4server
            • tightvncserver
            • vnc-server

            Sergey

  • Jun 3, 2015 - 8:41 AM - Victor Rivarola Comment Link

    Hi, Hans.

    I must congratulate you on your article. It is really helpful.

    One quick coment…

    Desktop Manager
    
    Since the current desktop manager of Ubuntu (Unity which runs on Gnome) no longer seems to work with xRDP, an alternative desktop manager needs to be installed.

    Unity does NOT runs XWindow. It is its own technology for local machines only.

    As such, you cannot do many of the things that you can with X11… Such as desktop sharing. That is why XRDP doesnot and cannot work with it.

    Reply

    Victor Rivarola

    • Jun 3, 2015 - 9:17 AM - hans - Author: Comment Link

      Hi Viktor,

      Thanks for the compliment.

      Yeah, I’ve noticed that Ubuntu went it’s own way – unfortunately. That’s why XFCE is being used as windows manager.
      Thanks for the info though, as others might find this a good explanation why they do not see the “usual” Ubuntu desktop. 

      Reply

      hans

  • Jun 8, 2015 - 6:26 AM - Palibe Presley Comment Link

    Can I keep my old window manager (KDE) and still use XFCE for RDP only.

    xRDP erformance is abysmal with Kubuntu 14.04.1

    Reply

    Palibe Presley

    • Jun 9, 2015 - 3:43 AM - hans - Author: Comment Link

      AFAIK you could use KDE for this as well.
      Simply modify the file “/etc/xrdp/startwm.sh“, replace “startxfce4” with whatever statement is used to start KDE.

      You cannot however user the native Ubuntu Windows Manager (the new one).

      #!/bin/sh
      if [ -r /etc/default/locale ]; then
        . /etc/default/locale
        export LANG LANGUAGE
      fi
      startxfce4
      Reply

      hans

  • Jun 26, 2015 - 4:11 PM - Tobias Comment Link

    Hey Hans, ik had gezien dat je Nederlands was.
    Mijn xRDP is zo erg langzaam dat ik niet eens me browser kan openen.
    Hoe kan ik dit verhelpen?

    Hey Hans, i saw you was Dutch.
    Mine xRDP is so slow, i cant even open mine browser,
    How kan i repair this?

    Reply

    Tobias

    • Jun 27, 2015 - 3:23 AM - hans - Author: Comment Link

      Hi Tobias,

      Funny that you ended up here – there is a Dutch version of this article as well, and yes I’m Dutch .

      As for speeding up: There can be many reasons why it’s slow.
      For example, my old computer is a pretty slow computer, and it shows similar issues – increase memory, faster HDD (ie. and SSD), etc will help.
      Reducing colors and choosing Ethernet instead of WiFi for your connection should improve the experience as well (you’d obviously want to try that one first before investing in hardware).

      I never have taken the time to speed up things, but this article at UbuntuForums might give yo some good ideas.
      It’s a rather long story, so I didn’t post all of it here.

      You should find some good setting in /etc/xrdp/xrdp.ini.

      Reply

      hans

  • Jul 5, 2015 - 3:42 PM - mdkka Comment Link

    I was coming from Ubuntu Server 14.04 without any Desktop. When i started the remote session icons were missing. This was possible to fix by:

    sudo apt-get install gnome-icon-theme-full tango-icon-theme

    Thx a lot. It was still quick and very good working instruction,

    Reply

    mdkka

    • Jul 6, 2015 - 2:00 AM - hans - Author: Comment Link

      Hi MDKKA,

      Thanks for the tip! And thanks for leaving a nice comment – it’s always much appreciated! 

      Reply

      hans

  • Jul 28, 2015 - 4:51 AM - Tomo Comment Link

    Thanks, mate!

    After reading 800 idiot instructions, this is finally the one that really works!
    Worked on Lubuntu 15.04

    Best regards
    Tomo

    Reply

    Tomo

    • Jul 28, 2015 - 4:53 AM - hans - Author: Comment Link

      Thanks Tomo! 

      Glad to hear it worked for you and that it works with Lubuntu 15.04 as well … cool! 

      Reply

      hans

  • Jul 30, 2015 - 3:21 AM - Tomo Comment Link

    It works also on latest Mint ;)

    There are some problems with TAB key in XRDP/XFCE – it does not do Autocomplete (TABcomplete).
    To fix this, as a beginning, edit file
    ~/.config/xfce4/xfconf/xfce-perchannel-xml$ xfce4-keyboard-shortcuts.xml
    Look for all Super..Tab and put the value “empty”:

    Source:
    http://ubuntuforums.org/archive/index.php/t-1771058.html and other sites

    Best regards
    Tomo

    Reply

    Tomo

  • Jul 31, 2015 - 12:22 AM - Ameet Guggali Comment Link

    Hi there,

    I followed you steps and installed and configured xrdp. when I try to logon via remote desktop connection I get following error: xrdp_mm_process_login_response: login failed. How do I fix this error. Please advise.

     

    Thanks,

    Ameet

    Reply

    Ameet Guggali

    • Jul 31, 2015 - 2:12 AM - hans - Author: Comment Link

      Hi Ameet,

      this sounds like a login issue – are you sure you use the right username/password? (I apologize for this seemingly “stupid” question)

      Reply

      hans

  • Aug 4, 2015 - 4:56 AM Comment Link
    PingBack: roadtoalm.com

    […] this walkthrough (THANKS!) I was able to get a Remote Desktop Connection working for my […]

  • Aug 12, 2015 - 11:58 AM - martin Comment Link

    This approach has several problems. First and the biggest is every time i close remote desktop connection and reopen I get a new desktop. I cannot continue work on my previous session.

    Second typing l key causes the screen to lock. I cant type text.

    Third, the enter key does not work. It highlights the current widow. Also Tab does not work.

    Forth terminal has only black screen. I cant see text or type.

    Reply

    martin

    • Aug 13, 2015 - 2:28 AM - hans - Author: Comment Link

      Hi Martin,

      This method is probably not perfect, but the problems you’re indicating suggest that there is something else wrong.
      Others, myself included, have used this method numerous times without the mentioned problems. 

      Reply

      hans

  • Sep 5, 2015 - 8:22 AM - nobody Comment Link

    Hello; 

    If you want to install a different desktop environment while using xrdp; I have found the following resources…. 

    This is quite well explained… hope this help/interest somebody 

    Ubuntu 14.10 – LXQT as alternative Desktop for XRDP

    Ubuntu 14.10 – KDE as alternative Desktop for XRDP sessions

    Cheerio 

    Reply

    nobody

    • Sep 6, 2015 - 4:13 AM - hans - Author: Comment Link

      Hi Nobody!

      Not sure if you’re promoting your own website or not, but the tips are helpful anyway … so for now: Thanks! 

      Reply

      hans

  • Sep 5, 2015 - 8:25 PM - Mr.M Comment Link

    I have used your guide to setup RDP into ubuntu several times now.  Just getting around to saying thank you for posting this very simple explanation.  Bookmarked for later.  :)

    Reply

    Mr.M

    • Sep 6, 2015 - 4:13 AM - hans - Author: Comment Link

      Thanks Mr. M!

      Glad to hear it works well for you, and thank you very much for taking the time to leave a nice feedback! 

      Reply

      hans

  • Sep 11, 2015 - 9:43 PM - Daniel Comment Link

    Hi Hans, Great article.

    I was running 12.04 and RDP was working great. I then upgraded to 14.04.3 LTS and RDP would start but when I login I would get the grey dotted background with the “X” cursor then RDP would drop so I followed your how-to in the hope that it would:

    A. Repair anything that the upgrade broke and;

    B. Resolve the issue

    However it is still the same. Do you have any suggestions on what I can do next?

    Thanks in advance.

    Reply

    Daniel

    • Sep 12, 2015 - 3:24 AM - hans - Author: Comment Link

      Hi Daniel,

      As far as I recall, the Windows manager of 14.x is not compatible with xRDP, that’s why we install XFCE in this article. 

      The “dotted screen with an X” is the famous X-Windows screen you’re seeing, however no desktop manager is starting so it remains a “dotted screen with an X”.

      So to get your setup working again; install XFCE (or other desktop manager that works with xRDP) and reconfigure xRDP (just follow the steps in the article). 

      Hope this gets your remote connection working again … 

      Reply

      hans

      • Sep 12, 2015 - 4:11 AM - Daniel Comment Link

        Hi Hans,

        Thanks for the quick reply. Unfortunately I followed your article word for word and what I wrote above is what I’m getting after following the article. 

        Thanks. 

        Reply

        Daniel

        • Sep 12, 2015 - 9:11 AM - justen meltz Comment Link

          It is working fine for me, on two different systems running Ubuntu 14.04.3 LTS, 32-bit, and also on two systems running 15.04, 64-bit, with the 4.2 kernel (released 30Aug2015). Let’s see if you have a couple things installed correctly. In a terminal, enter

          xrdp –version

          xfce4-session –version

          If both commands report back a version, at least it means you have xrdp and xfce installed correctly. If one isn’t found, that is obviously a problem. ;) If both are installed, trying starting xfce manually in a bash window and see what happens. Does it launch successfully?

          startxfce4

          Reply

          justen meltz

          • Sep 12, 2015 - 8:16 PM - Daniel Comment Link

            Thanks very much for helping out Justen and Hans.

            OK, so I found a problem.

            xrdp reports back a version but fce4 doesn’t, so I ran sudo apt-get install fce4 and it says nothing to install??

            a:~$ xfce4 –version

            xfce4: command not found

            a:~$ sudo apt-get install xfce4

            [sudo] password for daniel: 

            Reading package lists… Done

            Building dependency tree       

            Reading state information… Done

            xfce4 is already the newest version.

            The following packages were automatically installed and are no longer required:

              apg appmenu-gtk appmenu-gtk3 appmenu-qt avahi-utils compiz-core

              compiz-plugins-default compiz-plugins-main-default dconf-cli espeak

              firefox-globalmenu folks-common geoclue-ubuntu-geoip

              xserver-xorg-video-nouveau-lts-quantal

              xserver-xorg-video-openchrome-lts-quantal

              xserver-xorg-video-r128-lts-quantal xserver-xorg-video-radeon-lts-quantal

              xserver-xorg-video-s3-lts-quantal xserver-xorg-video-savage-lts-quantal

              xserver-xorg-video-siliconmotion-lts-quantal

              xserver-xorg-video-sis-lts-quantal xserver-xorg-video-sisusb-lts-quantal

              xserver-xorg-video-tdfx-lts-quantal xserver-xorg-video-trident-lts-quantal

              xserver-xorg-video-vesa-lts-quantal xserver-xorg-video-vmware-lts-quantal

            Use ‘apt-get autoremove’ to remove them.

            0 to upgrade, 0 to newly install, 0 to remove and 557 not to upgrade.

            Daniel

        • Sep 12, 2015 - 11:28 AM - hans - Author: Comment Link

          Thanks Justen for helping out, that’s just awesome! 

          @Daniel: 

          If startxfce4 worked, then go through “Step 3” (above) again.
          The xRDP script calls XFCE (last line), either the line not there, or that line fails because XFCE isn’t there (follow Justen’s suggestions).

          Reply

          hans

          • Sep 12, 2015 - 8:18 PM - Daniel Comment Link

            Apologies, I just saw that I wrote it wrong in the above paste but can’t see where to edit.

            aa:~$ xfce4-session –version

            xfce4-session: Cannot open display: .

            Type ‘xfce4-session –help’ for usage.

            Daniel

  • Sep 12, 2015 - 8:24 PM - Daniel Comment Link

    I must apologise to Justen and Hans……

    I looked over step 3 again and saw a problem….

    When running:

    echo xfce4-session >~/.xsession

    I got permission denied, so I did it with sudo, still the same….

    aa:/home$ sudo echo xfce4-session >~/.xsession

    -bash: /home/daniel/.xsession: Permission denied

    So I nano into the file and wrote it out manually and all is good!!!!

    Thanks so much for your excellent help!

    Reply

    Daniel

    • Sep 13, 2015 - 12:11 AM - hans - Author: Comment Link

      No need to apologize (although it’s very polite to do so) …
      I’m just glad it works again for you … 

      Reply

      hans

  • Sep 23, 2015 - 10:16 AM - K.Kong Comment Link

    Hi, very good article.  However I still get a black screen, no logon, when I connect using mstsc.

    Is VNC (tightvncserver) a pre-requisite for xrdp?

    Reply

    K.Kong

    • Sep 24, 2015 - 2:50 AM - hans - Author: Comment Link

      Hi K.Kong!

      Sorry to hear you’re running into a snag …

      Xrd might need VNC, you could try using the “-f” parameter (I had to look that up, so I hope it works) with “apt-get”.

      Ie.:

      sudo apt-get install xrdp -f
      sudo apt-get install xfce4 -f

      Like I said, I had to look that up with Google (apt-get man page), as I had not run into that issue before. 

      Reply

      hans

      • Sep 24, 2015 - 3:32 AM - K.Kong Comment Link

        I found the problem.  I was using an existing RDP connection set-up which contained a Windows credential of the type machinename\userid.  Once I deleted that, I could see the login screen.

        Thanks for the hard work.

        Reply

        K.Kong

      • Sep 24, 2015 - 9:20 AM - hans - Author: Comment Link

        Awesome! Glad to hear that! 
        Thanks for posting your findings!

        Reply

        hans

  • Sep 25, 2015 - 10:39 PM Comment Link
    PingBack: rootdenied.wordpress.com

    […] This information was gathered from here and here. […]

  • Oct 4, 2015 - 1:07 PM - Victor - Author: Comment Link

    Hello Hans;

    Lovely lovely article, clear concise and to the point.

    I am currently working on my ubuntu setup using xrdp and mate and I would really like to have the sessions resummable in the event that it gets disconnected. I intend to use this setup in a production environment with 200 concurrent remote desktop sessions. Please advise on how to overcome disconnects / idle timeouts and also how to ensure that one can resume a session. Also, will my scenario mean that I have to create a separate user for each remote desktop client? Thanks in advance.

    Reply

    Victor

    • Oct 5, 2015 - 3:49 AM - hans - Author: Comment Link

      Hi Victor!

      Thanks for the compliment.
      I’ll admit, I have been too lazy in the past to go figure that out.

      I did find a good post at StackOverflow, I copied the part that seemed to work best below, give it a try. It basically forces xRDP to use a fixed port, and re-use it each time one connects.

      From StackOverflow: 

      After installing xRDP, it’s all about your xrdp.ini file, which is located here:

      /etc/xrdp/xrdp.ini

      by default the first xrdp session handling script looks like this:

      [xrdp1]
      name=sesman-vnc
      lib=libvnc.so
      username=ask
      password=ask
      ip=127.0.0.1
      port=-1

      The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:

      [xrdp1]
      name=customsessionname
      lib=libvnc.so
      username=myusername
      password=ask
      ip=127.0.0.1
      port=5912

      Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.

      Please let us know if that worked, or if you found a better solution, so I can incorporate it into the article 

      Reply

      hans

      • Oct 7, 2015 - 12:48 AM - Victor - Author: Comment Link

        Thanks a bunch Hans; this really helped I am still trying to determins the resource requirements so dat I can plan appropriately for optimal performance and for scalability.

        Thanks again!

        Reply

        Victor

      • Jan 29, 2016 - 4:03 PM - Robert Comment Link

        with 3 different users each wishing to return to the same session they left but not wanting to see the other peoples sessions, any ideas how would this be done? The above seems to suggest a global setting of a single port rather than for individual users?

        Reply

        Robert

        • Jan 30, 2016 - 3:44 AM - hans - Author: Comment Link

          Hi Robert,

          I’m afraid this is getting a little bit more advanced than my experience can accommodate.

          Maybe one of the other visitors has an answer to this?
          I’d have to guess that sessions then become IP address specific?

          Reply

          hans

        • Jan 30, 2016 - 6:32 AM - Robert Comment Link

          I wonder if changing the port line to port=ask -1 would then allow individual users to initially connect, find the port and then each time re=use that same port number? Anyone tested this?

          Thanks

          Reply

          Robert

      • Jun 11, 2016 - 1:20 PM - Anonymous Comment Link

        What do I do if I donot have the admin rights to change the or edit the xrdp.ini file?

        Reply

        Anonymous

        • Jun 12, 2016 - 4:31 AM - hans - Author: Comment Link

          Hello Anonymous,

          Honestly; I would not have a clue. You really need sudo access … 
          Sorry 

          Reply

          hans

  • Oct 27, 2015 - 6:18 AM Comment Link
    PingBack: www.btteknik.net

    […] //www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/ Unal D […]

  • Nov 2, 2015 - 9:19 AM - william Comment Link

    Thanks soo much!!  You saved me a bunch of frustration!!  Worked like a charm!

    Reply

    william

  • Dec 4, 2015 - 11:56 AM - Datta Comment Link

    When i connect linux(ubuntu) machine remotely om windows (mstsc)

    the xRDP windows opens and asks for a password, 

    after entering the passwd the following messages are in the Connection log window:

    connecting to sesman ip 127.0.01 port 3350

    sesman connect ok  (when  port = -1 in xrdp.ini)

    started connecting (when i change port = -1 to port =3350 and xrdp restart)

    connecting to 127.0.0.1 3350

    tcp connected .

    remote login halts at this stage. No further process even if i click OK.

    Reply

    Datta

    • Dec 4, 2015 - 2:38 PM - hans - Author: Comment Link

      Hello Datta,

      I’m nowhere near my computer stuff, but your question sounds a lot like Marko’s question (scroll up, or click this link).
      Marko hasn’t posted yet if and how he resolved the issue. You’ll find some suggestions there as well, but since I haven’t been able to reproduce the problem, I can’t really tell you what might be a fix for this.

      Reply

      hans

      • Dec 4, 2015 - 4:51 PM - Datta Comment Link

        Thanks Hans,

        It got resolved , when I change the port number to 5920 (other than 3350) in xrdp.ini.

        Reply

        Datta

      • Dec 5, 2015 - 11:42 AM - hans - Author: Comment Link

        Hi Datta,

        thank you so much for posting the solution! 
        I know others will benefit from this! 

        Reply

        hans

  • Dec 14, 2015 - 9:52 AM Comment Link
    PingBack: eugene685.wordpress.com

    […] //www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/ […]

  • Jan 16, 2016 - 3:34 PM - Neal Comment Link

    Great article, here are some edits I would add:

    # Install XFCE4 terminal (way better than xterm)
    sudo apt-get xfce4-terminal
    
    # Install icon sets
    sudo apt-get install gnome-icon-theme-full tango-icon-theme

    If you don’t install the icon sets then Thunar will not display icons and you can’t change the theme.

    Reply

    Neal

    • Jan 17, 2016 - 5:18 AM - hans - Author: Comment Link

      Thanks Neal!

      Where do you think I should add this in the article? Right after apt-get xfce4 (step 2)?
      I do not have the means to test this right now 

      Reply

      hans

      • Jan 17, 2016 - 11:53 AM - Neal Comment Link

        I would add them in step 2 immediately following the installation of xfce4. Regardless of if you add them or not, kudos on the post. It works perfectly and holy cow it is fantastic being able to RDP into my Lonux servers the same way I do for my Windows servers. I was skeptical, having used nothing but PuTTY for so long but I’m a believer now!

        Reply

        Neal

      • Jan 18, 2016 - 3:58 AM - hans - Author: Comment Link

        Thanks Neal! I’ll add this today … 

        Reply

        hans

  • Jan 21, 2016 - 5:51 AM - Arti Comment Link

    Million Thanks !!! worked like charm. 

    Reply

    Arti

  • Jan 22, 2016 - 4:20 AM Comment Link
    PingBack: blog.digitalneurosurgeon.com

    […] These instructions from Tweaking4All worked perfect for me! Hope this helps you too… […]

  • Jan 25, 2016 - 12:53 AM - aditi gupta Comment Link

    Hi

    with the instructions given above I am able to remotely login my machine but the whole screen is completely blurred nothing is clear.what might be the reason?any idea

    Reply

    aditi gupta

    • Jan 25, 2016 - 3:17 AM - hans - Author: Comment Link

      Hello Aditi,

      I’m not sure what could cause the blurry image, except when your remote desktop is set to a higher resolution than the screen/window you’re looking at (it will downscale, and therefor become blurry). That’s the first thing that comes to mind anyway … 

      Reply

      hans

      • Jan 25, 2016 - 3:23 AM - aditi gupta Comment Link

        Hi

        Thanks for your response.I am a bit confuse.The above scenario is happening when I am doing remote logging from ubuntu 12.04 to 15.04.But the same thing is not happening when I am remotely logging 12.04 from 15.04.

        Is this happening because of different ubuntu versions?

        also just for information I am using 15.04 on virtual box and 12.04 is host machine.

        Reply

        aditi gupta

      • Jan 25, 2016 - 3:28 AM - hans - Author: Comment Link

        Hi ….

        I assume you meant remote login from 12.04 -> 15.04 versus 15.04->12.04 ?
        How are the screen resolution settings for both?

        Reply

        hans

        • Jan 25, 2016 - 3:44 AM - aditi gupta Comment Link

          Hi Hans

          Yes I mean the same.But I change the screen resolution setting on 12.04.And now its working fine on both.

          Thanks a lot for your tutorial :)

          Can you also pls suggest how one can drag and drop during remote logging sessions?

          Reply

          aditi gupta

        • Jan 25, 2016 - 3:46 AM - hans - Author: Comment Link

          Awesome – glad the issue is resolved now .

          As far as I know, drag-and-drop from remote desktop is not supported at this time. 

          Reply

          hans

          • Jan 25, 2016 - 3:51 AM - aditi gupta Comment Link

            Ok.Anyways thanks a lot.

            aditi gupta

  • Jan 29, 2016 - 8:22 AM - Robert Comment Link
    sudo apt-get xfce4-terminal

    shouldn’t that read

    sudo apt-get install xfce4-terminal
    Reply

    Robert

    • Jan 29, 2016 - 11:29 AM - hans - Author: Comment Link

      You’re right Robert! That’s indeed the case. 

      Thanks for catching that! 

      Reply

      hans

  • Feb 12, 2016 - 2:10 PM - Steve G Comment Link

    Great guide , got this up and running in under 10 minutes on Ubuntu 15.10  ! worked first time!

    Reply

    Steve G

    • Feb 13, 2016 - 4:15 AM - hans - Author: Comment Link

      Hi Steve!

      Thanks for taking the time to post a “Thank you!” – it’s much appreciated!
      Glad you got it to work that fast! 

      Reply

      hans

  • Feb 13, 2016 - 12:44 AM - TerryMcP Comment Link

    Still great info. many thanks

    Do you have any insight as to why XFCE can’t be replaced with LXDE? I’ve been trying for some time and have started posting in forums. Has LXDE been orphaned like Gnome (with respect to xRDP)?

    Reply

    TerryMcP

    • Feb 13, 2016 - 1:29 AM - TerryMcP Comment Link

      OK, I finally found the solution. it can be done with LXDE 

      Ubuntu wants a .xsession file with:
      lxsession -s LXDE -e LXDE

      Lubuntu (my distro) wants a .xsession file with:

      exec lxsession -s Lubuntu -e LXDE

      Reply

      TerryMcP

      • Feb 13, 2016 - 4:14 AM - hans - Author: Comment Link

        Thanks TerryMcP! 

        That’s good info, and thank you for taking the time to post it here! 

        Reply

        hans

  • Mar 15, 2016 - 5:23 AM - Alex Comment Link

    I have trouble with RDP session:

    Unable to connect to RDP server 127.0.0.1

    I use Remmina as client side and Ubuntu 14 on the server side

    service started – checked with service xrdp status

    ports open – checked with sudo netstat -nlpt | grep xrdp

    nmap said that:

    3389/tcp open ms-wbt-server

    But Remmina could not connect.

    Reply

    Alex

    • Mar 15, 2016 - 5:41 AM - hans - Author: Comment Link

      Hi Alex,

      where did you see this error message?
      If it’s on the client computer (so not the computer that is giving you remote access), then the problem would be the IP address. 127.0.0.1 is the IP address of “localhost”, or in other words: the computer you’re working on and not the remote computer. But I assume that’s now what you meant?

      Reply

      hans

      • Mar 15, 2016 - 5:53 AM - Alex Comment Link

        This error message I see on client side.

        Step by step:

        I start Remmina – choose Connect to my RDP server.

        Remmina show me the panel with password for ssh session

        Next it connect to server ( it show correct address and port)

        And next show me window with this error – Unable to connect to RDP

        Previos time I was correct it with clearing ~/.freerdphosts or something like this, but now I it not helping.

        Reply

        Alex

      • Mar 15, 2016 - 6:07 AM - hans - Author: Comment Link

        Did you try the tips in this comment?
        I posted that one a while ago but the user never confirmed if it worked or not.
        Since you say this is on the client side – just to make sure – you did not use 127.0.0.1 to connect to the server, right?

        Reply

        hans

        • Mar 15, 2016 - 7:05 AM - Alex Comment Link

          Yes, I have tryed.

          It is not help.

          Where I can fid error log on server side?

          Reply

          Alex

        • Mar 16, 2016 - 5:30 AM - hans - Author: Comment Link

          Oh boy, that’s where I would need my equipment, which I do not have with me at the moment (traveling).

          My first guess (but I could be very wrong):  /var/log/xrdp-sesman.log   or   /var/log/sesman.log

          Reply

          hans

  • Apr 19, 2016 - 7:42 PM - Jim Comment Link

    I found RDP and VNC way too slow for my needs.

    For something more akin to the TeamVieweresque experience with a remote XFCE, do yourself a favour and give x2go a try.

    https://www.howtoforge.com/how-to-install-x2goserver-on-ubuntu-14.04-as-vnc-alternative

    Reply

    Jim

    • Apr 20, 2016 - 6:07 AM - hans - Author: Comment Link

      Hi Jim,

      thanks for the tip – I had not heard of X2Go yet, but doing some reading up, I’ve noticed very mixed messages. Some think it’s stellar, others complain about lag. Most actually prefer TightVNC. I hope to find some time to to test it soon, and see if it’s worth the effort. 

      Reply

      hans

  • Apr 24, 2016 - 5:56 AM - Boris - Author: Comment Link

    Worked great for me! Thanks a lot. Very usable for my remote machines on cloud. 

    Reply

    Boris

    • Apr 24, 2016 - 6:32 AM - hans - Author: Comment Link

      Awesome Boris!

      Thanks for taking the time to post a Thank-You – it’s much appreciated! 

      Reply

      hans

  • Apr 25, 2016 - 9:40 PM - Guiminam Comment Link

    Hi.

    I can remote desktop from windows10 but i don’t use command line on terminal emulator.

    Please, Could you help me?

    Thank you!

    Reply

    Guiminam

    • Apr 26, 2016 - 3:13 AM - hans - Author: Comment Link

      Hi Guiminam,

      what part do you need help with?

      Reply

      hans

      • Apr 27, 2016 - 8:48 PM - Guiminam Comment Link

        Hi Hans

        How i can use command line on terminal emulator?

        You can see it here:  http://postimg.org/image/49ggboomp/

        Thanks!

        Reply

        Guiminam

      • Apr 28, 2016 - 4:12 AM - hans - Author: Comment Link

        Hmm, interesting; Terminal without a prompt – I have never seen that.

        I honestly have no clue what might be causing that, but it most certainly is something on the computer you’re trying to remote control (ie. the “server”).
        Could it be, and I’m only guessing here, that either the short-cut to Terminal isn’t set right, or that you have not set the proper access rights / user in your config?

        Reply

        hans

  • May 1, 2016 - 2:31 AM - Harshit Peer - Author: Comment Link

    Thanks for the wonderfull tutorial.

    I have a question. My connection seems to be too low for the RDP.

    When I access it, it takes hell lot of time to render the desktop.

    Is there anything so that I cam lower the resolution or something, so it will be loading fast.

    Thanks :)

    Reply

    Harshit Peer

    • May 1, 2016 - 5:40 AM - hans - Author: Comment Link

      Hi Harshit!

      For what I could find online, since I do not have the chance to test this;

      Source:

      There seems to be: xfce4-display-settings
      I think you can run this from Terminal/Shell.
      This is supposed to be used to do resolution setting.

      Reply

      hans

      • May 1, 2016 - 8:44 AM - Harshit Peer - Author: Comment Link

        Super. Thanks. I will look into this.
        I tried to tweak settings in my RDP Client, it kind of worked, but still checking for more information.

        BTW, is there anything like I can redirect the access through google server, since my ISP allows Google server transfer at super speed?

        Reply

        Harshit Peer

        • May 2, 2016 - 5:08 AM - hans - Author: Comment Link

          Hi Harshit,

          Ehm … I have no idea what “my ISP allows Google server transfer at super speed” means. Can you elaborate?

          p.s. Since it sounds like you’re using remote desktop to control a computer remotely over the Internet;
          please be very careful with that, so outsiders do not get access to your computer as well.

          Reply

          hans

  • May 3, 2016 - 2:36 AM - Rahul Comment Link

    Thank you very much, Its really awesome. Now I want one more help that is I have to see only that desktop working, menace Can I see Ubuntu user screen during its working for security reason, If yes then please help me. (In ubuntu I used remmina for desktop sharing. But is there any software for windows so using that I can share ubuntu desktop)

    Reply

    Rahul

    • May 3, 2016 - 4:24 AM - hans - Author: Comment Link

      I’m sure it can be done, but I’ve never tried it or had a need for it.
      It might be easier to use VNC for that, here an example.

      Reply

      hans

  • May 17, 2016 - 6:31 PM - Jimmy Comment Link

    Hi
    I always install with those commands Xfce on my online ubuntu vps but this time is not working in google cloud, I dont know why can someone help me!
    when i try to use this command echo xfce4-session >~/.xsession it showing me this message: Source: Tweaking4All.com – How to use xRDP for remote access to Ubuntu 14.04 (//www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/)

    can someone pls help me how to fix this!?

    Reply

    Jimmy

    • May 18, 2016 - 11:19 AM - hans - Author: Comment Link

      When you copy content from Tweaking4All, it add a “source” link at the bottom.

      It’s just an extra line you’ll have to remove.
      If this happens more often then I’ll try to add some filtering to the copy & paste function, so I will not add this when copying code.

      My apologies for the inconvenience. Unfortunately, too many people simply copy all the content and place it on their website as if they wrote the article .

      Reply

      hans

  • Jun 11, 2016 - 5:31 AM - Ankit Comment Link

    HI,

    I am remotely accessing (on network) my ubuntu 14.04 through windows system. However, during login it asks for port and on giving same port helps me in resuming my session on ubuntu. 

    My question is how many sessions I can run simultaneously.  I have a machine with large resources and want to give it to different people to work on it simultaneously.

    Reply

    Ankit

    • Jun 11, 2016 - 7:34 AM - hans - Author: Comment Link

      Hi Ankit,

      I honestly have no idea what the number of simultaneous session is, I would have to guess that it’s limited by the capacity of your computer (that is hosting the desktop), your network connection, and possibly one or the other configuration … I unfortunately have never really tried to connect more than one session a ta time. Maybe someone can chime in an comment on this?

      Reply

      hans

  • Jun 21, 2016 - 11:57 PM - lingyan Comment Link

    It works for me as well, thanks a lot!

    Reply

    lingyan

    • Jun 22, 2016 - 4:04 AM - hans - Author: Comment Link

      Hi Lingyan!

      Awesome! Thank you for taking the time to post a “Thank you!”, it’s much appreciated! 

      Reply

      hans

  • Jul 1, 2016 - 11:04 AM - ahmad - Author: Comment Link

    i use xRDP in my ubuntu but always startup ubuntu ask password autentification…
    sorry about my english..
    not good…

    Reply

    ahmad

    • Jul 2, 2016 - 4:36 AM - hans - Author: Comment Link

      Hello Ahmad,

      I’m not sure what your question is? You want to be able to use xRDP without a password?

      Reply

      hans

  • Jul 4, 2016 - 5:33 AM - Andrew Comment Link

    Heya, 

    Thanks for making this super simple and easy to follow but I am having an issue where my RDP connection to my VMware ubuntu server is really slow refresh rates. When I scroll I can see the pages being rendered, when I move windows around i can see the same thing, is there a way to tweak this?

    Reply

    Andrew

    • Jul 4, 2016 - 7:58 AM - hans - Author: Comment Link

      Hi Andrew!

      Thank you for the compliment – it’s much appreciated! 

      As far as tuning goes;

      Start with making sure you have a fast connection, preferably Ethernet (wired) and not WiFi.

      Something I found here that might help:

      Fine tune xrdp.ini (nano /etc/xrdp/xrdp.ini), and in the [globals] section, change max_bpp=24 and add the command to use compression as so:

      max_bpp=128
      use_compression=yes

      and modify the [xrdp7] section by changing xserver_bpp=24:

      xserverbpp=128 

      I did read somewhere that disabling audio (if currently enabled) will give you some more speed as well.

      Reply

      hans

      • Jul 5, 2016 - 5:16 AM - Andrew - Author: Comment Link

        Hey Hans!

        If I could use wired I would but I have the ubuntu server running as a VM on my desktop PC and I am using my laptop to do some web development while someone else uses my desktop PC. The wireless network I have is very much capable of handling the RDP streaming! 

        I made the changes you suggested and I did indeed notice a marked improvement in the speed so thankyou very very much for those tips. I was searching high and low for tweaks and couldnt find it so your help is greatly appreciated! I am beginning to fall further into the *nix world and its starting to feel warm and fuzzy!

        Reply

        Andrew

        • Jul 5, 2016 - 5:24 AM - hans - Author: Comment Link

          Thanks for letting us know that the trick did work.
          I recall some clients allowing tweaking of the color depth and such as well, but maybe that’s a VNC thing and not an RDP thing.

          Well, I’m glad it made a difference.
          Please let us know if you find more tricks that boost speed… 

          Reply

          hans

  • Jul 30, 2016 - 2:55 AM - Lenos Comment Link

    I have a Windows 2012 R2 domain using Windows 7 machines for the clients. I have also an Ubuntu 14.04 LTS PC which I use for file transferring. So I installed XRDP and XFCE4 in order to access remotely my Ubuntu from a Windows PC. The problem is that I cant find the “Connect to Server” option when I access remotely the Ubuntu . Only the “Browse Network” appears in the File Manager. On my Ubuntu I use to Connect on my 5 servers and transfer files to each other using the Connect to Server option. Using XRDP the layout and the interface is different and I cant find the option. I made a search for this problem but there is not any similar post..

    In addition i would like to know why in other tutorials the change the ports … 

    Please help me guys…

    Reply

    Lenos

    • Jul 30, 2016 - 3:50 AM - hans - Author: Comment Link

      Hi Lenos,

      Since I’ve not been using remote desktop for Windows and Linux in a while now, I’m not quite sure how to answer your question.
      Maybe one of the visitors here knows an answer?

      I’m a little confused (it’s still early in the morning here, and I’m still in need of more coffee haha); so your Ubuntu connects to 5 servers, but you want to RDP from a Windows 7 computer to the Ubuntu machine. And the Ubuntu machine can’t connect to those 5 servers? Did I get that right?

      Reply

      hans

    • Jul 30, 2016 - 4:01 AM - Lenos Comment Link

      Yeap . I was Connecting to the Servers , drag and drooping in the terminal and doing my job.

      Now ,for the reason that the Connect to Server option is missing from the toolbar on the left , i manually inserted the address of the server.

      E.g smb://10.101.1.143.

      And it worked !!!!!!

      The problem is that when i TRY to drag and drop the tab into the terminal(this is what I am doing on my 14.04 LTS) it says No such file or directory .

      In terminal : cd ‘smb://10.101.1.143/’ 

      I can’t access now the files of the servers in the terminal…

      Any ideas Hans .. ?Thanks for replying.

      Reply

      Lenos

      • Jul 30, 2016 - 4:05 AM - hans - Author: Comment Link

        OK, well that sounds like a limitation of drag and drop support with xRDP?
        I hope someone here is following this discussion and is more experienced in Ubuntu use than I am … 

        (I only use Ubuntu to occasionally compile my applications, but I do not use Ubuntu on a daily basis)

        Reply

        hans

    • Jul 30, 2016 - 4:18 AM - ANKIT Comment Link

      Hi, Lenos

      Because of the difference in desktop modes used during rdp connection, remotely connected will appear different.

      If you want to transfer files from one system to another, try scp connections. For transfering between linux and windows, use pscp available on download page of putty. For transfering between linux machines, install auto-ssh server and use scp. You can easily find command tutorial on net or tell me if you need more help.

      Hope I cleared your doubts.

      Reply

      ANKIT

  • Sep 10, 2016 - 7:44 AM - hans - Author: Comment Link

    Just found this tip, not sure if it might be helpful to anyone (source):

    I am running into another issue where the XRDP is not working. I have been at it for quite some time now and I think that I need help. I believe that it is an issue of the Ubuntu machine not listening on a port.

    However, when I go to rdp from windows, I am able to connect and type in username and password but when I do, I get the following error:

    Connecting to sesman IP 127.0.0.1 port 3350
    sesman connect ok
    sending login info to session manager, please wait...
    srdp_mm_process_login_response:login successful for display
    started connecting
    connecting to 127.0.0.1 5910
    error-problem connecting

    Could the issue be that my Ubuntu machine is not listening to port 5910? WHat do you guys think?
    If so, how can I make sure that Ubuntu is listening to port 5910?

    Ok, so when I run this command:

    sudo netstat -peant | grep ":5910"

    Nothing comes up. When I run this command: 

    sudo netstat -peant | grep "127.0.0.1" 

    and I scroll through, I do not see anything connected to port 5910. I believe that i have found a large issue. My question now is how do I set up xrdp to listen to port 5910?

    Ok, so i found the command that will solve my issue. Run this command to remove the error

    Run gsettings set org.gnome.Vino require-encryption false

    I hope this could be useful to someone – I have not tried or tested this.

    Reply

    hans

    • Oct 3, 2016 - 3:20 PM - Sergey Comment Link

      Hi Hans,

      even if your Ubuntu machine does not have a VNC server listening to the port 5910, the moment you connect to it with xrdp,  xrdp-sessman attempts to start a new VNC server at that port by default.

      But I found it rather convenient to use the vino VNC server which I believe comes installed by default on recent Ubuntu distros. I was actually running it on Mint 18 where vino-server can be enabled from GUI main menu in Settings->Desktop sharing or by running the

      1
      vino-preferences

      command. I think Ubuntu should have similar features.

      vino-server allows to connect to the same display (usually display 0) on which the X server is already running and use it locally and remotely at the same time.

      We should run this command first to make VNC auth to work with vino-server:

      gsettings set org.gnome.Vino require-encryption false

      vino-server listens to the port 5900 by default so in xrdp log-in window we should select “vnc-any” from the dropdown list, ip: 127.0.0.1, port: 5900 and fill in the password which was previously set up in vino-preferences. The username can be left blank because it is not used for VNC authorization.

      Reply

      Sergey

      • Oct 4, 2016 - 6:06 AM - hans - Author: Comment Link

        Thanks Sergey for the great info! 
        I love it when visitors contribute with valuable tips. Nice!

        Reply

        hans

      • Mar 4, 2018 - 4:51 PM - Austin Comment Link

        I was able to connect buy changing the xrdp log-in window dropdown list to “sesman-X11rdp”.

        Reply

        Austin

  • Dec 10, 2016 - 1:26 PM - Mark Comment Link

    Thanks very much for this.  Having an odd problem – it connects OK, but when I go to open things (such as a web browser) on the remote desktop, it doesn’t seem to do anything on the remote end, but will actually open them on the local end.  Another words, picture two monitors side by side – click open on the windows screen, and it appears on the Linux screen but not the windows screen.  Also, the desktop looks entirely different from what’s seen on the Linux screen.  

    Remoting from a WIndows 7 box to a Ubuntu 16.04.1 LTS box.  

    Reply

    Mark

    • Dec 10, 2016 - 3:07 PM - hans - Author: Comment Link

      Hi Mark,

      I’m trying to figure out what’s going on, but one thing to keep in mind is that this not like “taking over a computer screen remotely” (if you know what I mean). You actually start a session on the remote machine, so on the monitor of the remote machine, your actions will not be shown. The very different look on the monitor and your remote screen suggest this (to me anyway).

      Hope this helps. 

      Reply

      hans

      • Dec 10, 2016 - 7:14 PM - Mark Comment Link

        Thanks – gotcha on the different sessions. 
        If I’m already logged into the Linux box, does remoting in create a new session or join up with the current session?  I’m wondering if that’s the problem – I’m logged in both locally and remotely on the same account.

        Reply

        Mark

        • Dec 11, 2016 - 12:29 PM - hans - Author: Comment Link

          Hi Mark,

          Yes, it will create a new session, although there might be a trick to take over the already running session, but I’m not aware (and have had no need so far) how to do this. 

          Maybe another user is aware of a trick and willing to chime in on this one?

          Reply

          hans

          • Dec 11, 2016 - 7:58 PM - Mark Comment Link

            OK so I created another user account and remoted in using that account, problem solved.  Interesting behavior.  With a session running on the Linux box, remoting in using the same account doesn’t exactly “take over” that session but the actions you do show up on the open session and not on the remote session.  IE, when logged in “twice”, opening a web browser on the remote session opens it on the local session but NOT the remote session.  There’s probably some way to harness this but I’m not savvy enough for that =)

            Mark

    • Dec 11, 2016 - 8:42 PM - ANKIT Comment Link

      Hi Mark,

      I think I got what you are trying to ask here.

      1. Your normal ubuntu machine uses gnome 3d desktop. But to run it using xrdp or remotely, we require 2d desktop environment like xfce(shown in this tutorial), gnome 2d environment, mate and many more. If you observe image 2, that is how your screen and functions appear from remote login.

      2. Refer to the previous comment, Sergey has mentioned about port which vns server listens to, through some changes in preferences you can actually add option to input port everytime. Refer image 1, below password there will be option to input port in that case. Now whenever you start new session, it is assigned a port. If you disconnect running session and want to reconnect to the same, just enter the existing port. And by entering -1 new session can be started. In  a way, you can run multiple sessions in parallel.

      3. However, running sessions in parallel can have its own disadvantages. I have observed that if you open browser like mozilla firefox in one session, you cannot open or use that browser in another session.

      Hope I have cleared your doubts, although not in the same order as you have asked..

      Reply

      ANKIT

      • Dec 11, 2016 - 8:44 PM - ANKIT Comment Link

        Also, if I connect to same session of remote connection from different machines, I am able take over the session. I don’t whether your problem is because of ubuntu 16. 

        Reply

        ANKIT

      • Dec 12, 2016 - 8:16 AM - hans - Author: Comment Link

        Thanks for chiming in Ankit! 

        Reply

        hans

  • Dec 16, 2016 - 3:37 AM - Jigneshkumar Aakoliya - Author: Comment Link

    Hi,

    How can i find my ubantu username?

    Reply

    Jigneshkumar Aakoliya

    • Dec 16, 2016 - 8:07 AM - hans - Author: Comment Link

      Hi Jigneshkumar!

      The username is what you’ve setup during your Ubuntu installation, and the same username you use to login to your Ubuntu. 

      Reply

      hans

  • Jan 7, 2017 - 1:24 AM - Nathan Comment Link

    Install ubuntu desktop 16.04

    im getting following error: xrdp_mm_process_login_response: login failed. How do I fix this error.

    Please advise.

    Reply

    Nathan

    • Jan 7, 2017 - 10:08 AM - hans - Author: Comment Link

      Hi Nathan,

      I have not ran into this issue … but there are 2 things that might be happening:

      – You’re using the wrong password …
      – Your session is locked

      The latter is described here – read the comments there as well, I did see some tips there too.

      Hope this helps (please let us know!). 

      Reply

      hans

      • Jan 7, 2017 - 8:51 PM - a.sunil222 Comment Link

        GM Hans,

        Thanks for your quick response and im confident. its not issues about password or session. as before also i installed xrdp and was working good. this time only  stucked as once a while i use at office :-(

        If any more alternate remote, please suggest & if any whats app group for linux please add me.

        Thanks,

        Nathan

        Reply

        a.sunil222

  • Feb 15, 2017 - 8:16 PM - Caleb Comment Link

    Hi Hans,

    When I connect to the target server from RDP on my mac, it comes up with a grey screen and the cursor is a large X. I’ve tried rebooting the server and it still does the same thing.

    Any hints on what could be the problem? Username and PW are all correct, the server is a virtual machine if that helps. 

    Reply

    Caleb

    • Feb 16, 2017 - 8:55 AM - hans - Author: Comment Link

      Hi Caleb,

      this would mean that your windows manager is not starting for the remote connection.
      Please verify that the correct Windows Manager has been installed and that the config file is set correctly.

      Reply

      hans

      • Feb 16, 2017 - 6:08 PM - Caleb Comment Link

        Thanks Hans,

        I uninstalled xrdp / xfce and started again, this time using LXDE and it worked. Not sure if it was a problem with my xfce installation or not, but I have a working remote session. Thanks!

        Reply

        Caleb

        • Feb 17, 2017 - 8:23 AM - hans - Author: Comment Link

          Hi Caleb,

          I suspect the “sudo apt-get install xfce4” step somehow went wrong or did not initialize the windows manager (xfce4).
          But … I’m glad it’s working now for you! 

          Reply

          hans

  • Apr 12, 2017 - 7:16 PM - Dave Comment Link

    Worked great with Ubuntu 16.04 and Windows 10. Thanks!!

    Reply

    Dave

  • May 9, 2017 - 10:49 AM - justen Comment Link

    I have this working fine with Ubuntu 16.04.2LTS on three machines (had it working with 14.04LTS and 15.04 too). I sort of know what I am doing. ;) I migrated one machine to 17.04 (clean install). I repeated the install/setup procedure for xrdp/xfce4. No errors. However, when I connect to the machine, I just get a black screen. No login info. Basically, it is broken.

    Logging in via ssh, and doing a ps -ef | grep xrdp shows it is running… when I connect via remote desktop from my Win10 box, I see a new instance of xrdp exists, but I’m not seeing it. Just black. I’ve tried both 16 and 32bpp, various screen sizes, experience settings, etc. I’m using the same client that works with 16.04.2LTS and it doesn’t work with 17.04.

    Anybody have any ideas? Any caveats with 17.04 vs earlier versions?

    Reply

    justen

    • May 9, 2017 - 5:54 PM - justen Comment Link

      Looks like an xrdp related problem. If I manually fire up a vncserver on my 17.04 box via ssh, it executes and starts an xfce4 session. I can then connect to it with any VNC viewer, no problem. Works fine when xrdp isn’t involved.

      16.04.2LTS installs xrdp version 0.6.1

      17.04 installs version 0.9.1. This version includes its own vncserver.

      Comparing the files in /etc/xrdp, there are quite a few differences. I think there is a security-related problem. It’s as if the password I enter for authentication isn’t being passed, or that the vncserver launched by xrdp/sesman doesn’t even has a passwd set. vncpasswd only seems to set it for vncservers I launch manually. The one fired off by xrdp expects a different passwd. ~/sesman_justen_passwd:10, but I don’t know how to set that. Nuking it doesn’t do any good.

      I end up getting the

      VNC error – problem connecting

      some problem

      Yet it doesn’t appear necessarily the same cause as described in above posts, and in any case, it never seems to have been solved with any degree of certainty or satisfaction. I think, at this point, I’ll just use standard VNC, bypassing xrdp entirely.

      Reply

      justen

    • May 10, 2017 - 10:08 AM - hans - Author: Comment Link

      Hi Justen,

      I’d still have to upgrade to 17.x, so I have no experience with this yet. Thanks for posting all your findings though.
      Hopefully I’ll get to upgrading to 17 in the next days, and maybe another user here can share his or her experiences as well to get xRDP running.

      I did find this article describing your setup, but I really can’t see anything that would complicate things. I’m sure you stumbled upon this one as well, and they show a few workarounds that might be helpful. 

      Reply

      hans

      • May 10, 2017 - 11:26 PM - justen Comment Link

        Yeah, I saw that article. When it popped up in my search I was like, “AWESOME!” But no help there.

        Get this. I have another brand new Win10 system. I installed Ubuntu 17.04, followed all the normal steps to get xrdp/xfce4 working, and it worked without a single problem. Perfectly. Simply. No mods required.

        I have no clue why my other setup, described above, is puking on this. They both have Win10/Ubuntu 17.04 on their SSDs. I logged in to each, simultaneously, from a third client, and I can’t see any differences in configuration, setup, etc.

        So… I am re-installing 17.04 on the… problem system. It’s only been out a few weeks! How could I have messed up the system that much in so little time? I know in  my gut that somewhere I could fix this with changing a line or two, heck, maybe just flipping a bit!, I just don’t know where to look or what to change? /etc/xrdp matches between systems. I’ve gone over all the steps multiple times.

        I’m trying a re-install first, from USB, keeping my stuff. Never done that before. I usually just nuke and start from scratch. If the re-install fails, I’ll wipe the linux partition and start clean.

        Reply

        justen

        • May 11, 2017 - 11:38 AM - hans - Author: Comment Link

          Hi Justen,

          I know how you feel – it happens to me at times as well.
          I usually try to fix it, but if it’s just taking too much time, I’d go the nuke-toute as well.

          You might want to compare the files and content in “/etc/init.d/”, I think Ubuntu 17 still uses that.
          Maybe one or the other might not start or not start the same way when comparing both systems.

          Reply

          hans

  • May 11, 2017 - 1:19 AM - justen Comment Link

    I tried a re-install, that didn’t work. So…

    After nuking the OS and re-installing, my problem system now works fine. I wish I knew what was wrong, and what a clean re-install fixed. I can say that now, twice, I have followed the instructions on this page and it has worked with Ubuntu 17.04, when I did it immediately after the clean installation. One time it failed. I don’t know why. FWIW, both 17.04 installs were on an SSD alongside of Windows 10 Creators Update. 64-bit. Not UEFI, I’m using legacy BIOS (I’ve got some old system that don’t support UEFI).

    Wish I could be more helpful for others that will probably encounter the same problem… all I can say is get this (xrdp/xfce4) procedure working ASAP, before installing other crap. Not sure if it matters, but for me… Install new OS, install byobu, apt-get update/upgrade/dist-upgrade, then do the above procedure for xrdp/xfce. Reboot. At this point I connected, and it worked. Re-installed all my other apps, and it still works.

    As an engineer, I HATE not knowing the root cause for a problem, but the weather is too nice to spend time inside trying to debug stuff outside of my area of expertise. I am gonna sit by the pool and drink margaritas, and get sunburned.

    Reply

    justen

    • May 11, 2017 - 11:39 AM - hans - Author: Comment Link

      haha, well, I agree with the “not knowing” part … but even more so with the “it’s sunny outside” – Glad you’ve got it up and running though. 

      Reply

      hans

  • Jun 9, 2017 - 1:40 PM - amin Comment Link

    great and simple to understand tnX man

    Reply

    amin

    • Jun 10, 2017 - 1:41 PM - hans - Author: Comment Link

      Thanks Amin!

      And thanks for taking the time and effort to write a thank-you note – it’s much appreciated! 

      Reply

      hans

  • Jul 3, 2017 - 4:34 AM - krishna Comment Link

    Hi,

    I installed Ubuntu 16.04 GNOME in HP Gen9 server and tried to login using RDP client from windows7. i followed the steps mentioned in this site and when i tried login im getting error after tcp connection established with 5910 password validation success and sending share flags, receiving server pixel fomat, name length, name, sending encodings. 

    Please suggest if any one faced similar issue.

    Reply

    krishna

    • Jul 3, 2017 - 9:37 PM - hans - Author: Comment Link

      Hi Krishna,

      I’m honestly a little confused about what the error is …?
      Can you be more specific?

      Reply

      hans

  • Jul 5, 2017 - 5:29 AM - Hikmat Comment Link

    Neil was absolutely spot on …I was struggling with accessing without the XFCE4 -terminal . but once installed … magic … thanks

    Reply

    Hikmat

  • Jul 17, 2017 - 8:39 AM - tom Comment Link

    Hi,

    thanks solved the problem I was having and did it first time, 

    Tom

    Reply

    tom

    • Jul 17, 2017 - 8:54 AM - hans - Author: Comment Link

      Hi Tom,

      thanks for taking the time to post a thank-you note and … glad yo hear this article was useful to you! 

      Reply

      hans

  • Oct 24, 2017 - 10:15 PM - justen Comment Link

    I upgraded two systems from 17.04 to 17.10. I had to make one simple change to get things to work. I found on another webpage about getting xrdp to work with 17.10.

    In /etc/X11/Xwrapper.config change allowed_users=console to allowed_users=anybody

    This works the same as before, firing up xfce4. However, 17.10 switches from Unity to Gnome by default, so xfce4 shouldn’t be necessary. I tried simply rolling out some of the changes adding xfce4, but this didn’t work. I think my problem is that since I upgraded from 17.04, I still have Unity installed, so I un-unrolled my changes. ;) I’m hesitant to purge Unity (sudo apt purge unity-session unity; sudo apt autoremove), seeing as I have working systems now. I would think with a clean install of 17.10, all one has to do is install xrdp.

    Reply

    justen

    • Oct 26, 2017 - 3:00 AM - hans - Author: Comment Link

      Hi Justen,

      thank you very much for the great info!
      I’m not a daily Linux user, so your info is very welcome here.

      As for Ubuntu using different windows managers; yep that can be a pain, and if I’d be in your shoes, I wouldn’t want to ruin a well working setup either. 

      Glad this article proved useful in some way though.
      Thanks! 

      Reply

      hans

  • Dec 27, 2017 - 7:05 AM - Hank Comment Link

    Hey, just wanted to say thanks for the excellent guide, worked great to get my Ubuntu 16.04 visible under Win 7!! I really appreciate your write-up.

    One quick question… is the xfce4 desktop only for the remote connections? My server is currently headless so I can’t look for myself but I like the Unity desktop when I have to do extensive work on it. xfce4 is fine for remoting in but I want to keep Unity as the local desktop. Does this change both? If it does, is it possible to have xfce4 only for the remote connection?

    Thanks

    Hank

    Reply

    Hank

    • Dec 27, 2017 - 8:58 AM - hans - Author: Comment Link

      Hi Hank,

      thanks for the compliment – it’s much appreciated. Also glad to hear it was of good use to you as well.

      xfce4 is indeed used for the remote connection. Weather this is the only desktop manager depends on your config of course, but the default desktop manager of Ubuntu (Unity) is or was not working with xrdp. This is not the only place where I have seen issue with this “new” desktop manager though, so xfce4 was a fallback option. I’m sure there are others that might work, I just haven’t tested any.

      Hope this help, and for the upcoming weekend: Happy New Year!   

      Reply

      hans

  • Jan 9, 2018 - 8:58 AM - Chris Comment Link

    Morning!

    I’ve used your tutorial several times to set up RDP to Ubuntu machines, and never had an issue.  However, this last time, it just won’t work.  I can ping the Ubuntu machine and I can ping out from the Ubuntu machine.  RDP from Windows says that it can’t find the Ubuntu machine.  When i run the command xfce4start, Ubuntu claims it’s already running.  Systemctl says that xrdp is running.  Have you run across this before?

    Reply

    Chris

    • Jan 9, 2018 - 2:23 PM - hans - Author: Comment Link

      Good morning Chris!

      Nope, I have not run into this problem before.
      A few things I’d check is;

      1) Is there any firewall blocking certain traffic?
      2) Did you try reaching the Ubuntu machine by using it’s IP address?

      That’s where I’d start – but I assume you’ve gone through those steps already.

      Reply

      hans

      • Jan 9, 2018 - 2:26 PM - Chris Comment Link

        I nuked the VM and started over.  It’s working now.

        Reply

        Chris

      • Jan 9, 2018 - 2:36 PM - hans - Author: Comment Link

        Nuking VM’s happens to me more often than I’d like to admit 

        Reply

        hans

    • Jan 18, 2018 - 10:20 AM - Ben Comment Link

      Make sure that TCP port 3389 is open on the machine – this is the port RDP looks for

      Reply

      Ben

  • Mar 29, 2018 - 4:54 AM - ic520hl Comment Link

    Hi sir.

      I’m work on ubuntu 16.04 x64 and win10 x64 , it’s work fine.

    but when I close the windows remote app, and reconnect agagin, I get a now desktop. how to go back last login desktop.

    Reply

    ic520hl

    • Mar 31, 2018 - 3:49 AM - hans - Author: Comment Link

      Hi ic520hl!

      That sounds about right – it will start a new session and not continue an existing session.
      In the comments you’ll find a few solutions and/or links to solutions. For example this link, and this link.

      Hope you dan find a fix … 

      Reply

      hans

    • Mar 31, 2018 - 5:11 AM - Ankit Comment Link

      Hi ic520hl,

      Same issue along with its solution has been posted in previous comment. See this comment. Do read that comment first and then add what I am mentioning.

      Further to add to that comment. Modify your /etc/xrdp/xrdp.ini file to include port=ask-1. 

      Let us see what happens during you connection:

      When you remotely connect your machine for the first time, all ports are free. -1 tells xrdp to connect a new free port (port begins with 5910). Hence, it will connect to 5910. While connecting, you can see a grey box in the left corner which mentions which port your session is connecting to. Now, by default xrdp doesn’t ask you port and takes -1 (connects to new port) everytime. By modifying the file, you are taking control over which port you want to connect to. Hence, if you can remember the port of your previous session, during next login you can mention the same port and you will connect to your existing session.

      Hope it helps!!

      Reply

      Ankit

  • Apr 19, 2018 - 6:26 AM Comment Link
    PingBack: linuxintosh.wordpress.com

    […] to Setup A Ubuntu Remote Desktop How to use xRDP for remote access to Ubuntu 14.04 3 Tips for the mRemoteNG Remote Connections Manager Common External Tool Configurations MRemoteNG […]

  • May 10, 2018 - 11:41 AM - jufan - Author: Comment Link

    Hi Hans,
    i followed your tutorial, and it work! Great, thank you very much. I’m always able to login without problem.

    But today, when i want to login i have following message: “xrdp_mm_process_login_response: login failed”

    i’m sure my user/pass is correct, my internet connection is also fine. When i check the service status using:

    sudo service xrdp status

    the result:

    * Checking status of Remote Desktop Protocol server xrdp [ OK ]

    * Checking status of RDP Session Manager sesman [fail]

    i try to uninstal xrdp and then re-install it again, but it still doesn’t work, the xrdp service is still not running. Please help, do you have any solution to this problem?

    Reply

    jufan

    • May 14, 2018 - 5:07 AM - hans - Author: Comment Link

      Hi Jufan,

      since I’m not using this that much anymore (no longer a need for it).

      I did see that others run into this problem (independent of this article) and did find this (older) post at AskUbuntu (I assume you use Ubuntu).
      Their suggestion:

      1. Uninstall xrdp service
      2. Update the patch
      3. reboot the server
      4. Again install the xrdp service & restart it connected. If it didn’t working continue with step 5
      5. edit /etc/xrdp/startwm.sh
      6. startwm.sh

      (pay attention to the last line): startwm.sh

      To make all these changes effective, restart xRDP as such: XRDP Service Restart

      (funny note: they refer to my article with their screenshots – )

      Reply

      hans

  • May 29, 2018 - 10:17 PM - Clive Delves Comment Link

    I am new to Lubuntu, I followed the above instructions and all went fine. Except I was stumped for a while on how to edit the startwm.sh file cos of ownership permissions. 

    But I found another posting to do a “sudo <editor> <filename>” where “editor” is the app you want to edit the text with = leafpad, and filename is = /etc/xrdp/startwm.sh

    After that everything went well.

    I am using LUBUNTU 16.04 now, since these above steps did not work with LUBUNTU 18.04.

    Finaly thanks very much..

    Reply

    Clive Delves

    • May 30, 2018 - 9:54 AM - hans - Author: Comment Link

      Hi Clive!

      Thanks for the tip! 
      Others will find this to be useful as well! 

      Reply

      hans

    • Jun 20, 2018 - 9:19 AM - Marton Comment Link

      I make it runs on Lubuntu 14.04 and was easy but tricky…

      After update and install xrdp I created .xsession file.

       echo lxsession -s Lubuntu -e LXDE 

      Save it and change permisions to make executable

       sudo chmod 755 .xsession 

      Finally restar xrdp and try to conect from windows remote desktop aplication

      Reply

      Marton

  • Jul 3, 2018 - 10:39 AM - tyty Comment Link

    hi! Hans…  

    i followed the rules step by step.

    but i get some errors, while connecting and i don’t know why. i’, using debian stretch

    the error state that:

    “sesman connect ok

    sending login info to session manager, please wait

    login successful for display 10

    started connecting

    connection problem, giving up

    some problem”

    is there any why this is not working??, i tried to use different rdp clients, it still like this.

    Reply

    tyty

    • Jul 4, 2018 - 6:18 AM - hans - Author: Comment Link

      Hi Tyty,

      Most likely this is caused by a communication issue, either over your network (I assume you work in your local network) or the window manager.
      Check out these comments.

      Reply

      hans

  • Oct 7, 2018 - 6:20 PM - Doug Miller Comment Link

    Hi,

    The setup worked and I can log in fine, but nothing populates on my desktop on the remote desktop. I am using Ubuntu 16 and Windows 10. Any suggestions of what to try

    Reply

    Doug Miller

    • Oct 9, 2018 - 5:44 AM - hans - Author: Comment Link

      Hi Doug,

      Are you seeing a blank (X) window, with no icons etc …? Then your window manager didn’t start.
      If you mean that you’re looking at a regular desktop, as if you started a computer fresh; then this sound correct as by default it does not resume an existing session (see also this comment for suggestions).

      Hope this helps 

      Reply

      hans

  • Nov 4, 2018 - 8:43 PM - Lee Comment Link

    Using xrdp for connecting to a remote Xubuntu system has worked great in 14.04 and 16.04.  It is failing if the ubuntu system is upgraded to 18.04.  I’m getting “VNC error – problem connecting” then another line “some problem”  Any help would be appreciated

    Reply

    Lee

    • Nov 5, 2018 - 2:38 AM - hans - Author: Comment Link

      Hi Lee,

      unfortunately, I’m not using Ubuntu 18.04, but from what I have read so far, this may do the trick:

      1. Make sure you’re not logged on to the Ubuntu desktop. Simply restart the computer and do not login.
      2. If you try Xorg session and it quickly disconnects; select the X11rdp from the drop-down list. At the first attempt it may hang, simply close the session again and try again, but it may keep prompting for a password even though it started. You can cancel the login prompt.
      3. Restart again if step two doesn’t work right away.
      Now,… I do not think this can be a permanent solution – maybe some of the users here have experience with Ubuntu 18.04 and would like to share their work around.
      Also note that Unity and Unity-3D does not work with VNC, so you have to disable those.
      If you only get a blank screen or a blank X-Windows screen: the desktop manager did not start – check your config.
      Another trick that may work, but I haven’t tested this either:
      echo mate-session> ~/.xsession
      sudo apt-get install mate-core

      Reply

      hans

  • Nov 15, 2018 - 3:12 AM - pratik Comment Link

    Thank You, worked for me.

    Reply

    pratik

    • Nov 15, 2018 - 3:39 AM - hans - Author: Comment Link

      Thanks Pratik, glad it works for you!
      Very much appreciate the Thank-You note! 

      Reply

      hans

  • Jan 10, 2019 - 10:46 AM - Nishad Nazar Comment Link

    Hi, 

    I was using xrdp for a while, Today I met with an error, and i cant figure out. I tried almost everything, but im sure im missing somethng very silly. 

    The error is password failed, error – problem connecting. I deleted all x session from /tmp/.x11 and /tmp.

    have made max sessions to 10 in the sesman.ini.

    Please help.

    Reply

    Nishad Nazar

    • Jan 10, 2019 - 1:57 PM - Lee Comment Link

      ====  Ubuntu 16 =======

      The recent failure of xrdp in Ubuntu is a result of an update to xrdp.  The file sesman.ini requires a change.  (in my case it is found in  /etc/xrdp/sesman.ini).

      The change is to add two lines in the section under [Xvnc].  The additional lines are

      param8=-SecurityTypes

      param9=None

      =============================

      By the way, I have yet to get xrdp  to work will in Ubuntu 18.  I’m still having to start a first session, kill the xfce4-session process associated with it, then start a session using the Xorg selection on my Windows system.

      Reply

      Lee

      • Jan 11, 2019 - 3:33 AM - Nishad Nazar Comment Link

        Hi Lee, 

        Thnx for your quick reply. I resolved it for now by Downgrading the XRDP and then Holding for further updates. 

        sudo apt-get install xrdp=0.6.1-2

        sudo apt-mark hold xrdp

        Reply

        Nishad Nazar

      • Feb 20, 2019 - 7:16 PM - Solomon Comment Link

        This solved my issue in which xrdp service stopped soon after logging in. The problem seems that the security type 2 (which is got selected by default) was not supported by the xvnc server.

        Reply

        Solomon

      • Feb 22, 2019 - 3:34 PM - hans - Author: Comment Link

        Awesome! 

        Reply

        hans

    • Jan 11, 2019 - 9:57 AM - hans - Author: Comment Link

      Thanks guys for posting the fix here! 

      Reply

      hans

  • Jan 31, 2019 - 7:20 AM - Mahesh Surwar Comment Link

    Hi,

    When i am executing below command getting an error.

    sudo service xrdp restart

    “It looks like xrdp is allready running,

    if not delete the xrdp.pid file and try again”

    due this error unable to login XRDP. please help on this issue

    Reply

    Mahesh Surwar

    • Feb 3, 2019 - 5:37 AM - hans - Author: Comment Link

      I’ve not encountered this issue.

      Can you check with “ps” if xrdp is already running?
      If so: kill that task and try again.

      Reply

      hans

    • Nov 19, 2019 - 5:51 AM - Ginesh Comment Link

      sudo rm /run/xrdp/xrdp.pid (this will delete the running process of xrdp)

      sudo service xrdp restart (this will restart the xrdp service)

      sudo service xrdp status (this should show both RDP server running good)

      Reply

      Ginesh

  • Aug 6, 2019 - 4:58 PM - Hemanth Comment Link

    Hello All,

    I am trying to install xrdp service on ubuntu 16.04 machine, i get the grey blank screen , whenever i do RDP to the machine.

    Reply

    Hemanth

    • Aug 7, 2019 - 7:33 AM - hans - Author: Comment Link

      Hi Hemanth,

      there are several reasons why this can happen. Either you missed something in the steps, or your Windows manager is not xfce4, or one of the problems (and solutions) described in this Ubuntu Forum post.

      Reply

      hans

  • Dec 19, 2019 - 4:54 PM - Aaron Comment Link

    Really helped me thank you!

    Reply

    Aaron

  • Dec 22, 2019 - 3:20 PM - NioloZonelibre Comment Link

    Sir,

    Manythanks

    I did many search and you’re aonly the one who solve my issue:;

    Black screen after login

    Champagne

    Reply

    NioloZonelibre

    • Dec 24, 2019 - 8:47 AM - hans - Author: Comment Link

      Hi Champagne!

      I haven’t used this in a while myself, but it sounds like the desktop manager did not start – you may have to check your config.
      Another user had success by rebooting the PC (on which Ubuntu ran).

      Reply

      hans

  • Feb 2, 2020 - 5:36 PM - Albert Bregar Comment Link

    Somewhat of a newbie question here. I haven’t worked much with Linux in the past, so I am trying to edit the .xsession file, but I cannot save the file. I am not sure if there is something I am doing wrong. 

    FYI, the source file for .xsession here looks nothing like the code in your steps. 

    Reply

    Albert Bregar

    • Feb 4, 2020 - 4:26 AM - Hans - Author: Comment Link

      Hi Albert,

      most likely you’ll need admin rights to save the file.
      So when editing with nano for example:

      nano somefile

      you’d actually elevate access right by using:

      sudo nano somefile

      As for the content of .xsession, I’m guessing per window manager this may be different.
      Before things go sideways: try to “read” and get an idea of what the content may mean.

      Reply

      Hans

  • Mar 29, 2020 - 2:19 PM - E 2 Comment Link

    After much frustration with trying to use stock xrdp on Ubuntu 16.04 LTS, I have located this post:

    https://netdevops.me/2017/installing-xrdp-0.9.1-on-ubuntu-16.04-xenial/

    which suggested to add a newer 0.9.1 version of xrdp from ppa:hermlnx/xrdp

    sudo add-apt-repository ppa:hermlnx/xrdp
    sudo apt-get update
    sudo apt-get install xrdp

    Having done the above, the remote login was possible to accomplish without any problem.

    Reply

    E 2

  • Sep 3, 2020 - 11:23 PM - sherry Comment Link

    I installed XRDP on Ubuntu 18.04, and it worked. But, I cannot open a terminal on remote desktop. If I try to open it, it opened on original computer not remote desktop.

    And also if I open some software on remote desktop, such as Chrome browser, It is also opened on Ubuntu 18.04, it is not possible to use the software simultaneously on remote desktop. 

    Please help!

    Reply

    sherry

    • Sep 4, 2020 - 4:49 AM - Hans - Author: Comment Link

      Hi Sherry,

      I have not used xRDP for a while now, and I do not recall running into an issue like that either.
      I do think though that Terminal not appearing on the remote desktop may be a security thing.
      Not being able to run an independent session (eg. desktop and remote being different user sessions): You may want to read this article.

      From that article:

      The trick is quite simple. The XRDP server is using a bunch of script that runs when a user start a remote desktop connection to the XRDP Server. We will simply modify one of these script in order to have the .xsession file created just before the user log into the system. 

      You will need to modify the following file /etc/xrdp/startwm.sh

      From a terminal console, type the following command


      sudo gedit /etc/xrdp/startwm.sh

      you will be prompted for a password. Type in the password. If everything goes well, you will see the content of the startwm.sh file.

      After the fi section add the following line


      echo mate-session >~/.xsession

      and save it.

      With this xRDP should make config files on a user basis, but to be honest: I have not tested this yet and a q1uick look at that file, depending on your setup, may make it a little confusing.

      Reply

      Hans

  • Dec 21, 2020 - 5:32 AM - kapil Comment Link

    Bro can you help me ..I am facing issue in this.

    Reply

    kapil

    • Dec 21, 2020 - 6:21 AM - Hans - Author: Comment Link

      Hi Kapil,

      I haven’t been using xRDP for several years, but feel free to explain the issue here. Maybe one of the other visitors can chime in, or maybe I know the fix 😊 

      Reply

      Hans

  • Dec 29, 2020 - 1:23 PM - Andyj Comment Link

    Any issues with support for Ubuntu 20.04.1 LTS?

    Can’t seem to get a session to open.  

    I get the logon screen, then enter Username/PW and goes black and terminates.

    Here’s what /var/log/xrdp-sesman.log says..  The only error I see is the Bolded-below.   Failed to bind IPV6 and IPV4?

    [20201229-14:04:56] [INFO ] shutting down sesman 1
    [20201229-14:04:56] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
    [20201229-14:06:45] [DEBUG] libscp initialized
    [20201229-14:06:45] [DEBUG] Testing if xrdp-sesman can listen on 127.0.0.1 port 3350.
    [20201229-14:06:45] [DEBUG] Closed socket 5 (AF_INET6 ::1 port 3350)
    [20201229-14:06:45] [INFO ] starting xrdp-sesman with pid 27306
    [20201229-14:06:45] [INFO ] listening to port 3350 on 127.0.0.1
    [20201229-14:09:06] [INFO ] A connection received from ::1 port 39292
    [20201229-14:09:06] [INFO ] ++ created session (access granted): username andyj, ip ::ffff:192.168.0.30:27155 - socket: 12
    [20201229-14:09:06] [INFO ] starting Xorg session...
    [20201229-14:09:06] [DEBUG] Closed socket 9 (AF_INET6 :: port 5910)
    [20201229-14:09:06] [ERROR] g_tcp_bind(9, 6010) failed bind IPv6 (errno=98) and IPv4 (errno=22).
    [20201229-14:09:07] [DEBUG] Closed socket 9 (AF_INET6 :: port 0)
    [20201229-14:09:07] [DEBUG] Closed socket 9 (AF_INET6 :: port 5911)
    [20201229-14:09:07] [DEBUG] Closed socket 9 (AF_INET6 :: port 6011)
    [20201229-14:09:07] [DEBUG] Closed socket 9 (AF_INET6 :: port 6211)
    [20201229-14:09:07] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
    [20201229-14:09:07] [INFO ] calling auth_start_session from pid 29136
    [20201229-14:09:07] [DEBUG] Closed socket 7 (AF_INET6 ::1 port 3350)
    [20201229-14:09:07] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350)
    [20201229-14:09:07] [INFO ] /usr/lib/xorg/Xorg :11 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
    [20201229-14:09:07] [CORE ] waiting for window manager (pid 29140) to exit
    [20201229-14:09:09] [CORE ] window manager (pid 29140) did exit, cleaning up session
    [20201229-14:09:09] [INFO ] calling auth_stop_session and auth_end from pid 29136
    [20201229-14:09:09] [DEBUG] cleanup_sockets:
    [20201229-14:09:10] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_11
    [20201229-14:09:10] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_11
    [20201229-14:09:10] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdpapi_11
    [20201229-14:09:10] [INFO ] ++ terminated session: username andyj, display :11.0, session_pid 29136, ip ::ffff:192.168.0.30:27155 - socket: 12
    Reply

    Andyj

    • Dec 30, 2020 - 4:43 AM - Hans - Author: Comment Link

      Hi AndyJ!

      I’m unfortunately not an xRDP expert, or a Linux expert for that matter 
      (maybe another user can chime in here)

      I did find this bug report (still open!) and this potential fix that may be helpful.
      Apologies for not being able to assist in a better way.

      Happy New Year!

      Reply

      Hans

      • Dec 30, 2020 - 9:32 AM - Andyj Comment Link

        Thanks…and Happy New Year to you as well!!!

        So interestingly…I installed Ubuntu via WSL and was able to get it to work.   

        My other version is an Xubuntu version (not sure if that matters) and running on an older Laptop that I am using as a Syslog server.  (Running LOGalyze)

        I will keep digging and see if I can figure it out.     

        Reply

        Andyj

      • Dec 31, 2020 - 5:49 AM - Hans - Author: Comment Link

        Hi AndyJ,

        Thank you as well – and if you find something interesting, then please feel free to share 

        Reply

        Hans



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.