Article in progress
There are a number of options provided by xrdp that are useful in most virtualized desktop environments, here we will describe how we setup them.
First of all, we need to get the basic system up & running. This consists basically in your flavor of Linux installed according to your needs.
This, of course, includes selecting what window manager you will provide, what applications you will need, the security of the system (what users will have permissions to reboot computer for example), etc...
In this point, we recommend you to include in your "golden" linux machine some light window manager, such as xfce4, openbox, etc. Why?, well, your system will be provided to lots of users, some new and more "beautiful" windows managers. But those generally require many more resources than simples ones. They also tend to make more complex updates of the screen, increasing also the bandwidth consumed (in our experience, several times).
So here goes our firsts advices:
Once your system is up & running, we must install xrdp package. This will provide us with an X Windows running through an rdp session.
We will have here two options:
Note: XRDP does not come, for example, with support for Spanish keyboard. The file for supporting it is
After installing xrdp, we will need to setup the window manager that will be used by xrdp sessions.
For example, to install gnome-fallback (for unbutu 12.x), we will do:
sudo apt-get install gnome-session-fallback
We have two options here:
For example, default unity window manager doesn't work for us (on ubuntu 14 even gnome fallback does not work correctly), we will select xfce in this tutorial, that is fast & light.
First of all, we must ensure that we have xfce installed, if not, do it now before proceding further.
sudo apt-get install xfce
Now, we will create firt a backup of /etc/xrdp/startwm.sh for security pourposes:
sudo cp /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.backup
Next step is setup startwm.sh to start our windowmanager:
1 2 3 4 5 6 7 8 | #!/bin/sh if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi /usr/bin/xfce4-session |
Note: Maybe startwm.sh is a symlink in your platform, if so, move this symlink to a backup and create a new startwm.sh. If doing this, keep in mind execution permissions of the script.
The important part is that we forced xrdp to launch start xfce instead of any other window manager. This will be fixed for all users, no matter what session manager is configured, that is exactly what we are looking for in order to use this machine as a template for UDS.
For alternatives windows managers, you can change startxfce4 with one of the following, depending on the window manager you will want to start (remember to install first the window manager)
If you found that session is not closing (rdp keeps open) after logout, this could be because your are not using the correct command to start the window manager. Xrdp expects that startwm.sh keeps running until session is closed, so be carefull with this and test your whole xrdp server before accepting it as UDS template for a virtual desktop.
This method is straight forward if your platforn uses "Xsession" as startwm.sh. this can be in handy for you. This method is also less "error prone".
Simply create a file called .xsession in the home folder of the user that is going to login using xrdp, and include in it the session manager you will like, like this:
/home/user/.xsession:
xfce4-session
or
/home/user/.xsession
openbox-session
At this point, if you need spanish keyboard support, is where the file
Note here: If you want to FORCE spanish keyboard even if client requests english keyboard, yo must overwrite the file /etc/xrdp/km-0409.ini with the
To do this, first of all, make a backup of /etc/xrdp/xrdp.ini, and use the following code (as base, yo can get it here:
[globals] bitmap_cache=yes bitmap_compression=yes port=3389 crypt_level=low channel_code=1 max_bpp=24 [xrdp1] name=UDS lib=libvnc.so username=ask password=ask ip=127.0.0.1 port=-1 delay_ms=2000
Simple change the line username=ask for username=[my forced username] in previous example
First issue we will find is that every time we reconnect to remote session, xrdp gives us just a "clean session", and this is not desirable.
There seems to be a problem sometime withc vnc server and first connection attempt. To fix it, edit the xdrp config file and add a line to the xvnc-sesman sessiont as this:
delay_ms=2000
Always remember, maybe some windows managers will not work correctly for you, xfce is a good solution, and we strongly recommends it right now to avoid issues.
On ubuntu 14.04, we are not getting the session corretctly closed on logout. If we restart xrdp after boot from a console, the session starts to close correctly, but not before. We are working on this to try to find some fix. Follow this alternative method instead on this version: X11Rdp
Powered by django-wiki, an open source application under the GPLv3 license. Let knowledge be the cure.
This article was last modified: June 28, 2016, 9:55 a.m.