Sponsored Links

The Scarygliders X11rdp-O-Matic and RDPsesconfig : v1.1 released, V2 now available

 

Note : Version 1.x, 2.x are now deprecated in favour of v3.0 which contains fixes and additional changes, plus creates Debian packages. v3 is out now and is a vast improvment.

 

 

 

Article first published on May 23, 2012 @ 8:17

UPDATE : June 17, 2012

Changelog :

Added important note about Policykit – see below

Released v1.1 – see below

——————————————————–

I've been busy these last few weeks.

I've written a utility which will do all the hard work for you to automatically compile and install X11rdp and xrdp :D

Bonus : included is a utility which will configure your RDP desktop session, and more!

Both utilities will work on Debian-derived distributions…

They're both Bash scripts using Zenity for the GUI bits… I'm was thinking about re-writing them in Python so I can present a better graphical user interface, Zenity is buggy and quite limited.

If you're running it on a desktop which uses Metacity, expect the windows to be placed pretty much randomly around your screen – it's annoying and it seems to be down to how Metacity handles new windows. Or something. Haven't had the time to find out why. A minor annoyance though. The slightly higher annoyance is that Zenity grows the height of info windows for some insane reason – hence the reason I think I'll totally re-write this in Python.

Don't expect the scripts to be perfect – they have next to no error trapping, can't detect if you have a network connection or not, and won't stop if there's a package download error.

If you download and try the utilities, let me know how you got on, and vote in the Poll at the bottom of this page.

If you wish to stop at any time, hit CTRL-C in the terminal window from which you started the utility.

However, they DO work and do the job, if you meet the requirements…

Requirements

  • A Debian-derived distribution – this will not work for anything but those.
  • Your system connected to the Internet for package download – (possibly the install discs might work if you don't)
  • The ability to read, think,  and to click OK from time to time.
  • An ability to be honest with yourself and to seriously consider sending me a donation for writing these ;)

Please read ALL of this page, including the walkthroughs, so you know what to expect before using the utilities!

X11rdp-O-Matic

Description

This utility will automatically download, install, and configure X11rdp and xrdp on your Debian-based system, presenting you with various GUI menus and options along the way.

Features

  • Easy to use GUI which helps you through decision making, if decisions need to be made
  • Automatically detects you have the required packages installed and will install them if needed
  • Automatically downloads the X11rdp and xrdp software and makes any changes required before compilation
  • Detects if your system has more than one CPU core and can automatically optimize the X11rdp build script to speed up compilation
  • You can run the utility repeatedly – it detects if you had previously downloaded the source or compiled X11rdp and will ask you what you want to do
  • Automatically updates the /etc/xrdp/xrdp.ini config file so the RDP session is the default
  • Automatically updates to an edited xrdp init script (to include the /var/run and SESMAN configuration)
  • Takes all the manual hard work away from you! ;)

 

RDPsesconfig

Description

This utility will help configure your RDP user's sessions automatically via an easy to use GUI menu system.

Features

  • Easy to use GUI which helps you through decision making, if decisions need to be made
  • Automatically detects you have the required packages installed and will install them if needed (e.g. install LXDE if not already there)
  • Lets you select multiple users to configure their .xsession file automatically!
  • Can add a PolicyKit policy so that remote RDP users can perform priveleged tasks just like local users can! Removed – too dangerous – wait for version 2
  • A selection of Desktop choices, based on which distribution you are running on!

 

Important note about PolicyKit

I added the policykit generator into version 1, because a number of readers of this blog were wondering why they couldn't do a lot of the useful things that local desktop users can do. This feature is EXPERIMENTAL and I should have added that caveat right from the start – my apologies – the utilities are completely non-trivial to write and explaining the policykit caveat was on my to-do list, but, between answering questions here, working on other things, and family life, this one escaped.

The PolicyKit generator in version 1 created rules which will ONLY work for rdp users who are a member of a group called admin – if your system does not have this admin group, then you'll find the rules don't do anything. Also, the rules are dangerous in that they took a "bludgeon" approach and gave permission to REBOOT or SHUT DOWN the server to any user who is a member of the admin group, without asking for a password! You do NOT want remote users who do not know what they are doing being able to restart or shut down your precious server! 

I have decided for the time being to REMOVE the PolicyKit generator from version 1.1 , and version 2 onwards will have a better and more refined PolicyKit generator.

In the meantime, if you want to be able to eject media, mount a device, etc etc from an RDP session, please see the files within the directory /usr/share/polkit-1/actions , and have a look for yourself. You will see how much work is involved in writing a tool to alter and maintain these permissions :

If you want to remove the rules that were created from version 1 , simply remove the file /var/lib/polkit-1/localauthority/50-local.d/local.pkla .

 

Tested and works on…

  • Debian 6 (Squeeze)

  • Debian Testing

  • Ubuntu 12.04 LTS

  • Xubuntu 12.04 LTS

  • Linux Mint 12

  • Linux Mint 13

