Sponsored Links

Donate via Bitcoin

Donate to Scarygliders

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

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.4/10 (17 votes cast)
X11RDP-o-Matic and RDPsesconfig : Updated to Version 2.5, 9.4 out of 10 based on 17 ratings
Share the knowledge :
Facebook Twitter Pinterest Linkedin Digg Delicious Reddit Stumbleupon Posterous Email Snailmail

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

  • Rockvole

    Nice work Kevin.

    Your script also works in Lubuntu 12.04 LTS

     

     

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • works in Lubuntu 12.10 :D

     

    thanks to :)

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

    Perfect! Works fine in Lubuntu 12.10. Don't worry, when it takes some time to build x11rdp. =)

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

    It can't find X11rdp source:

    # svn co svn://server1.xrdp.org/srv/svn/repos/main/x11rdp_xorg71

    svn: E170001: Unable to connect to a repository at URL 'svn://server1.xrdp.org/srv/svn/repos/main/x11rdp_xorg71'
    svn: E170001: Could not create SASL context: generic failure: No such file or directory

     

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • I’m working on a new release which will use the current source from git – probably a few days away so stay tuned.

      Regards.

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

        Any updates on this? I’ve been messing around with it for a bit, but always have problems with the PID files and permissions to config files after updating xrdp and X11rdp.

        VA:F [1.9.22_1171]
        Rating: 0 (from 0 votes)
        • Slowly but surely working on it.

          There’s a beta version but being beta, it’s not absolutely ready for prime time just yet.

          It’s very difficult to make generic enough to guarantee working on every distro, and testing takes up an inordinate amount of time, because testing involves running it and waiting for compilations to finish.

          It would be nice to have more people involved in improving it as well – I have one additional collaborator (Gustavo) who’s recently done some good stuff on the beta development.

          The source is up there on GitHub, so feel free to contribute as well :)

          Regards

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

    Thanks for the useful tool.  It cCompiled, installed, etc. just fine on 12.04 LTS desktop, runs and I can connect from Win 7 client no problem, but how to make RDP grab the session already logged-in at the console?  

    I log in with same user creds but get a new/different session with a simlar but slightly different desktop than I get when logging in at the console directly.  Any ideas?

     

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

      RDP on linux behaves differently to RDP on Windows.

      When logging in over RDP, you get a completely seperate X11 session – you don’t get the console session, which explains why you’re seeing that behaviour.

      It’s that way by design.

      If you want to be able to to continue work on a console session remotely, start a RDP session at the console and do work within that window. When going away, just close the RDP window – don’t log out of the session.  Then remotely connect using the same colour depth (e.g. 16 or 24) and resolution, and user name that you started the RDP session with at the console - you will be reconnected to that running session and can continue working on whatever you left running there.

      Hope that helps.

      Regards!

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

    Just got a new VPS host and went through multiple reinstalls before settling. This script saved me SOOOOOO much time. Donation has been sent and I will be shouting the existence of this tool from the mountains to anyone who will listen.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Jim, thank you!

      I’m almost at the point where I can release v3.0 – which now builds packages so you can build on one machine and then just install the generated packages onto another B)

      I’ll probably release it as a BETA and try to get plenty of folks to beta-test it and offer fixes/suggestions before it’s unleashed as a fixed release.

      Stay tuned ;)

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

    Hi, I am trying to get this running on Mint 14 with Cinnamon. Kind of an xrdp noob. The script successfully installed xrdp, but I see no difference from the version that the package manager installed previously. After running both scripts, when I connect (using Mac MS rdp client) I get the “Logon to xrdp” dialog where you can choose a Module, username, and password. I cannot get it to connect if I go wit the default “sesman-X11rdp” module. If I change the module to console, i can put in the VNC/Desktop sharing password and it will connect. However, it connects with a slow vnc type connection with no menus. Worse than connecting directly to the desktop sharing with Chicken VNC. Does anyone have xrdp running on Mint? Thanks W

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

    Hi, I’m running Ubuntu 12.04. Installed xrdp from Ubuntu packages and used it with Xvnc, worked like a charm. Built X11rdp, but not xrdp, according to your script and installed. Connects, I can choose the X11rdp session and log in, but then only garbage appears (random green and blue patterns, I can see something happen when I press menu button, but nothing else).

    Thought it might be due to the Ubuntu package, so I ran your script with downloading and re-compiling everything. Using your version, I can’t even log in: I receive the login screen, but I can’t log in because my password is not recognized. In authlog I find

    Mar 7 17:57:15 CBM8032 XRDP-sesman[3444]: pam_unix(xrdp-sesman:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=XXX

    although the password is definitely correct. I wonder about the XRDP in capital letters in that message. The file in pam.d is xrdp-sesman, is that the problem?

    Any ideas about one of the problems?

    Best wishes, Frank

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

    Hello,

    Firstly Awesome Script, I just used it to install xrdp/X11rdp on a Roboard RB110 (specialized SoC robotics board i486 (yes 486) instruction set) running Debian 7 (rc1), took a bit of fiddling but I can login from mountain lion using the MS RDP client. However I have two small issues that hopefully you can help me with. Firstly if I log in as root it behaves the same as logging in locally, but logging in as a normal user fails on the first attempt after a reboot (exits right after the connect message) but after that it stays connected in subsequent attempts. Secondly a normal user login does not start the xfce-panel, I have to start it manually other than that it behaves normally.

    Cant see anything obvious in the logs or wrong with permissions. I recreated the user account from scratch and reran the RDPsession config tool; no difference in behavior. Any Thoughts?

    Cheers

    Ray

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • 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: 0 (from 0 votes)
  • 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 0 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: 0 (from 0 votes)
  • [...] X11RDP-o-Matic and RDPsesconfig : Updated to Version 2.1 [...]

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=""> <strike> <strong>