Sponsored Links

X11RDP-o-Matic and RDPsesconfig : Updated to Version 2.5

UPDATE : Version 3 now officially released: http://scarygliders.net/2013/07/25/x11rdp-o-matic-version-3-now-released/

 

 

 

It's here! It's improved! It works even better!

I call this the "ssta release", in honour of a pal of mine who made a request which I've now implemented. ( --justdoit option, see below).

I have sweated and toiled, lost sleep, learned a lot, re-learned a lot, tested, tested again, and ended up with something which should work for just about everyone – everyone that is, who's users are local to the system – anyone using Active Directory to login still won't be handled by the RDPsesconfig utility yet – if you really want this, please donate to encourage it! I am unemployed, living in Japan, waiting until my house/land are sold before I can move back to my native Scotland – in the meantime, I'm using this time to do useful and unpaid stuff, so what I'm asking is, if you like what I'm doing and want to show your appreciation, hit the donate button! You don't need to be a Paypal member to do so :)

Did I mention the Donate button? Hit that thing Like A Boss, or The Fist Of An Angry God, or something, but just do it. Please B)

And I'd like to thank those who have sent a donation so far. I have received 2 "General" donations (from the button on the left hand sidebar) , and 1 specific donation from the donate button on the X11rdp-o-matic/RDPsesman V1 post. THANK YOU! You guys are awesome!

Anyway onto Version 2…

 

 

v2.5 Changelog

  • dpkg-status response has changed in Debian Wheezy! Changed the package status test to reflect this, which will also work with older distros.

v2.4 Changelog

  • set LANG so that dpkg etc. return the expected responses so the script is guaranteed to work under different locales – many thanks to reader Pedro Alves

v2.3 Changelog

  • Now works and tested with Ubuntu 10.04 LTS

v2.2 Changelog

RDPsesconfig

  • fixed naïve grepping for username in /etc/passwd. (thanks to reader Jeroen!) Utility should now not confuse username "tim" with the entry "rtkit:x:110:119:RealtimeKit,,,:/proc:/bin/false" in /etc/passwd , for example, and should now place the correct .xsession in the correct place.

V2.1 Changelog….

X11rdp-o-Matic

  • corrected error in package status test condition on line 166 – thanks to Daniel for pointing it out ;)

 

V2 Changelog…

X11rdp-o-Matic

  • Added package repository update before checking for required packages
  • Modularized for future multiple dialog front-ends
  • Added a text dialog front-end
  • Added a check for running on a non-X display terminal (will revert to text-only if so)
  • Uses the text mode front-end by default – Zenity is limited and rubbish!
  • Added command line parameters: --justdoit , --nocpuoptimize , --zenityfrontend , --keepsource , --nocleanup
  • Now runs in a text only environment – suitable for "Server" distro variants with no Xorg installed as yet, or basically for anyone who prefers the text interface over the Zenity one.
  • Added a non-interactive, "just do it" mode so script will run from start to end, with "sane" defaults
  • Really tidied up the script, should make it easier to read and edit later
  • Source code is downloaded to inside wherever the ScaryMatic directory is located
  • Added alteration of xrdp source code Makefile.am so the PID file is now in /var/run/xrdp/
  • Changed "PIDDIR=/var/run/" to "PIDDIR=/var/run/xrdp/" in the xrdp init script

RDPsesconfig

  • Added package repository update before checking for required packages
  • Modularized for multiple dialog front-ends
  • Added a text dialog front-end
  • Added a check for running on a non-X display terminal (will revert to text-only if so)
  • Uses the text mode front-end by default – Zenity is limited and rubbish!
  • Added command line parameter: –zenityfrontend – seriously? use the text front-end, it's better.
  • Really tidied up the script, should make it easier to read and edit later
  • Source code is downloaded to inside wherever the ScaryMatic directory is located
  • Removed the experimental PolicyKit rules generator. System admins should consider implementing their policies carefully.
 
 

What's New

 

The Text Interface

 
I implemented a pure text interface for both utilities, using dialog as the front-end. It is now the default interface, and I advise you keep using it.
 
