NOTE: I am no longer actively spending days/hours of my time to maintain this script – there are too many different variations of Linux Distributions and they come out so frequently and always include changes in the way they do things, that it became utterly impractical for me to try to test o-Matic for every possible “gotcha” in every new and wonderful distribution. Systemd is another reason why I simply cannot spend any more time on o-Matic. It broke an awful lot of things when Debian decided to include it in their distributions, and I refuse to spend any more time dealing with this malware. If anyone wants to, they can feel free to submit pull requests to the o-Matic repository at Github, and if I have time I will review the changes and merge them with the main o-Matic branch.
Latest Version : v3.10 , released March 19th 2014
Latest Version Release Announcement : http://scarygliders.net/2014/03/19/x11rdp-o-matic-version-3-10-released/
After you get XRDP up and running, configure it with XRDPConfigurator – my new and open source GUI application for XRDP!
Details on this site, click here!
What is X11RDP-o-Matic?
- A suite of 2 tools.
- Written in Bash.
- Currently works and designed for Debian-based distributions only.
- X11RDP-o-Matic.sh – a build tool.
- RDPsesconfig.sh – a session configuration tool.
- Fully automated build tool.
- Uses Debian’s Apt system to download all packages required to compile X11rdp and xrdp.
- Automatically downloads the source code for X11rdp and xrdp.
- Produces Debian packages of X11rdp and xrdp on successful compilation.
- X11rdp-o-matic.sh has a number of options configured by way of command line switches…
--help: show a help page.
Also shows the available branches from the xrdp git repository.
--justdoit: perform a complete compile and install with sane defaults and no user interaction. <– Recommended use.
--branch <branch>: use one of the available xrdp branches
--branch v0.8– use the 0.8 stable branch. Any branch with “v” at the beginning is a stable, non-changing branch.
--branch master– use the master branch. <– Default if no
--branch devel– use the devel branch (Bleeding Edge – may not work properly!)
--nocpuoptimize: do not change X11rdp build script to utilize more than 1 of your CPU cores.
--cleanup: remove X11rdp / xrdp source code after installation. (Default is to keep this source).
--noinstall: do not install anything, just build the packages
--nox11rdp: only build xrdp, without the x11rdp backend
--withjpeg: include jpeg module
--withsound: include building of the simple pulseaudio interface
--withdebug: build with debug enabled
--withneutrino: build the neutrinordp module
--withkerberos: build support for kerberos
--withxrdpvr: build the xrdpvr module
--withnopam: don’t include PAM support
--withpamuserpass: build with pam userpass support
--withfreerdp: build the freerdp1 module
X11rdp-o-matic.sh has two modes of operation
- The default mode.
- Requires user input at run-time.
- Walks the user through the build process.
- Use the
--justdoitoption to activate non-interactive mode.
- Will use sensible default values.
- Automatically detect the number of CPU cores on system and utilises them.
I recommend you use the
--justdoitoption – if there are any errors then you will be able to scroll up your terminal and see where it happened.
The default repository used is https://github.com/neutrinolabs/xrdp master. This is now the official xrdp repository as used by Jay Sorg, the author of xrdp.
As mentioned above, use the
--branch switch to specify an alternate and desired version of xrdp/X11rdp.
- An interactive utility.
- Configures the .xsession file for each selected user on your system and with whatever desktop environment you’ve chosen for them.
The utilities need to be run as root.
Both utilities need to be run as root, so use
su to get to your root prompt, or use
sudo to start them.
sudo ./X11RDP-o-Matic.sh --justdoit
- Your build system having unrestricted access to the internet.
- The build system must be running a Debian-based distro.
- The build system’s access to the Debian-based package system (via apt/dpkg/apt-get)
- The build system’s repository settings are configured to access the repositories via the internet. (Or all the necessary packages available via the CD/DVD’s)
If any of the above are not met, then o-matic – and the subsequent X11rdp build process – will fail.
How X11rdp-o-Matic works
- Makes sure your system has all the necessary development and required packages installed on your system
- Checks out the selected branch of the xrdp/X11rdp source code from github
- Patches the source Makefiles for better compatibility with /var/run
- Patches the source Makefiles to utilise more than 1 CPU core if desired, for faster compilation
- Builds the X11rdp back-end X Server (or not, if the
--nox11rdpswitch is given)
- Uses the xrdp source-supplied buildx.sh script
- That script downloads about 102 Xorg source code tarballs and compiles each one
- Turns the resultant compiled binaries and files into a Debian package
- Installs the Debian package onto your system (or not, if the
--noinstallswitch was given)
- Builds the xrdp front-end server
- Turns the resultant compiled binaried and files into a Debian package
- Installs that package (or not if
--noinstallswitch was given)
After successful completion of X11RDP-o-Matic , two package files will be created…
Located in ~/X11RDP-o-Matic/packages/xrdp/ . This is the xrdp package, and includes everything required to install the xrdp front-end, including the /etc/init.d script.
Located in ~/X11RDP-o-Matic/packages/Xorg/ . This is the X11rdp package, and contains the X11rdp back-end Xorg server.
<arch> will of course depend on what arch your Debian-based distribution is.
<version> will depend on which branch you choose to use.
You can take those two package files, and install them on another machine of the same arch. If you need packages for a different arch, then run the o-matic tool on a machine with a similar arch, and you can then deploy the packages on similar arch systems.
NOTE: If you install the packages on a different machine, please run sudo update-rc.d xrdp defaults , after installation. The generated packages do not update your init scripts after installation as yet. Running this command ensures that xrdp will restart upon rebooting your server.
sudo ./X11rdp-o-matic.sh --justdoit: will run the X11rdp/xrdp build and install tool right through, and will automatically utilize additional cpu cores for quicker compilation. Debian packages will be created, and installed, and by the end of it, xrdp will be started.
sudo ./RDPsesconfig.sh: will run the session configuration utility. You will select a desktop environment that the users will see after they log in via their RDP client. You will then select which user logins to configure that environment for.
How to get X11RDP-o-Matic
- Use git.
- If you haven’t got git installed on your machine, then bring a terminal window up and type
sudo apt-get install git.
Once you know that git is installed, to get X11rdp-o-matic, use…
git clone https://github.com/scarygliders/X11RDP-o-Matic.git
Then use the examples above to run the utility.
The DEVEL branch
You can try your pot luck with the devel branch of o-matic – this is where I place any enhancements before the official release. You should read the commit log on github before using, to get an idea of what’s being done to the devel branch, before using it. Most of the time, I push commits to devel when the changes I make to o-matic work as intended. Sometimes, I’ll push small, non-working commits, or I’ll push commits where I’ve forgotten to add a function terminator or something equally silly. It should really be called the devil branch ;)
To try out the devel branch, use;
git clone -b devel https://github.com/scarygliders/X11RDP-o-Matic.git
Lastly, I recommend you reboot your system after getting everything configured.