Sponsored Links

Install xrdp and X11rdp – the comprehensive HOWTO for Ubuntu and Debian based systems

UPDATE : Automatic tool now available : see http://scarygliders.net/x11rdp-o-matic-central-downloads-page/

 

This article is now DEPRECATED. See here and here for more modern hotness ;)

 

 

This HOWTO is mainly about how to compile and install X11rdp, which is an xserver binary which provides a true RDP experience.

NOTE : While I was writing this article, I went through all the steps written in below but using an SVN version of the X11rdp source, and after testing the resultant X11rdp binary, I ended up with a corrupted RDP session. At first I wrote this article using Ubuntu 11.04 64-bit and thought the RDP corruption was due to that, then I tried Ubuntu 11.04 32-bit – same thing. Then I tried Debian 6.0 32-bit – same thing. Then I tried Ubuntu 10.04 LTS and still got the same corrupted RDP session. So then I tried using the .tar.gz-packaged version of the source code from the download location I mention below and finally it worked perfectly. In other words, the SVN version of the x11rdp source does not work. *sigh*   Correction : it does work – you just have to compile xrdp from source (as well as x11rdp) – which I’m writing a new article about right now so please be patient).

Using Ubuntu 11.10? You should now read this new article which is even better than the one you’re reading now! :D

The pain I go through to make sure you lot get a top class article! ;)

Notice I’ve put up a DONATE button on the right hand side of the blog, if you find my articles useful. Hint hint ;)

Related posts :

Ubuntu Natty, xrdp, gnome-session, “No valid session found.”
Solution to Ubuntu 10.10 and xrdp sesman crashes on 2nd login.

Ubuntu 10.04 LTS running in a VM

 

 

For this tutorial, I shall be using a fresh Ubuntu 10.04  LTS installation (with latest updates and running the Ubuntu Classic desktop) running in a virtual machine by way of Virtualbox. Here’s a screenshot of it up and running on my main desktop.

 

 

 

 

This tutorial should work fine on all Debian-based distributions like Ubuntu, for example. If you’re using an RPM-based distribution then you’ll have to adapt the steps to suit yourself.

 

Install xrdp.

 

Open up a terminal session on your desktop, and type

sudo apt-get install xrdp

 The xrdp package and any dependencies will be downloaded automatically, and installed. The package install scripts will also set up the RSA keys needed for encrypted RDP sessions and will create a default xrdp configuration in /etc.

 

 

 

Now, at this point, you should be able to load up your favourite Terminal Server client utility, and connect to the xrdp login screen, here’s an example of that straight after I installed xrdp on my virtual machine. Remember to set your rdp client to 8 or 16 bit color depth – I always use 16 bit anyway;

 

Client connection window

Set the color depth to 8 or 16 bit

 

Xrdp login screen

 

 

 

 

 

 

 

 

 

 

 

 

xrdp session after login

 

 

 

And here’s the session running after successfully logging in via the xrdp login window.

 

 

 

 

 

You may be wondering why do anything more – the thing’s working, right? Well, it is, but xrdp at the moment is using vnc4server, which was automatically installed as a dependency when I installed the xrdp package earlier. VNC is another method of getting a remote desktop session. Because VNC is pixel-based, speed and performance-wise it’s great over a local network, but if you’re logging in remotely over the internet, it’s simply not as good as using a genuine RDP session, so we need a way to obtain a genuine RDP session.

And this is where the fun starts…

Obtaining the X11RDP binary…

You’d think that when you installed the xrdp package that it would have included the x11rdp binary, but for some reason this isn’t the case – perhaps because currently the X11rdp binary itself is a complete pain to build – mainly due to it being built against a single snapshot of the Xorg source code –  and therefore a complete pain to package. So, we need to build our own binary from source.

First, ensure you have the necessary utilities and development libraries needed for building from the source…

sudo apt-get build-dep xserver-xorg-core

apt-get build-dep <packagename> will retrieve everything necessary to build that package

 

 

 

 

This will install all the stuff required to build the Xorg package from source – we won’t actually be using the Xorg source as downloaded from Ubuntu itself, but we’ll need all the build dependencies for that all the same.

 

 

 

 

Next up we’ll also need automake versions 1.7 and 1.9 … during compilation in the freshly installed virtual machine I noticed the source build system was looking for both – I don’t think it’s fatal if you haven’t got them installed but I install them anyway;