This has a number of advantages over the original Zenity interface;
 
1) Now means that "server" editions of distros without GUI's can use X11rdp-o-matic utility to install X11rdp and xrdp
2) The text interface has more features than the Zenity interface (able to select all the users in the list in RDPsesconfig for example)
3) The Zenity interface will be dropped completely in the next release of the utilities – Zenity is not as useful as Xdialog was, and seems to be very buggy.
 
If you're running the dialog interface in a terminal window on a desktop, you can click the buttons with the mouse, anyway.
 

Just Do It mode...

 
Starting X11rdp-o-matic.sh with the --justdoit switch will download, compile, install, and configure X11rdp and xrdp from start to finish, with no user interaction required. This fire-and-forget mode is suitable for busy admins like my friend "ssta" who don't have the time for fancy schmancy front-ends or GUI's ;) You're welcome.
 
--justdoit will trigger non-interactive mode, will display plain text with no dialogs, by default will use additional cpu's in the compilation of X11rdp (make -j N+1 , where N is the number of cpu cores available), unless requested not to by use of the --nocpuoptimize switch.
 
Example of use;
 
sudo ./X11rdp-o-matic.sh --justdoit   : will download, utilize all cpu cores for compilation, compile, install, and configure X11rdp and xrdp automatically from start to finish.
 
sudo ./X11rdp-o-matic.sh --justdoit --nocpuoptimize : same as above but without the cpu utilization.
 

Cleanup of source code after installation…

By default, all downloaded source trees will be completely removed from the system, after compilation and installation – this was a feature request.
You can use the --nocleanup switch to keep the source trees after installation.
 
Example of use;
 
sudo ./X11rdp-o-matic.sh --nocleanup : Starts the utility in interactive text mode and will not delete the source trees after use.
 
sudo ./X11rdp-o-matic.sh --justdoit --nocleanup : Starts the utility in non-interactive mode and will not delete the source after completion.

Re-use source code

 
Related to the above, if you chose to keep the source, then on next use of the utility you should issue the --reuse switch , which will re-use the source trees – use this for non-interactive mode if you still have the source trees from last use.
 
Example of use ;
 
sudo ./X11rdp-o-matic.sh --justdoit --reuse : will re-use the source trees BUT WILL delete the source trees after completion!
 
sudo ./X11rdp-o-matic.sh --justdoit --reuse --nocleanup : same as above but will KEEP the source after completion.
 
 

Source code download location…

Speaking of source code – it is now downloaded to within the Scarymatic directory, instead of using /root, which was a bad idea from the start and I have no idea why I did that in version 1 :)
 

xrdp source code automatically altered after download

The upstream source has the .pid files generated by xrdp and sesman, located within /var/run. Since nowadays /var/run is a symbolic link to /run , /run seems to become owned by xrdp. I have now implemeted an automatic alteration of the source code so that the .pid files are now created within /var/run/xrdp – similarly, the xrdp init script has been altered to match this change.
 

Default system PolicyKit rules prevent users logged in via RDP from doing stuff locally logged in users can do

 
Like the title says, the default system rules prevent RDP users from, say for example, ejecting a CD/DVD from the drive. I placed an experimental rules generator which didn't work very well, and when it did work, it gave RDP users full access to do exciting things like reboot or halt the system without needing the admin password – that's a really bad idea, and now that I have learned a lot about how PolicyKit works, I have completely removed the policykit stuff from the utilities.
 
Instead, it is up to you – the administrator of the system – to decide who gets to do what on your system – I tell you how to do this in another article I have written in parallel with this post. It's not difficult but does entail editing XML files. I was considering making the RDPsesconfig utility parse the XML files and then being able to edit them, but seriously, parsing XML files in Bash script would be very difficult and fidgety to get right, and due to the nature of what PolicyKit does, I'm probably going to write a program to parse the PolicyKit action XML files, edit them and re-save them, in Python as a separate and new utility.
 

Screenshots

X11rdp-o-matic…

 

Debian Wheezy

Starting the utility

Automatically downloads required packages

The welcome page

 

 

 

 

 

 

Updating the package database

Installing required packages

Downloading the source