And probably a lot of other Debian-based distros… I'll update the list when I get feedback and/or I test it myself. If it doesn;t work on your particular favourite Debian-based distro let me know and I'll have a look into it.

Instructions

1) Download the package. Link is at the bottom of the article. Please read article beforehand.
2) Un-tar it to somewhere in your home directory. It will create a subdirectory called "ScaryMatic"
3) cd ScaryMatic
4) You will see a number of files. The two files you need to run are x11rdp-o-matic.sh , and RDPsesconfig.sh
4) Both utilities need to be run as root, so use su to get to your root prompt, or use sudo to start them
5) Relax as the utilities walk you through the process of both getting RDP installed, and configuring your RDP user's sessions ;)
6) Donate ;)

 

X11rdp-o-Matic Walkthrough

 

 

Starting X11rdp-o-matic

 

 

 

 

Run as root.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

An introduction

 

 

 

 

 

 

 

 

 

 

It'll check to see if you have all the packages necessary to get RDP up and running properly/compile and install the ones it sees aren't yet installed.

 

 

 

 

 

 

 

 

After that it'll remove but not purge xrdp so we can use the package's leftover stuff ;)

 

 

 

 

 

 

 

If you previously ran this utility and already have the source code there, it'll detect that and ask if you want to move it out of the way. You can usually asnwer No and re-use the existing source tree so you don't have to download it again, but, if you think it didn't download properly the last time, you can elect to do it again.

 

 

 

 

 

 

 

 

 

 

Then it'll grab the xrdp source…

 

 

 

 

 

 

 

 

 

Keep an eye on the terminal window too for useful information…

 

 

 

 

 

 

 

 

 

It'll also detect a previous installation of X11rdp, and suggest you remove that – probably a good idea to say Yes here…

 

 

 

 

 

 

 

 

 

 

 

 

 

Bonus feature! It'll make your CPU's even hotter!  ;)

 

 

 

 

 

 

 

 

 

 

 

Toasty CPUs are great in the winter ;)

 

 

 

 

 

 

 

 

 

xrdp being compiled…

 

 

 

 

 

 

 

 

 

 

 

As you can see, it does everything for you!

 

 

 

 

 

 

 

 

 

 

 

 

And finished compiling and installing X11rdp and xrdp.

 

Next up is configure user desktop sessions, and PolicyKit if you need to…

 

 

 

 

 

 

 

RDPsesconfig Walkthrough…

 

 

Again, needs to be run as root…

 

 

 

 

 

 

 

 

 

 

Choose which desktop the selected users will see after they login…

Depending on the distribution, some of these options will change.

If your system doesn't yet have the desired desktop's packages installed, it will try to install them.

 

 

 

 

 

 

 

 

 

 

 

Choose which users will have their .xsession files created or altered from the choice you made above.

The utility will go through all users on your system and offer them up in the list. It automatically filters out "system" users like root for example, and also others like "smbguest".

You can choose 1 or more users to configure in one go – they'll all get the desktop which was selected previously.

 

 

 

 

 

 

 

 

 

 

 

 

Here for example I chose both users.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Again, some useful info is printed sometimes to the terminal window…

 

 

 

 

 

THIS EXPERIMENTAL FEATURE HAS NOW BEEN REMOVED AND WILL REAPPEAR IN A BETTER METHOD IN VERSION 2.

Another useful feature!

Most distros implement PolicyKit these days, which is configured by default to treat remote users so as to reduce the amount of priveleged (read that as useful) tasks they can perform – like reading from a USB drive, mounting/unmount, etc…

This has caused a few site vistors here some grief in the past. So I've incorporated this feature, which will create and install a remote users policy so they'll be able to do stuff that a user who logs in locally can.

A different message will pop up if you've never configured a policy before.

In this case I did before.

Note, you only really need to do this once, regardless of what desktop session is being configured – it's just that sometimes configurations can change if for example PolicyKit packages have been updated.

 

 

 

 

 

 

And it's all done, and you can now log in via RDP and enjoy it :)

 

 

 

 

 

 

 

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

 

Download

 

Reminder : Version 1 & 1.1 are now deprecated in favour of v2 which can be downloaded from here.

 

X11rdp-o-matic v1.1 Changelog
  • Source code now downloads to inside the ScaryMatic directory – placing it in /root was a silly way to do it.
  • removed the Zenity "Compiling …." pulser windows – Zenity consumes precious cpu time! 
  • 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
 
v1.1 Changelog
  • changed "xfce-session" to "startlxde" for LXDE sessions – seems to be common amongst all distros.
  • completely removed the experimental policykit generator for the time being until v2 – policykit is complex and administrators should be careful which users they give permissions to – you don't want ordinary users being able to shut down or reboot your system!

 

Point Release and current v1.1 – use this : 

 
[wpdm_file id=2]
 

 

Deprecated Version 1 :