sudo apt-get install automake1.7 automake 1.9

Now we need to download the x11rdp source. As a normal user;

wget http://server1.xrdp.org/xrdp/x11rdp_xorg71.tar.gz

Then;

tar xvf x11rdp_xorg71.tar.gz

Getting and extracting the source….

Lines of text will scroll past as the various source files are extracted. In fact, not only have you downloaded the x11rdp source, you’ve downloaded a somwhat older version of the complete Xorg source. X11rdp will be compiled against that.

I think there are supposed to be plans for somehow changing this so that you will be able to compile x11rdp against the current versions of Xorg – after all, the x11rdp source should just be able to use the current development libraries. I may try to produce a much smaller version of the X11rdp source, which will be able to build against the current versions of Xorg, by using the distribution’s “-dev” packages. Anyway, for now, we’ll use this method.

 

 

 

We need to make a directory to which the Xorg build system will use to store all the built binaries and files. In my case I used;

sudo mkdir /opt/X11rdp

Next, go into the root of the downloaded source;

cd x11rdp_xorg71

Then start the compilation of the underlying Xorg build… this is done by using the already configured build script;

sudo sh buildx.sh /opt/X11rdp

Seriously, go away and do something else that

 

 

If all is going well, the build script starts working, and the compiling begins!

This will take a while, so get off your chair and go have a cup of tea or whatever your favourite beverage is ;)

In fact, it’ll take quite a long time to compile so, go do something else for a while. On my machine/the VM, it took about 45 minutes to build!

 

 

 

 

If all has gone to plan, the compilation should have completed with no errors.

From your current location, type;

cd /opt/X11rdp/bin

And then

ls -lh

 

The X11rdp binary in /opt/X11rdp/bin/ – in highlight.

 

 

You should see the x11rdp binary has been compiled.

 

 

 

 

 

 

Now we need to soft link that in to /usr/bin …

sudo ln -s /opt/X11rdp/bin/X11rdp /usr/bin/X11rdp

 

You can test if your binary runs without crashing now by typing;

/usr/bin/X11rdp :1

 

Not crashing == good…

 

The “:1” is required because you probably already have an Xorg session running as “:0”.

It seems from the screenshot that all is well… pressing ctrl-C exits the program.

 

 

 

 

 

 

 

ALT-F2 from Gnome or KDE lets you enter a command line…

 

All should now be ready for use!

 

 

 

 

 

 

 

Fire up your RDP client of choice. For this howto, I’ve been using tsclient. For better fine tuning you can use rdesktop, either from your gnome or kde prompt window or from a terminal command line, and for example;

rdesktop -a 16 -g 1240x800 192.168.1.239

192.168.1.239 of course being the IP address of my virtual machine.

 

 

 

 

 

Choose “sesman-x11rdp”

 

 

 

Remember now to choose “sesman-X11rdp” from the drop-down menu on the xrdp login screen!

 

 

 

 

 

A full RDP session running, using X11rdp

 

 

 

And voila! It works! See the various xrdp and X11rdp processes in action, too.

 

 

 

 

 

Well, that’s it now, everything’s fully up and running.  Enjoy your full RDP server running from your Linux machine :)

If you have any further questions, don’t hesitate to ask. I’ll try my best to answer them.

Did I mention I now have a Donate button?

VN:R_N [1.9.22_1171]
Rate This Article
Rating: 9.6/10 (58 votes cast)
Install xrdp and X11rdp - the comprehensive HOWTO for Ubuntu and Debian based systems, 9.6 out of 10 based on 58 ratings
Share the knowledge :
Facebook Twitter Pinterest Linkedin Digg Delicious Reddit Stumbleupon Posterous Email Snailmail