If you have more than 1 cpu it’ll make compilation quicker

 

 

 

 

 

 

Compiling X11rdp

Compiling xrdp

Installation complete!

Testing the xrdp connection

 

 

 

 

 

 

We haven’t ran RDPsesconfig yet!

Just Do It mode...

Just Do It mode…

Just Do It mode...

Just Do It mode…

 
 
 
 
 
 
 
 
 
 
 

RDPsesconfig

 
 

Select which desktop to use

Downloading desktop packages

Select which users to configure

Configuring selected user(s)

Completed!

 
 
 
 
 
 
 
 
 
 
 
 

KDE desktop configured

Selecting Gnome

Downloading desktop packages

Gnome desktop in RDP session

Customized Gnome desktop

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Download

Download from the Central Download Page

Donate!

 

If you like these utilities, please make a donation :)

 
 

Provide feedback!

Please submit any bug reports here in the comments section – if you have fixes or addtions – they're also welcome ;)
 
 
VN:F [1.9.22_1171]
Rate This Article
Rating: 9.9/10 (20 votes cast)
X11RDP-o-Matic and RDPsesconfig : Updated to Version 2.5, 9.9 out of 10 based on 20 ratings
Share the knowledge :
Facebook Twitter Pinterest Linkedin Digg Delicious Reddit Stumbleupon Posterous Email Snailmail