[wpdm_file id=1]

 

 

 

VN:F [1.9.22_1171]
Rate This Article
Rating: 10.0/10 (12 votes cast)
The Scarygliders X11rdp-O-Matic and RDPsesconfig : v1.1 released, V2 now available, 10.0 out of 10 based on 12 ratings
Share the knowledge :
Facebook Twitter Pinterest Linkedin Digg Delicious Reddit Stumbleupon Posterous Email Snailmail

48 comments to The Scarygliders X11rdp-O-Matic and RDPsesconfig : v1.1 released, V2 now available

  • Benito

    I love it! it's very cool!

    but…………. With a fresh install of ubuntu 12.04, I needed install xserver-xorg-core, subversion and automake tools before execute X11rdp-O-Matic… after that all works perfect… I think that would be ok if this appears in the instructions

    itÅ› very useful, thanks a lot for this tool :)

    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Benito hi Really? I'm pretty sure I didn't have to do that when I tested it on 12.04 – hmm time to do a fresh 12.04 again methinks :) Thanks for the heads-up *runs to the VM server*

      EDIT : Okay so I installed a fresh Ubuntu 12.04 Desktop edition and ran the utilities again.

      Didn't have to manually install any other packages – in fact the utility auto installs subversion and automake (as well as others) after it starts, so, I have no idea what went on in your system :)

      I did notice a small error in my RDPsesconfig script, which I'll issue a fix for tomorrow – was up late last night preparing the launch and only got 4.5 hours sleep ;)

      Regards!

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

         
        I found the problem… is in the system language. 
        If I make a fresh install of ubuntu in english, the tool works perfect! but, If I make the install in Spanish language, the tool doesn´t work…. throw many errors an do nothing

        I can´t understand why not run with the system language in spanish but the problem is there xD

        VN:F [1.9.22_1171]
        Rating: 0 (from 0 votes)
        • Benito – thanks for the feedback!

          That is quite strange – the language setting of the Ubuntu installation shouldn’t affect the script, as the commands used in the bash script will be the same in every language. (There’s no Spanish command equivalent of “apt-get”, is there?)

          Very strange!

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

    Noob question here.  I'm running your pre-built script here and everything is going well so far on Ubuntu 12.4 LTS.  I was having the same problem others have mentioned after installing xrdp and adding the gnome-session –session=ubuntu-2d to .xsession  and /etc/xrdp/startwm.sh, my remote connection attempts would login, display the desktop briefly, then automatically cshutdown my remote session.  The same steps work on my physical machine flawlessly, yet in VirtualBox it shuts down my remote session.  My question is why do we have to do this?  If X11rdp fixes alot of issues xrdp has, why isn't someone making a pre-compiled installer package to publish to the repositories that we can just select and install?  This is one thing I don't get about Linux developers. Developers should be developing the app, not the users.
    Now creating this script process is a step in the right direction, just need to take it one step further and create a package for it.  Am I mising something, haha!
     
    Thanks
    Noob
     

    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)
    • Have a thumbs-up for a great question :)

      I think you're confusing two different things here.

      X11rdp is a back end X server in its own right – think of it as something which paints the graphics onto a virtual screen which is in memory and is not sent directly to your graphics card.

      xrdp, on the other hand, can be thought of as the bridge between that back end X server (X11rdp) and your physical display. When you use your RDP client (rdesktop on linux for example, or Remote Desktop client on Windows) , those clients talk to xrdp via the Remote Desktop Protocol (hence RDP). xrdp then communicates with the back end X11rdp X server, which sends its virtual graphics display to your RDP client, via the xrdp bridge.

      The reason the back end X11rdp X server is not conveniently packaged up in a nice .deb, is because at the moment, it has been written in a way that makes it virtually impossible to do so. It's currently written and attached limpet-like to an older version of the Xorg tree, and it's a lot of work re-writing it to extricate it from that old tree and in such a way that it's an independent module which can be easilly linked to the current Xorg tree.

      That's my current understanding of it anyway, and that's why I try to write easy to follow tutorials on how to get X11rdp up and running as the back-end.

      Notice if you install xrdp from the package manager, it also installs vnc? VNC is doing the job as the back end virtual display renderer, the output of which gets sent to your RDP client at the other end of the connection, via xrdp, as described above. The distros use VNC precisely because X11rdp is currently such a pain/practically impossible to package at the moment. But VNC is less efficient to use than the X11rdp X server because of the way it "draws" its display – that's why I try to encourage use of X11rdp and write tutorials on it.

      Also, the reason why I compile xrdp as well, is becuase to date, the distros are still using a slightly outdated version of xrdp which won't talk to the latest versions of Remote Desktop Client for Windows – if and when a more up to date xrdp is included as a package, that step will become unnecessary.

      Did you use the RDPsesman utility? That sets up your .xsession file for you ;)

      Hopefully one of these days all my articles, tutorials and scripts related to X11rdp will become obsolete, whenever X11rdp finally becomes an independent module in its own right.

      Hope that answers your questions :)

      Regards.

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

        Thanks.  don't get me wrong i really appreciate the scripts and the work you did.  just finished your scripted compile and RDPsesconfig and everything is working A-OK now.  Kudos.
        I understood xrdp was just an interface for Windows RDP to talk to VNC, in my layman's terms, but your explanation about the x11 backend situation was helpful.
        I know RDP is less secure than other SSH tunnel methods, but xrdp was so easy to setup before Unity came around.  Obviously I come from the Windows world and you're probably either crying or fell out of your chair laughing already, but I would like to see Ubuntu or Redhat make some headway and it's things like these "Compile it yourself" apps that turn alot of would-be users away.
        Thanks for the explanation and the installer.
        Noob

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

          Red Hat and Ubuntu/Debian et all actually make their packages from the up-stream source provided by the authors of the code, so, until the X11rdp author gets around to re-writing his X11rdp code so as to be able to compile against current Xorg source trees, then there’s not much the package maintainers can do.

          You’ve spurred me to take a peek at the X11rdp/xrdp devel mailing lists to see what’s currently going on, by the way :)

          Regards!

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

    thanks, but that is the "pre-built script" I mentioned that I am running.  The question is why do we have to do the work manually or by this script if it can just be built as a package like xrdp that we can apt-get install from the repositories?
    Sometimes it's fun as a noob to learn to compile a program, but users just want the app to work, not do the work themselves (or waiting for a 30 min compile to complete every time) and not everyone is a geek who has an interest in learning how to build an app.  for developers I agree this kind of flexibility is nice, for the typical user like myself, building my own app doesn't make sense.
    I'm just wondering as a noob, if there is reason why we have to build x11rdp ourselves. 
     
    Thanks
    Noob
     
     
     
     

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Your post there got caught up in the spam cue for some reason… I think my reply above answers your questions :)

      Regards.

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

    At the stage where the script pauses and reads.
    "X11rdp and xrdp are now compiled and installed on your system.
    I have also performed the following;
     o Configured the xrdp startup script…
     o Configured the /etc/xrdp/xrdp.ini file so that X11rdp is the default session.
     o Created a symbolic link from /etc/X11/Xsession to /etc/xrdp/startwm.sh
    After you click OK, I will start the xrdp service.
    Click OK to proceed to the final steps…"
     
    can you somehow resize that window or make it adjustable?  in a virtual machine on a widescreen monitor at it's maximum resolution 1440 X 836, the OK button is below the bottom of the screen.  the Window is adjustable width-wise, just not vertically.  Any way that can be adjusted?  Thanks
     
    Noob
     
     

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

      also have a different Virtual machine with Ubuntu 12.04 desktop and ran the X11RDP-O-matic and the script all ran fine along with RDPsesconfig, however,  when logging in using Windows RDP, the X11RDP option is preselected, yet it does a similar thing my pther VM was doing using XRDP.  it logs in, says it connected, then hangs a second, then closes the session, but never gets so far as to load the desktop and launcher the way XRDP was doing.
      the connection log reads
      "Connecting to sesman ip 127.0.0.1 port 3350
      sesman connectok
      sending login info to sesion manager, please wait…
      xrdp_mmprocess_login_response: login successful for displa(rest is cut off)
      started connecting
      connecting…
      Connected ok"
      Then it just hangs and closes the session
       
      However, if I select the sesman-xvnc option and login,  it works.
       
      it's almost backwards from how my other VM is working.  Strange.
       
       
       
       
       
       

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

    I tried posting this on the post with the automated scripts but I keep getting an error "Sorry but you are looking for something that isn't here" when I hit the Post Comment button.
     
     
    I'm having problems getting the Policykit to work.  I did a fresh install of Ubuntu 12.04 i386 Desktop, all the updates ran the two scripts and said yes to installing the policy kit but none of the local users when I rdp to the machine can make system changes.  I know next to nothing about Policykit so even sure what logs to be looking in.
    Any help would be greatly appreciated.

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

      I moved your comment to the correct article – I have no idea why you had problems posting there, I'll check the site later for problems – others seem to have had no problems posting here though.

      As to your PolicyKit woes – hrm – I did check this against a fresh installation of Ubuntu 12.04 i386 Desktop and it did work fine, BUT, I'll check it again and get back to you.

      Regards

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

    Hi Kevin,
    sorry to write here, this post is meant to be under "The Scarygliders X11rdp-O-Matic and RDPsesconfig : hotness upon hotness!" but everytime I try to submit it I receive a failure message :)
     
    Anyway: great script, IT WORKS! And it makes life a lot easier! :)
    Hoping to help improving, I have 2 comments: first, in my opinion could be usefull to add a questions about removing/keeping the source code download – I found it under /root, unware of its presence. Second, after installing xrdp and x11rdp by the script I started having boot problems: some network-related services like Apache2, sshd and ntpd are no more startung automatically at boot. As I'm not an init.d expert I can't debug this, also I'm not 100% sure it depends by your custom xrdp boot script – just correlating.
    I'm using a Debian squeeze 6.0.5.
     
    Bye, keep on with this great work!
    Fabio

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Fabio, thanks! Glad the utility worked out for you :)

      I moved your comment to the intended article post – problem seems to have been caused by a recent plugin I installed – comments should be working okay now.

      As for your services not starting, the script only touches xrdp and has nothing to do with any other services, so your problems will lie elsewhere.

      Regards!

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

    I just installed on Xubuntu 12.04 and it works nice, even over our crappy wifi. 
    The only issue I have so far is that I am using it in a corporate environment so I need to add a disclaimer to the login screen.  Normally I have zenity display it prior to GDM starting so people have to click on it before they login, just like they have to do in Windows .  I added the zenity line to .xsession and it will display the disclaimer after sesman logs in and prior to the desktop starting, but a savvy user can edit the .xsession file and remove this compliance piece.  How can I display the legal disclaimer were a user cannot easily remove it?
    Also, can sesman be edited to not show the module drop down list, or edit the list to remove some options?  I know some user will change it and then not be able to login and call the help desk.
    Thanks for sharing your work in figuring all this out!

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

      You should read an earlier article, http://scarygliders.net/2011/11/17/x11rdp-ubuntu-11-10-gnome-3-xrdp-customization-new-hotness/ , where it tells you how to customize the xrdp login screen bitmap. The scripts are all based on the procedures written there.

      I think in your case making a bitmap image with the disclaimer on it would be a great idea – you could even put the company logo on there.

      As you'll also see in that article, you can indeed customize sesman to only include the entries you need.

      I am planning to completely update the RDPsesconfig utility to include complete customization of the xrdp login screen and also to take Active Directory logins into account.

       

      Corporate environment, eh? Perhaps they'd like to make a nice big donation to help further development? *cheezy grin* ;)

      Let me know how you get on!

      Regards

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

    Kevin,
    I ran your script as su and sudo, but it doesn't want to work.
    It's a pretty fresh install of 12.04 with LibreOffice and Games removed, but otherwise full patched.
    When I get to the compilation stage (with the OK button off screen ;) it goes straight to the last screen.
    In the terminal I have this:
    E: There are problems and -y was used without –force-yes
    ./X11rdp-o-matic.sh: line 193: svn: command not found
    ./X11rdp-o-matic.sh: line 209: git: command not found
    ./X11rdp-o-matic.sh: line 234: cd: /root/x11rdp_xorg71: No such file or directory
    sh: 0: Can't open buildx.sh
    ./X11rdp-o-matic.sh: line 274: cd: /root/xrdp.git: No such file or directory
    ./X11rdp-o-matic.sh: line 275: git: command not found
    ./X11rdp-o-matic.sh: line 276: ./bootstrap: No such file or directory
    ./X11rdp-o-matic.sh: line 277: ./configure: No such file or directory
    make: *** No targets specified and no makefile found. Stop.
    make: *** No rule to make target `install'. Stop.
    Any ideas?
     

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • It looks like for some reason, the required packages (git, subversion, and probably everything else) could not be installed on your system. Looks like it was requiring the "–force-yes" option, which is probably bad, because something's not right with your system in that apt-get is unable to perform package installation without forcing something or some other intervention by the sysadmin (i.e. You ;)  ).

      The required packages needed for installation are: build-essential subversion automake1.7 automake1.9 git libssl-dev libpam0g-dev zlib1g-dev libtool libx11-dev libxfixes-dev pkg-config, and the script starts off by attempting to install them before continuing on to download and compile X11rdp and xrdp.

      As an experiment, try sudo apt-get -y install git in a terminal window on your system, and see what the output says. If it does anything other than downloads and installs the package, then something is amiss. Good luck ;)

      Regards

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

        So, I reinstalled Ubuntu, fully patched it and then ran your script, which seems to be doing more than before.
        However, the compile doesn't finish as the machine performs a hard reset every time
        I have tried other solutions that work, e.g. NX but they them seem to give me limited permissions compared to console access. Would you mind telling me what you changed in PolKit? If I understood correctly that is the exact issue you are patching in your setup scrip?
        Cheers,
        Tim

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

          However, the compile doesn't finish as the machine performs a hard reset every time

          Uh oh – looks like there's something wrong with your hardware? Your machine should not crash whilst compiling – if it is, then it's either overheating, or there's a problem with memory, or some other hardware problem. Try running memtest on your machine, check your CPU is being properly cooled, etc etc…

          The PolicyKit changes I am making for v2 are quite radical. For v1 I took a "bludgeon" approach in that rdp users can have permission to do stuff like even rebooting the system from the RDP session – which is a big no-no! v2 will include the facility to fine tune what permissions rdp users will have in their sessions. I have learned a lot of lessons from writing the 1st version, including really getting to know how PolicyKit works, and that will be refelected in version 2.

          Regards

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

    Kevin,
    I did a clean install of Ubuntu 12.04 and ran your script and it worked first time.  The compile took about a minute and after that I was running from my Win 7 desktop.  Thanks for your efforts in this.
    Regards

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

    Hi Kevin,
    The script appeared to run without errors but I can't login.  I am trying this on 12.04 64bits.
    When I connect from a windows machine, I get the initial login window with "sesman-X11rdp" as the module. I fill in my login details and click okay.  The login progresses and I see "connection okay" on the screen but few seconds later the connection is lost.  I see this in the log files:
    [20120614-14:27:03] [INFO ] scp thread on sck 7 started successfully
    [20120614-14:27:03] [INFO ] ++ created session (access granted): username shahim, ip 192.168.200.120:1572 – socket: 7
    [20120614-14:27:03] [INFO ] starting X11rdp session…
    [20120614-14:27:03] [CORE ] error starting X server – user shahim – pid 4478
    [20120614-14:27:03] [DEBUG] errno: 2, description: No such file or directory
    [20120614-14:27:04] [DEBUG] execve parameter list: 11
    [20120614-14:27:04] [DEBUG]         argv[0] = X11rdp
    [20120614-14:27:04] [DEBUG]         argv[1] = :10
    [20120614-14:27:04] [DEBUG]         argv[2] = -geometry
    [20120614-14:27:04] [DEBUG]         argv[3] = 1024×768
    [20120614-14:27:04] [DEBUG]         argv[4] = -depth
    [20120614-14:27:04] [DEBUG]         argv[5] = 24
    [20120614-14:27:04] [DEBUG]         argv[6] = -bs
    [20120614-14:27:04] [DEBUG]         argv[7] = -ac
    [20120614-14:27:04] [DEBUG]         argv[8] = -nolisten
    [20120614-14:27:04] [DEBUG]         argv[9] = tcp
    [20120614-14:27:04] [DEBUG]         argv[10] = (null)
    [20120614-14:27:13] [ERROR] X server for display 10 startup timeout
    [20120614-14:27:13] [ERROR] X server for display 10 startup timeout
    [20120614-14:27:14] [INFO ] starting xrdp-sessvc – xpid=4478 – wmpid=4477
    [20120614-14:27:14] [ERROR] another Xserver is already active on display 10
    [20120614-14:27:14] [DEBUG] aborting connection…
    [20120614-14:27:15] [INFO ] ++ terminated session:  username shahim, display :10.0, session_pid 4476, ip 192.168.200.120:1572 – socket: 7
    Any idea what is going on?
    Shahim

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Which desktop session did you configure for your login, using RDPsesconfig?

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

        I used Unity 2D but I also tried xfce4 now and still the same error.
        A related question. Will this setup allow me to reconnect to a "real" x session that is started at the physical machine? I am interested in having the same functionality as Windows RDP where there is a single user session that can be used remotely or at the physical machine.

        VA:F [1.9.22_1171]
        Rating: -1 (from 1 vote)
        • For your configured xfce4 session, have a look at the file .xsession in your user’s home directory.

          If it says “xfce4-session” , try changing that to “startxfce4” instead, and let me know how you get on.

          To answer your related question, No – Windows and Linux RDP work in a different way. The workaround is to start an RDP session on the local machine (which will be the target machine) (e.g. rdesktop -a24 -g 1024×768 localhost) , then do any work in that session. When you:re ready to go home or somewhere else away from that machine, just close the rdesktop window – don’t log out of it – and then reconnect remotely using the same colour depth (-a24) and resolution (-g 1024×768) , and you’ll get reconnected to that already running session.

          Regards

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

            Thanks for your help Kevin. I tried your suggestion but it still gave the same error. I'll try to read the documentation for these tools when I have a chance and try again.
            In the mean time, how do I clean up what the installation did? I noticed that /var/run is now a soft link to /run and /run is owned by xrdp. How come the /var/run directory is moved to /run and owned by xrdp? What other changes should I look for?
            Also, there were few times when I was starting xrdp and it complained that it couldn't start. I had to manually create /var/run/xrdp for it to start but this directory kept disapearing on restart. It is not doing this anymore. Maybe these issues are related to my other problem.
            Thanks,
            Shahim

            VA:F [1.9.22_1171]
            Rating: 0 (from 0 votes)
            • Shahim hi again

              In the mean time, how do I clean up what the installation did? I noticed that /var/run is now a soft link to /run and /run is owned by xrdp. How come the /var/run directory is moved to /run and owned by xrdp? What other changes should I look for?

              See here and here for the /var/run thing – it's normal and nothing at all to do with the utility :)

              /run being owned by xrdp is merely because xrdp started up and has created a pid file inside the directory. I don't expect the ownership to cause any harm to the system, as it's root which writes temporary files in there anyway.

              If you've read the links I gave above, /run is a tmpfs file so at every reboot, any contents in /run are wiped and created again when the system boots up.

              I'm running the utility on a fresh install of Ubuntu 12.04 LTS as I type this. I'll give an update on what I find, later. Depending on what I find, I will do a point release (v1.1) bugfix. I'm also working on v2 at the moment, which will hopefully be released next week.

              Regards

              EDIT: Okay so I ran v1 in the fresh Ubuntu 12.04 install. xrdp and X11rdp work fine. Using RDPsesconfig I configured a Xfce environment – that also ran fine. I have no idea why this is not working for you. However, I'm now going to release a v1.1 with some minor corrections and alterations – see the Changelog when it's released. v2 is already MUCH better than v1 anyway, so, perhaps give that a try.

              Oh and to undo all the things v1 has done I'll be including a small script with v1.1 which will do this for you. Stay tuned…

              FURTHER EDIT: v1.1 is almost ready and I have looked into the "/run being owned by xrdp" thing you pointed out. It's because the upstream source code for xrdp has the files xrdp.pid and xrdp.sesman being created in /var/run (which is now a symlink to /run). The solution is to alter the source code such that xrdp now creates those two .pid files within /var/run/xrdp – which is what the Debian package maintainer seems to do when they're packaging xrdp from upstream to a .deb . v1.1 of my utility now makes this change after downloading the source. v2 will of course also do this, but in the meantime I'll release v1.1 later today.

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

    Does this installation support multiple concurrent resumable sessions?  If so, that would be great.
    FWIW, I installed on a clean 12.04 LTS (i386) desktop and everything went fine.  Was able to connect from a win7 machine.
    Thanks!
     

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • If you mean multiple sessions from different usernames then yes. :)

      If you mean from the same user, then, actually, yes, if you use a slightly different Width and Height parameter for each session you want up under your username ;)

      Regards

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
    • By the way, did you use v1.x or the recently released v2.x on a new post which this article links to ?

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

    I used the new version 2.x.
    Yes, I meant multiple simultaneous sessions from different user login IDs.
     

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

    I can't get the 2.1 or 2.2 script to install for some reason in Ubuntu 10.04.  The text front end took many hours to compile things but no binaries were created.  When I run it with the zenity frontend I can see these errors now and it takes 30 seconds to say it finished, but still no binaries are made.

    E: Package git has no installation candidate
    svn: Can't connect to host 'server1.xrdp.org': Connection timed out
    remote: Counting objects: 7165, done.
    remote: Compressing objects: 100% (1835/1835), done.
    remote: Total 7165 (delta 5455), reused 6993 (delta 5290)
    Receiving objects: 100% (7165/7165), 2.97 MiB | 2.31 MiB/s, done.
    Resolving deltas: 100% (5455/5455), done.
    Note: checking out '4cd0c118c273730043cc77b749537dedc7051571'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

      git checkout -b new_branch_name

    HEAD is now at 4cd0c11… xorg build
    ./X11rdp-o-matic.sh: line 419: compile_X11rdp_interactive: command not found
    ./X11rdp-o-matic.sh: line 420: compile_xrdp_interactive: command not found
    ln: creating symbolic link `/usr/bin/X11rdp': File exists
    mv: cannot stat `/etc/xrdp/rsakeys.ini': No such file or directory
    chmod: cannot access `/usr/share/doc/xrdp/rsakeys.ini': No such file or directory
    chown: invalid user: `xrdp:xrdp'
    mv: cannot stat `/etc/xrdp/startwm.sh': No such file or directory
    ln: creating symbolic link `/etc/xrdp/startwm.sh': No such file or directory
    tee: /etc/xrdp/xrdp.ini: No such file or directory

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • EDIT: Just for you, I've updated the utility to version 2.3 , which now fully supports Ubuntu 10.04 ;)

      http://scarygliders.net/2012/06/20/x11rdp-o-matic-and-rdpsesconfig-version-2/

      You're welcome.

       

      ————————————————————————————————————

      ORIGINAL POST :

      Ubuntu 10.04 is not in the list of supported distros. Which you would see by looking at the file "SupportedDistros.txt" which is in the Scarymatic directory.

      Ubuntu 10.04 is now a deprecated version anyway, having been replaced by 12.04 LTS.

      However, I'll install 10.04 in a VM and see what happens when I try to use v2.2 of my utilities which can be obtained from this post – this is the old v1.1 post your saying this on.

      Regards

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

    Hi, thanks for the great utility but I see to have the same problem reported by Shahim:
    Linux zerolab 3.2.0-27-generic #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    cat /var/log/xrdp-sesman.log
    [20120808-18:22:29] [CORE ] starting sesman with pid 2247
    [20120808-18:22:30] [INFO ] listening…
    [20120808-18:22:35] [INFO ] shutting down sesman 1
    [20120808-18:25:42] [WARN ] [init:45] libscp initialized
    [20120808-18:25:42] [CORE ] starting sesman with pid 9991
    [20120808-18:25:42] [INFO ] listening…
    [20120808-18:27:57] [INFO ] scp thread on sck 7 started successfully
    [20120808-18:27:58] [INFO ] ++ created session (access granted): username zerolab, ip 10.0.0.7:51938 – socket: 7
    [20120808-18:27:58] [INFO ] starting X11rdp session…
    [20120808-18:27:58] [CORE ] error starting X server – user zerolab – pid 10354
    [20120808-18:27:58] [DEBUG] errno: 2, description: No such file or directory
    [20120808-18:27:58] [DEBUG] execve parameter list: 11
    [20120808-18:27:58] [DEBUG]         argv[0] = X11rdp
    [20120808-18:27:58] [DEBUG]         argv[1] = :10
    [20120808-18:27:58] [DEBUG]         argv[2] = -geometry
    [20120808-18:27:58] [DEBUG]         argv[3] = 1600×900
    [20120808-18:27:58] [DEBUG]         argv[4] = -depth
    [20120808-18:27:58] [DEBUG]         argv[5] = 24
    [20120808-18:27:58] [DEBUG]         argv[6] = -bs
    [20120808-18:27:58] [DEBUG]         argv[7] = -ac
    [20120808-18:27:58] [DEBUG]         argv[8] = -nolisten
    [20120808-18:27:58] [DEBUG]         argv[9] = tcp
    [20120808-18:27:58] [DEBUG]         argv[10] = (null)
    [20120808-18:28:08] [ERROR] X server for display 10 startup timeout
    [20120808-18:28:08] [INFO ] starting xrdp-sessvc – xpid=10354 – wmpid=10353
    [20120808-18:28:08] [ERROR] X server for display 10 startup timeout
    [20120808-18:28:08] [ERROR] another Xserver is already active on display 10
    [20120808-18:28:08] [DEBUG] aborting connection…
    [20120808-18:28:08] [INFO ] ++ terminated session:  username zerolab, display :10.0, session_pid 10352, ip 10.0.0.7:51938 – socket: 7

    root@zerolab:/home/zerolab# cat .xsession
    startxfce4
     

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

    Just installed on Lubuntu 12.10 (32-bit) and so far it seems to work exactly as advertised. Incidentally, I ran the install remotely over an SSH connection using wget to download your archive and then unpacked it from my remote machine over an SFTP connection.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • George N. White III

    Your ScaryMatic scripts "work for me" at home on two Lubuntu 12.10 VM's, once for a VM hosted on Windows 7 running un the VMware Player, and once for a VM hosted on OSX running under VMware Fusion and using the host RDP clients.  
     
     

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • drversluis@gmail.com

    Hi,, wonderful work, 2.5 works like a charm on mint 13. Only problem is that on the remote session I get English instead of Dutch (local Dutch). Where do I need to change a little bit? thanks. by the way sound works awesome with your post elsewhere.

    Richard

     

     

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

      Try logging out of your RDP session, and place the following lines at the top of your .xsession file…

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

      …followed by the configured session start command.

      Please let me know if this works – if so i'll incorporate it into RDP sesconfig on the next release.

      Best regards

      Kevin.

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  • I just installed this on 12.10 far from out of the box. But it seemed to work without any hiccups used the “Just do it” switch. This is alot of code so thank you very much. Took like 20 mins to run the install script. Will report any issues.

    Also went with KDE so that took about 8 min to download.

    QUESTION:
    Can i change the desktop by running the RDPSession Script over agian?

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • So im running into a similar issues that I was getting when I tried to install this by meself.

    So I get a box that opens to just a black screen when I login from win7 but if I VNC to the box and then “rdesktop localhost” it works. so im guessing it is something to do with the client.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • Issue seemed to be that I was passing domain unintentionally.

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

    worked fine on Xubuntu 13.04.
    thanks

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

    2 weeks on Lubuntu 13:04 LTS (see below) using an old Dell Optiplex GX260. Long but trouble free installation. Desktop setup was fast. No problems yet.

    -Version-
    Kernel : Linux 3.8.0-31-generic (i686)
    Compiled : #46-Ubuntu SMP Tue Sep 10 19:56:49 UTC 2013
    C Library : Unknown
    Default C Compiler : GNU C Compiler version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
    Distribution : Ubuntu 13.04
    -Current Session-
    Computer Name : GX260
    User Name : ladmin (ladmin)
    Home Directory : /home/ladmin
    Desktop Environment : LXDE (Lubuntu)
    -Misc-
    Uptime : 1 day, 17 hours and 52 minutes
    Load Average : 0.45, 1.01, 1.76

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  • […] The Scarygliders X11rdp-O-Matic and RDPsesconfig : hotness upon hotness! […]

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.