51 comments to Install xrdp and X11rdp – the comprehensive HOWTO for Ubuntu and Debian based systems

  • Daniel

    Nice howto, thanks for sharing.

    Minor detail: “cd x11rdp_org71” should be “cd x11rdp_xorg71″

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
    • Kevin Cave

      Nice howto, thanks for sharing.

      Minor detail: “cd x11rdp_org71″ should be “cd x11rdp_xorg71″

      Thanks! And fixed!

      Regards.

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: -1 (from 1 vote)
  • Daniel

    … and I think this “sudo apt-get build-dep xserver-xorg-core” should be “sudo apt-get install build-dep xserver-xorg-core”.

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Kevin Cave

    Daniel

    … and I think this “sudo apt-get build-dep xserver-xorg-core” should be “sudo apt-get install build-dep xserver-xorg-core”.

    Daniel, actually, no, “apt-get build-dep <package name>” is definitely the correct syntax :)

    Regards.

     

    VN:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Daniel

    Yeah, my mistake. I’ve been fiddling around with xrdp and X11rdp the last few days and while it is a lot easier to get started if you use the Debian/Ubuntu xrdp package from the repo, it also means that you can’t use the latest X11rdp, as you’ve discovered.

    If you build xrdp from git and X11rdp from SVN you will end up with the latest and greatest:

    • Support for 24bpp color.
    • Reconnect to sessions with different size, desktop will automatically resize.
    • Reconnect sessions started with different clients (MSTSC, rdesktop, tsclient, Remmina).

    However, since the Debian layout of the xrdp install isn’t the same as the xrdp default, it does take some intervention to make it work. To be honest, I’m not 100% sure I’m doing everything right, but here’s a short version on how I’ve built xrdp from git.

    sudo apt-get -y install git libssl-dev libpam0g-dev autoconf libtool libX11-dev libxfixes-dev
    git clone https://github.com/FreeRDP/xrdp.git xrdp.git
    cd xrdp.git
    ./bootstrap
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
    make
    sudo make install
    sudo su -
    useradd -d /var/run -r -s /bin/false xrdp
    mkdir /usr/share/doc/xrdp
    xrdp-keygen xrdp /etc/xrdp/rsakeys.ini
    mv /etc/xrdp/rsakeys.ini /usr/share/doc/xrdp/
    chmod 600 /usr/share/doc/xrdp/rsakeys.ini
    chown xrdp:xrdp /usr/share/doc/xrdp/rsakeys.ini

    Add this to /etc/xrdp/startwm.sh, after “#export LANG=$LANG”:

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

    Copy /etc/init.d/xrdp from the Debian package and change/add:

    PIDDIR=/var/run
    SESMAN_START=yes

    That’s pretty much it.

    Building X11rdp from SVN is not much different from what you’ve written, just replace wget & tar with:

    svn co svn://server1.xrdp.org/srv/svn/repos/main/x11rdp_xorg71
    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Toby

    What computer did you use to run buildx.sh? I’m on an i3, and configure & make have been running for over 90 minutes. *45 minutes MY ASS!*

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Kevin Cave
      Toby

      What computer did you use to run buildx.sh? I’m on an i3, and configure & make have been running for over 90 minutes. *45 minutes MY ASS!*

      Heh :)
      The vm runs on a 4-core AMD Phenom beastie. It really did take the vm about 45 minutes to compile.
      Presumably by now your compilation completed?
      How did you get on?

       

       

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • don

    Very nice article. Very clear and easy to follow. I have just started the compile so it will be a while before I can test it. I am running Gnome Shell on Ubuntu 11.10 so it will be interesting to see if xrdp works well in that environment.

    I don’t like open ports on my firewall so my only access from outside is via ssh through a non-standard port. From there I tunnel port 3389 to the system that will be running xrdp. RDP to a windows workstation via a tunnelled port works fine so hopefully xrdp will too.

    Thanks again for the great article.

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
    • Kevin Cave

      Tunnelling 3389 via ssh is exactly how I do it too :)

      And you just reminded me of the next tutorial I was going to write ;)

      Glad you found the article helpful!

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
      • don

        Your article was flawless and the compile succeeded on the first try. :)

        I can rdp to my workstation but unfortunately I only get an empty desktop with the “File Edit View Go Bookmarks Help” menubar at the top. This may have to do with the fact that my default login is Gnome Shell. Or perhaps it has something to do with Ubuntu 10.10.

        I will play with it a bit more when I get home. If I get it to work I will post to let you know how I did it.

        VA:R_N [1.9.22_1171]
        Rate this comment
        Rating: 0.0/5 (0 votes cast)
        VA:F [1.9.22_1171]
        Rating: 0 (from 0 votes)
        • Kevin Cave

          You may have to install the gnome-fallback package (I presume you meant Ubuntu 11.10 and not 10.10) and then either alter or create a file called .xsession , which resides in your home directory and is used by utilities such as xrdp to determine which desktop session you want to start. If that file doesn’t exist your system will use your default desktop session of choice – which in your case is probably gnome3/unity?

          The good news is you can define a different desktop session for xrdp by specifying this in the .xsession file; for example say you think Xfce4 might be better for remote xrdp sessions… you’d simply install Xfce4, then in your .xsession file include the phrase;

          xfce4-session

          Then next time you log into your system via xrdp, you’ll get the Xfce4 desktop.

          I’ll look into some options if you wish to stick with GNome on your 11.10 system, and post them later.

          Regards.

          VN:R_N [1.9.22_1171]
          Rate this comment
          Rating: 0.0/5 (0 votes cast)
          VN:F [1.9.22_1171]
          Rating: 0 (from 0 votes)
  • Don

    Thank you! The .xsession file worked brilliantly. I used gnome-session-fallback and the rdp session shows the classic gnome desktop.

    And  you are correct that I meant 11.10 and not 10.10. I am using Gnome Shell and really like it. But classic gnome is fine for rdp sessions. The .xsession file lets me have the best of both worlds; gnome shell locally and gnome classic remotely.

    Of course, I will probably continue to do most of my remote access via terminal command prompt sessions. But having remote desktop available when I need it is definitely cool.

    I have added your site to my favorites and I also made a donation to help encourage you to continue ;)

    Regards,
    Don
    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Kevin Cave

      Thank you very much! And I’m glad I was of help. Now I’m under pressure to keep producing ;)

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Ken

    Thanks for the tutorial Kevin, it looks very comprehensive

    I’m currently getting the bug where if I log in with RDP from my Windows machine to my Ubuntu 11.10, all I get is an empty desktop and no desktop manager, etc….  Looks like your tutorial should fix this.  I do have a question though, the default VNC server that is being used by RDP(ie. the first option in that dropdown when u first RDP into it)….the x11rdp server is a lot faster than the default VNC server, correct?  Currently, when I choose the x11rdp server(and I’ve set it to 16bit color), it logs in ok, says its connected, then just drops me back to the RDP client.  Following your instructions should fix that?

    VN:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Kevin Cave

      Ken, greetings…

       I do have a question though, the default VNC server that is being used by RDP(ie. the first option in that dropdown when u first RDP into it)….the x11rdp server is a lot faster than the default VNC server, correct?

      Yep, it’ll be faster….

      Currently, when I choose the x11rdp server(and I’ve set it to 16bit color), it logs in ok, says its connected, then just drops me back to the RDP client.  Following your instructions should fix that?

      Yep! The reason for dropping back to the RDP client is because the RDP back-end server (X11rdp) does not get installed when you install xrdp – which is the front-end to all RDP-style connections. Following my tutorial will fix this :) Also, remember to follow the other tutorial on how to set up the gnome-fallback – which is linked a few times from this tutorial.

      Let me know how you got on :)

      Regards!

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Great article Kevin. I’ve tested it on Debian Squeeze and it works fine. Here are a few additional tips:

    1. Before you begin the build, ensure that the X11 fonts directory /usr/share/fonts/X11 exists as this is symlinked to at the end of the buildx.sh script (Alternatively you can just install “xfonts-encodings” package which will automatically create the X11 fonts directory).

    # sudo mkdir -p /usr/share/fonts/X11

    2. Instead of creating symlink in /usr/bin/ it is better to create symlink in /usr/local/bin/. This is because /usr/bin is generally used by installed packages.

    # sudo ln -s /opt/X11rdp/bin/X11rdp /usr/local/bin/

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Chaitanya Parekh

    Dear Kevin,

    Your article have proved to be very helpful. thanks for that

    I wanted to ask if we can also redirect sound on our local machine as we do when connecting to windows based rdp server.

    please reply it will be helpful for the school I am working for.

    Thanks in advance
    Chaitanya

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Chaitanya, greetings…

      At this time, it doesn’t look like xrdp redirects sound from the remote machine to the client machine.

      There might, however, be a way of doing this via an ssh tunnel and Pulseaudio. I can probably see a way of creating an ssh tunnel from the RDP session running on the server to the client machine, and using that to redirect sound output to the client.

      I’m a little bit busy this morning – as usual – but once I return from the things I need to do, I’ll have a look into that – might make for an interesting additional article too :)

      Regards!

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Dan

    Kevin,

    Thank you very much for taking the time. I’m a bit confused donating in Japanese Yen :/

    Also, being a complete newbie, any pointers on post build cleanup, i.e. what files can be deleted, would be nice.

    Sincerely,
    Dan

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • If you’re finished compiling and everything is working, you can remove the files and directories you downloaded, which are located in your home directory.

      Regards

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Dan

    One more thing, as a suggestion, it might be nice to mention you can modify the /etc/xrdp/X11rdp.ini file so that sesman-X11rdp is the default Module when you connect with the client, that way you do not have to select it each time.

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Dan, ah yes that’s a nice suggestion. I did do that on my subsequent article for more modern versions of Debian/Ubuntu…

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Tom

    Thank you for the HOWTO.

    I followed the instructions.

    When trying to remote the connection log seems to be OK, but then it drops the connection.

    Please help.

    Thank you.

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Hello

    I run precise at the moment. When I install xrdp from SoftwareCenter I get version 0.5.02, which seems to be a rather recent version. Could you tell me in a short sentence what the advantage is, to do all these steps you outline above? Better performance?

    Thank you very much.

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • You'll get much better performance than by using VNC as the backend server.

      However, have a try of the automated install utilities I recently wrote.

      Regards

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Digitalclone

    Any suggestions on how to uninstall X11rdp and xrdp completely?

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • The following script, which I'll include with the new version of my installation utilities, will remove X11rdp and xrdp…

       

      #!/bin/bash
      
      echo Removing x11rdp and xrdp...
      /etc/init.d/xrdp stop
      rm /etc/xrdp/startwm.sh
      mv /etc/xrdp/startwm.sh.BACKUP /etc/xrdp/startwm.sh
      rm -rf /opt/X11rdp/
      dpkg -P xrdp
      rm /usr/bin/X11rdp
      echo Removal of xrdp/X11rdp complete.
       
      Just copy and paste that into a file called wipeRDP.sh , then chmod u+x wipeRDP.sh, and as superuser execute the script.
       
       
      Regards

       

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Quang

    BTW, you mentioned that you tried a fresh install of 12.04, but didn't say which version, desktop or server? I tried most of the steps to build it manually but it fails complaining about xprint.c references. So I then used the v2.3 of the script to do it all automatically. It fails silently, but it doesn't appear to build the x11rdp binary. I'm going to try to reload the system using the "desktop" disk instead of the server install. I did a server install + ubuntu-desktop meta packages.

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • I've tried it on both Desktop and Server editions and it's successful every time, otherwise I wouldn't be releasing these utilities :)

      However, if you think there are still bugs in v2.3, I'm always, always open to bug reports and fixes! :)

      Regards.

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
      • Quang

        So I ended up reloading a "base ubuntu" and ran your script, it worked just fine. The first time, I had already done a full load with everything already configured. It seems that something was causing the build to fail. Doing it the manual way, I saw that it complained about certain variable declarations issues etc. I didn't have time to debug the library issue, so I just did a reload and ran the script on a base setup. It appears to be working now. One thing that may need to get tweaked is checking to see if it builds correctly. It appeared that it worked, but doing the manual method showed that it had indeed failed. So far so good with the good install! Thanks!

        VA:R_N [1.9.22_1171]
        Rate this comment
        Rating: 0.0/5 (0 votes cast)
        VA:F [1.9.22_1171]
        Rating: 0 (from 0 votes)
      • Quang

        I attempted to install this after I had fully configured my system. After following your manual steps, I ran into a problem with some undeclared variables in xprint.c. Instead of trying to debug this issue, I did a fresh reload. This time, I ran your script after the "base ubuntu" was installed. This time, everything appeared to work. Something that I configured/installed before must have messed something up.
        Now, it works for the most part except one weird thing. I have to log into the rdp twice. The first time, it just knocks me off after logging in. The second time, it appears fine. Any idea why this could be? In my .xsession, I just have the:
        "gnome-session –session=ubuntu-2d"
        Thanks,
        Q
         

        VA:R_N [1.9.22_1171]
        Rate this comment
        Rating: 0.0/5 (0 votes cast)
        VA:F [1.9.22_1171]
        Rating: 0 (from 0 votes)
        • Even I get that sometimes – I have no idea what's causing it – some kind of race condition between xrdp and the X11rdp back-end X server, is my best guess…

          The session actually does start on the first login, and all you're doing when you log in again after that disconnect, is reconnecting with that original session, so you don't have two sessions running, only that one. I just ignore it to be honest – a minor inconvenience.

          But yeah, it'd be nice if it didn't have that behaviour :)

          You might find that future versions of X11rdp won't have that behaviour. As and when Jay Sorg gets out a fully stable and working new version of his splendid X11rdp, I'll update the utilities to use that. :)

          Regards!

          VN:R_N [1.9.22_1171]
          Rate this comment
          Rating: 0.0/5 (0 votes cast)
          VN:F [1.9.22_1171]
          Rating: 0 (from 0 votes)
        • Quang

          Figured it out. There appears to be some weirdness with autofs or something. I added a "sleep 1" in my .xsession before the gnome-session line and it fixed it.

          VA:R_N [1.9.22_1171]
          Rate this comment
          Rating: 0.0/5 (0 votes cast)
          VA:F [1.9.22_1171]
          Rating: 0 (from 0 votes)
  • Kelvin

    Thanks so much for this… What a fab write up which helped me a treat.
     
    Regards, Kelvin

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Keith

    Thanks Kevin, have got this up and running. One question – can I share a disk on my windows box to the linux server I connect to with x11rdp? If I use ms rdp to connect to another windows box then I can configure RDP to share drives. Can the same be done with x11rdp and linux?

    Keith

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Hi Keith, glad it’s running fine for you.

      As for disk sharing, to be brutally honest I have no idea, as I did all this because I was only interested in getting a working remote desktop facility at the time :)

      If/when I get the time, I’ll have a look.

      Regards!

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Kevin

    The server works, but some windows have no contents…with GNS3 a “New Project” window that normally has two user entry fields is all white, no content. Any idea why the window content might be blank?

    Thanks for the help!
    Kev

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Gaby

    Hi,
    Thank you for the walkthrough.
    I use windows mstsc.exe to connect my linux machine.
    I used to select sesman-Xvnc but it always opened a new Xsession and would not let me back in to the old.
    I installed x11rdp and selected the module before logging in, but I get thrown out of the session. In the connection log I get:

    and then it exists and I get the mstsc.exe window again.

    Anybody have a clue how to fix this?

    Thanks
    Gaby

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Gaby

    Hi,
    Thank you for the walkthrough.
    I use windows mstsc.exe to connect my linux machine.
    I used to select sesman-Xvnc but it always opened a new Xsession and would not let me back in to the old.
    I installed x11rdp and selected the module before logging in, but I get thrown out of the session. In the connection log I get:
    connection to sesman ip 127.0.0.1 port 3350
    sesman connection ok
    sending ling info to session manager, please wait…
    xrdp_mm_process_login_response: login successful for display
    started connecting
    connecting…
    connected ok

    and then it exists and I get the mstsc.exe window again.

    Anybody have a clue how to fix this?

    Thanks
    Gaby

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Hamed

    Thanks for the detailed instructions.

    I installed this a while ago and it’s working fine.
    Then I added a new user to my machine.
    But when I log in using the new user (through xrdp) it only brings up an empty desktop with no menus.

    How can I fix this?

    Thanks,

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Hi Hamed,

      Hmm… try logging in as the new user locally (i.e. not via xrdp), open up a terminal, and as that new user type touch ~/.Xauthority

      Then log out, and try logging in as that user via xrdp. Let me know if that works or not.

      p.s. Which Distribution of Linux is this on? ;)

      Regards

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • jan

    I am lost here: 1

    sudo sh buildx.sh /opt/X11rdp

    this has not been build and i cant find using locate

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • jan

    http://splashurl.com/ks2474h much easier to follow and works

    VA:R_N [1.9.22_1171]
    Rate this comment
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Hi Jan,

      Did you see at the top where this article – written in 2011 by the way – is marked as DEPRECATED? With the links to updated articles?

      Time has kind of moved on since I wrote this – 3 years ago.

      I think it’s time I closed comments on really old articles – I’m honestly finding your complaints a bit ridiculous, given the age of the article and your seeming inability to read.

      VN:R_N [1.9.22_1171]
      Rate this comment
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: -1 (from 1 vote)