153 comments to X11RDP-o-Matic and RDPsesconfig : Updated to Version 2.5

  • Ulf

    I understand you want feedback.

    Tried it on LMDE MATE (Linux Mint Debian Edition” and the install script worked, as far as I can tell, flawless.
    The RDPsesconfig.sh however did not work, not even after adding “LMDE MATE Edition” to SupportedDistros.txt. In both cases it outputs an empty .xsession file. By adding “mate-session” manually to .xsession it’s up and running.

    Thanks a lot for this great script.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Ulf, hi..

      I’ve been busy working on other things for the moment, and intend to get back to updating/refreshing RDPSesconfig hopefully this week.

      Next week sees my son off school for easter holidays so if I can’t get stuff done this week then there may be more delay over the next 2. However, keep looking in from time to time.

      Regards

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Ryan

    The script worked like a charm, but I have a problem with RDP clients on my iPad. It seems that when i don’t have a physical mouse to move around the cursor point never moves no matter where i tap. On one client if i activate the “mouse” i am able to interact without a problem. I recognize that the script isn’t the problem, but I am wondering if this is a configuration issue, or if it is something to take up with the x11RDP people.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Ryan, hi

      Sounds more like a client issue – perhaps take it up with the x11rdp folks as I see from the development mailing-list that there was some recent work on cursors…

      Glad the script worked for you though ;)

      Regards

      VN:F [1.9.22_1171]
      Rating: +1 (from 1 vote)
  • Jesse

    Works on Ubuntu 12.04.2 LTS

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Patrick

    Hi Kevin,

    your scripts looks pretty convenient for my situation, so ty for this!

    Unfortunately, I’ve got some troubles with it:

    After executing the scripts X11rdp-o-matic and RDPsesconfig (selecting LXDE as wm), all i see after a (successful) login via rdp (win7 standard client) is a blank screen with a bold ‘X’ as cursor and a small terminal window in the upper right corner. There’s no LXDE desktop or sth similar after all.

    Before using executing your script, I was using Xvnc as backend for xrdp, this worked so far. However, performance and copy/paste were an issue.
    The installation of xrdp and LXDE was straight forward from the Ubuntu Server 12.04.2 package sources.
    After your script, Xvnc behaves exactly the same :/ No LXDE desktop anymore, just a small terminal to see.

    Any ideas?

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • uggla

    Is it possible to get single sign on working (connecting from Windows7 on a domain)?

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Blatant

    Worked like a dream on Ubuntu 12.10.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • compdoc

    I use ubuntu server and install a minimal Unity desktop. I have used vnc4server for a long time now, but it stopped working for me on ubuntu 12.10 and 13.04.

    So, I tried installing xrdp from the repos, but that wouldn’t work on 13.04 either.

    Sadly, I thought I would be stuck using 12.04, and wouldn’t get to test the newer releases of ubuntu. Having a gui for virt-manager, and gparted, etc. is very important to me.

    Well, I’m happy to report that X11RDP-o-Matic and RDPsesconfig 2.5 installs and works very well on Ubuntu 13.04 Raring Ringtail.

    I didn’t bother to remove the repo xrdp package, but X11RDP-o-Matic didn’t complain and now I have a remote desktop.

    The clipboard seems to have a problem, but I will research that later.

    However, I do have pulseaudio working on my Win 7 Pro 64bit workstation.

    That is very cool.

    Thanks!

    VA:F [1.9.22_1171]
    Rating: 0 (from 2 votes)
  • Xavi Solé

    Version 2.5 tested on Edubuntu 13.04 with gnome classic and it worked fine :)

    But the script V3 beta didn’t worked for me. It gave me error starting the xrdp service. The error says that libcommon.so.0 file is missing.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Hi Kevin,

    Thanks for this great work. It is really appreciate. I am just about ready to make my donation, but I was wondering if you can help me figure out why neither of my RDP clients (CORD and Microsoft RDP) are able to connect to 12.04.

    The connection log says:

    xrdp_mm_process_login_response: login successful for display
    started connecting
    connecting…
    connected ok

    and then after a few seconds, it closes the connection. I have 4 different users, and all 4 of them behave in this way. They get kicked out, even after it appears to connect. The only user that is able to connect is the `root` user. Any ideas why this might be happening? I’d really appreciate your help. Thx.

    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
  • ScottChapman

    So, I am having a problem. It seems like it installed great on my Ubuntu 10.04 LTS system, but when I try to connect via windows RDP I get the usual screen to login and select protocol.

    BUT…

    It is all blank, no text. And cursor is a black square.

    Something isn’t right…

    Any ideas?

    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Greetings…

      I just tested v2.5 on a pristine install of Ubuntu Server 10.04 LTS, and it worked perfectly.

      I used rdesktop to connect, and used “-a 16” and also tried “-a 24”, for 16 and 24-bit colour depth, both worked great.

      What RDP client are you using, and what colour depths?

      Regards

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Hi There:

    I have used your script and it works perfectly! I am hoping you might be able to help me though. I am trying to use VNC or RDP to remotely control a single application. In my situation – Firefox. I have set the .xsession to launch Firefox – and it works great. However, what I am looking for is the ability to have each VNC/RDP session create a new connection – not disconnect the existing connection or join the existing connection. Meaning – If I have a session on my iPad and one on my iPhone at the same username – they are independent of each other. Any ideas if that is possible without programming from scratch?

    Thanks!
    Daren

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • ian

    everything installed ok, seems to be really slow loading is there something i can do to make it faster?

    also how to play music from the remote server and have the sound thru the client.

    thanks and thanks for the scripts :D

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Keith

    Awesome – Thanks so much – confirmed working on the latest Debian 7 with Gnoome 3.8 :)

    installed using the –justdoit option… fantastic!

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Keith

      Should have mentioned – amd64 aswell. System was installed from the Debian 7 live Gnome CD earlier today.

      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Hi Kevin, really, really great work.

    I was able to compile x11rdp on the Raspberry Pi “Raspbian”. It took 5 hours but was successful.

    The problem is now that it is not possible to do startx as normal user anymore. The command returns immediately with the message:

    xinit: connection to X server lost

    It works for root so I think it has something to do with changed access rights. The Xorg.0.log files are identical for both root and normal user. It looks as if there is something missed for normal users and startx returns immediately without starting the desktop.

    Maybe this is a configuration problem of X which appeared after compiling the code.

    I think this prevents also the remote connection. The RTD client starts, and tries to connect but at a certain point (I think when the host tries to open X) the connection terminates.

    It would be great if I could start X and I could ACK compatibility for Raspberry Pi. I’m looking forward to make my performance tests rdp vs. x11rdp

    Thanks for your assistance.

    Klaus

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Mario-VdB

    Hi Kevin,

    We are running Linux LTSP servers with thin clients. The thin clients connect with query -X. This gives some issues when there is the slightest latency anywhere on the path between thin client and LTSP server. So searched for a solution and found x11rdp. Showed it to my boss and he was really enthusiastic. Priority number 1 now was to get the same robust setup with having the thin client automatic switching to another LTSP server if one should be unavailable, but with x11rdp. So installed x11rdp (2.5) on an Ubuntu 12.04 LTSP server and enabled ldap login in x11rdp (by the way we are using Novell edirectory, and it works, so you can add that also to your list). Created the necessary scripts to automatically login via rdp on another server if one becomes unavailable and it works like a charm! Within seconds I’m reconnected with rdp to another server! I now asked all my colleagues to connect to the test LTSP server and to work in our java applications to see what load will be generated and to estimate how many rdp sessions I can have at the same time. Till now there was only load when the java application was downloaded because of an update.
    So looks very promising! Great, Great work Kevin!

    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Thanks for the positive feedback :)

      You might like to try v3.0beta3 – it uses the very latest x11rdp back-end which will have bug fixes and additional connection features that the older x11rdp doesn’t have.

      Yes it’s a beta release, but it appears to be working consistently well on the various distros I’ve tried it on – plus it now creates .deb packages so you can deploy the generated x11rdp and xrdp packages to similar-arch systems once you’ve compiled them on the one.

      Regards!

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Andy

    Is there a way to kill sessions that have been terminated improperly on the RD side, or force xrdp to use the open session?

    Here’s what’s happening. I’m using a bunch of Wyse win terminals, and when someone closes the session from the terminal(does not log out through the OS), the session remains open. When they log back into the RDP session using the exact same credentials it starts a new session in parallel with the old one. I end up with phantom sessions. This is a real problem, especially when someone simply reboots a terminal and I have the session automatically start on boot.

    My RDP session is serving up a web browser only through a script, so it acts as a web kiosk that points to a single page. The web kiosk is in a production environment that serves up a time clock page for people to punch in and out for work and lunch through an ADP payroll page. That’s all they can do. They can’t even log out of the session through the window. I automatically start the session on boot, and in the chance that someone inadvertently closes the session. I even locked the max sessions at 3, but use 4 vm’s running Lubuntu to serve up 12 terminals for convenience. If a system gets rebooted, they’re locked out until I reboot the server and clear the open sessions.

    It works awesome in general with the exception of this one little problem. These are production people, so the terminals are subjected to people without regard for the technical aspects. If they have a problem I can see them pressing the power button, or closing the window. I’m hosed after that, because they won’t be able to start another session on that particular terminal.

    Lbuntu 13 / VMware ESXi
    WYSE 1200le

    Thanks,
    Andy

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Andy

      Answered my own question through trial and error.

      Firefox was keeping the connection alive and creating the issue.

      In the .xsession I changed the configuration to:

      pkill firefox
      firefox -width 800 -height 600

      Works perfectly now, and no one can ruin the sessions! The RDP is a locked down browser that only goes to the punch in screen. XRDP makes a great Web Kiosk!

      Excellent work on the project!

      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • Xrdpuser

    Is there any way to get transparent terminals (Konsole, Gnome-terminal or Guake) and is it by design you can’t use Krusader in root mode or kdesudo dolphin for root file access from a remote session? Terminal transparency and root file access work fine locally. Same thing happens with x2go server/client by the way. Using Kubuntu 13.10. Your script worked like a charm, but these 2 functions (transparency and root file access) would make it perfect for me. I do have another issue with logging out of sessions though. The session logs out, but the RDP window never closes. I’m connecting with Windows 7 x64 Remote desktop Connection 24bit or 32bit color. Kubuntu is running from a VirtualBox v4.3 VM with or without Guest additions installed. Any solutions to this?

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • David Fowler

    The –justdoit finished, but when I connect…

    xrdp_mm_process_login_response: login successful for display….
    error loading libvnc.so specified in xrdp.ini, Please add a valid….

    Thr …. is text I cant see as it’s clipped in the window.

    I’m connecting with Win8 RDP, to Ubuntu 12.04 LTS

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.