Note : this tutorial is getting really old now and Distributions have moved on a lot since Ubuntu 11.10!
Use X11RDP-o-Matic instead.
This is a followup to my original article, “Install xrdp and X11rdp – the comprehensive HOWTO for Ubuntu and Debian based systems“. In that article I used the tarball – and hence old – version of x11rdp, because at the time of writing the article, I thought the SVN – hence more up to date – version did not work.
It does in fact work, if you use the more up to date version from the SVN repository, AND you use the newer xrdp server from the Git repository. Thanks to a reader named Daniel for pointing this out.
So now you have a choice, the Old and Busted method from earlier, or the New Hotness I outline below ;)
The info here is also updated so that users of Ubuntu 11.10 (and possibly later, time will tell) can configure RDP to work properly.
The Bonus here is I’ll also add in handy tips on how to customize X11rdp so that it’ll have the rdp session as default when you connect to it, plus how to customize the logo you see when you connect! Hurrah!
2012-05-23 : Update – Instead of doing all this yourself, why not let my new utility do all the hard work for you?
2012-04-07 : Update – How to forward audio from your RDP sessions to your local client :D
2012-03-22 : Update.
Changelog;
- A recent update to the xrdp code in the git repository prevented the tutorial working – added extra step to xrdp compilation stage (Thanks go to read Daniel!)
2011-12-02 : Article updated.
Changelog:
- 1) Explicitly explain about where to perform the various commands as a normal user or as sudo/root. (Thanks go to reader Andriy!)
- 2) Greatly simplified the method by turning startwm.sh into a symbolic link to call the /etc/X11/Xsession script. (Thanks go to reader Ed!)
2011-11-18 : See Update 1 near the bottom of the article for automatically removing&restoring the background picture for the RDP session.
I’m assuming you’re running Ubuntu 11.10, which I wrote about in another article on how to customize that to give you a sensible desktop rather than that abomination they call Unity.
In fact you’d be well advised to read that through right now if you haven’t already, as I’m going to use what I did there, so that when you log into a machine running Ubuntu 11.10, you’ll be presented with a sensible desktop. In fact this article is being written and tested on the fresh 11.10 virtual machine I used in that last article.
1) Obtain X11rdp from SVN repository…
If you haven’t got it already, install subversion – you need it to obtain the SVN version of X11rdp;
sudo apt-get install subversion
Then in a terminal, in your home directory, and as your normal (non-root) user, type;
svn co svn://server1.xrdp.org/srv/svn/repos/main/x11rdp_xorg71
svn will then nab the source from the repository to your home directory.
2) Compile X11rdp…
This is much the same procedure as outlined in the old article.
You’ll need various development libraries needed to build Xorg;
sudo apt-get build-dep xserver-xorg-core
If you haven’t done so already, install automake 1.7 and 1.9 – the x11rdp compilation looks for those and whines if it can’t find ’em;
sudo apt-get install automake1.7 automake1.9
Make a directory, to which the X11rdp (and in fact Xorg) build system will place all the built binaries and files. I’ll use;
sudo mkdir /opt/X11rdp
NOTE: /opt/X11rdp will be owned by root. This is the intended result.
Next, go into the root directory of the downloaded X11rdp source tree, which will be in your home directory;
cd x11rdp_xorg71
Then start the compilation using the already configured build script, supplying it with the directory location you made above;
time sudo sh buildx.sh /opt/X11rdp
Yes that’s right, I added the “time” command in there, which will tell you how long it took to compile. ;)
Now, be prepared! The compilation takes AGES! You’re basically compiling a whole Xorg tree here – that is – the whole X Window Display System. I’m not joking – this will take a loooooong time, so, go away while it’s doing this (or read on for a bit to see what you’ll need to do next).
OK, so it took my virtual machine with 4 CPU’s running over an iSCSI system disk 18 minutes and 25 seconds to compile. Your machine may be quicker, may be slower – ain’t my fault if it takes longer :)
After compilation is complete you can (even as a normal user);
cd /opt/X11rdp/bin
ls -lh
To see if everything is there. In my case it is so we continue…
Lastly, we need to soft link the X11rdp binary to /usr/bin;
sudo ln -s /opt/X11rdp/bin/X11rdp /usr/bin/X11rdp
3) Compile xrdp from the Git repository
In the previous article I used the xrdp package from the Ubuntu/Debian package repository. This was purely out of convenience and the fact that I had always used it before.
However, both xrdp and X11rdp have been updated a lot and new features added, such that at time of writing, the current version of xrdp supplied by the distribution packages does not work with the SVN version of the X11rdp server. You’ll get an xrdp session filled with garbage, as the screenshot shows. That totally threw me off when I wrote my original article, and I wasted about 2 days trying various different distros, 32 and 64-bit, and was even considering voodoo magic to get it to work ;) … no chickens were harmed though :P
So we need to nab the xrdp source from the FreeRDP Git repository. To do that we’ll need to install git (if you don’t already have it);
sudo apt-get install git libssl-dev libpam0g-dev
Next up, we’ll need to nab the startup script from the old & busted xrdp package, for use with our new hotness compiled xrdp source, so;
sudo apt-get install xrdp
This installs the Ubuntu xrdp package, and also VNC server/clients.
Then
sudo apt-get remove xrdp
This will get rid of Mr Old and Busted, while keeping the newly generated xrdp user,group, and startup scripts, because I didn’t “–purge” them whilst removing – which is one of the useful benefits of using a Debian based system. This will come in very handy later thank you very much ;)
Next up, retrieve xrdp source from the git repository;
NOTE: Again, do this as a normal user, in your home directory!
git clone https://github.com/FreeRDP/xrdp.git xrdp.git
If you have trouble with https , then try
git clone http://github.com/FreeRDP/xrdp.git
Next, do the following steps, which will
- compile xrdp
- install it in the correct locations for Ubuntu usage
- copy and change the ownership and permissions of the RSA keys required for an encrypted RDP connection;
NOTE: Again, this starts off using your normal user account in your home directory…
2012-03-22 NOTE : Added extra step (in orange) so xrdp works correctly again.
A) Compile xrdp
cd xrdp.git
git checkout 4cd0c118c273730043cc77b749537dedc7051571
./bootstrap
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
B) Install xrdp in the correct locations for Ubuntu/Debian use;
sudo make install
C) Copy and change permissions of the generated RSA keys required for an encrypted RDP session.
NOTE: at this point, you will find yourself in a root prompt (after sudo su -)…
sudo su –
mkdir /usr/share/doc/xrdp
mv /etc/xrdp/rsakeys.ini /usr/share/doc/xrdp/
chmod 600 /usr/share/doc/xrdp/rsakeys.ini
chown xrdp:xrdp /usr/share/doc/xrdp/rsakeys.ini
Stay in the root prompt for the next step.
UPDATE: 2011-12-02; After a bit of conversation in the comments below, a better way of using the startwm.sh script has been figured out.
In the comments section below, you’ll notice I had a nice conversation with reader Ed, and eventually we came up with a better use for the startwm.sh script.
Here’s what to do. You should still be in a root prompt after the “RSA keys” step above…
A) Make a backup of startwm.sh
cd /etc/xrdpmv startwm.sh startwm.sh.BACKUP
B) Make a symbolic link called startwm.sh , to the file /etc/X11/Xsession
ln -s /etc/X11/Xsession /etc/xrdp/startwm.sh
Here’s a screenshot showing startwm.sh as now being a symbolic link to the Xsession script.
Finally, edit /etc/init.d/xrdp and add or change the following near the beginning of that init script;
PIDDIR=/var/runSESMAN_START=yes
And a screenshot of the lines highlighted.
Note: I copied the old Ubuntu “PIDDIR=/var/run/xrdp” line and kept it as a comment above.
OK, lets try starting xrdp… /etc/init.d/xrdp start
ps ax | grep rdp and… Success! Seems to be up and running.
Okay from another computer try running your RDP client and see if you can connect and log in to an RDP session…
rdesktop -a 16 -g 1240×800 192.168.1.231 (your client and ip address will almost certainly differ from mine)
And yes indeed, at least the freshly compiled xrdp is up and running.
NOTE: If you don’t want to have to be manually hunting down and killing an X11rdp process, and also having to stop and restart xrdp, don’t try logging in like I’m just about to do as a test. We need to proceed to section 4 which is next up, in order to get our sessions running properly…
Almost there!
At least now there isn’t a screen full of garbage, so the xrdp/X11rdp combination works. How to get a proper desktop though? Oh yes, we need to tell xrdp what type of session we want…
4) Telling xrdp what kind of session we want, after logging in…
UPDATE: I have re-written this section, because of the new method we did above, which has made this procedure FAR simpler!
There is a script in /etc/xrdp called startwm.sh , which is responsible for starting the window manager after you have logged in. In the step above we renamed it and turned it into a symbolic link to /etc/X11/Xsession.
In its original form, the beginning of the script as supplied read like this;
# change the order in line below to run to run whatever window manager you # want, default to kde SESSIONS="gnome-session blackbox fluxbox startxfce4 startkde xterm" start the window manager wm_start() { for WindowManager in $SESSIONS do which $WindowManager if test $? -eq 0 then echo "Starting $WindowManager" $WindowManager return 0 fi done return 0 }
This would have caused us trouble when logging into xrdp, because what it’s saying is “Here’s a default bunch of the usual window managers. Go through each one and if you find one, start it”.
Blech!
Not very flexible, and way over-complicated. Personally speaking, I’d rather it look at a file in my login directory and start whatever window manager or session I want.
Also, we can do really interesting things with a customizable .xsession script – read Update 1 at the bottom of this article for bonus hot-ness ;)
By turning startwm.sh into a symbolic link above, we can now automatically use our .xsession script in our home directory.
A) Edit or create the file .xsession in your login directory.
Please read Update 1 at the bottom of this article for additional hotness – automatically remove background for the RDP session and restore when you log out of the RDP session.
In your home directory there should be a file called .xsession
Don’t worry if there isn’t – it just means you haven’t created it yet. Anyway, after logging in via the xrdp login screen, the .xsession file basically specifies what kind of desktop session we want.
In this case, I’m going to use the Gnome 3 classic session, which if you followed my other article, should be configured by now to resemble a pretty usable old skool gnome desktop.
Simply open up a terminal and as your normal user either edit or create a file called .xsession , and enter the following;
gnome-session --session=gnome-fallback
Save the file, and if the xrdp server is not already running, start it up.
Now try to connect to an RDP session!
5) Connect via RDP!
I’ll try using the RDP client from Windows 7, mstsc.exe;
By the way, remember to select “sesman-X11rdp” module at the xrdp login screen! Log in and…
Bingo! Works nicely!
As I stated above, you can now specify exactly what session you wish to see when you log in via xrdp.
I installed Xfce, logged out of that RDP session, edited my .xsession file, commented out the gnome session and entered this instead;
#gnome-session --session=gnome-fallback xfce4-session
Then logged back in;
Freedom of choice is wonderful, isn’t it ;)
Note that now you’re using the more recently updated versions of xrdp and X11rdp, you can specify more color depths; 8,15,16,24,32 all work! (Although, I doubt using full 32-bit color over the internet is going to be fast – haven’t tried it yet).
And now for the last section of this tutorial; customization…
5) Customizing the xrdp login screen…
A) X11rdp as default on the login screen…
First of all, let’s make the sesman-X11rdp option appear by default. This is useful because A) You don’t have to keep manually selecting it every time, and B) you can just plug in your login and password details to your RDP client and you can log straight into your RDP session.
So with that in mind, have a look at the file /etc/xrdp/xrdp.ini ;
[globals] bitmap_cache=yes bitmap_compression=yes port=3389 crypt_level=low channel_code=1 max_bpp=24 #black=000000 #grey=d6d3ce #dark_grey=808080 #blue=08246b #dark_blue=08246b #white=ffffff #red=ff0000 #green=00ff00 #background=626c72 [xrdp1] name=sesman-Xvnc lib=libvnc.so username=ask password=ask ip=127.0.0.1 port=-1 [xrdp2] name=console lib=libvnc.so ip=127.0.0.1 port=5900 username=na password=ask [xrdp3] name=vnc-any lib=libvnc.so ip=ask port=ask5900 username=na password=ask [xrdp4] name=sesman-any lib=libvnc.so ip=ask port=-1 username=ask password=ask [xrdp5] name=rdp-any lib=librdp.so ip=ask port=ask3389 [xrdp6] name=freerdp-any lib=libxrdpfreerdp.so ip=ask port=ask3389 [xrdp7] name=sesman-X11rdp lib=libxup.so username=ask password=ask ip=127.0.0.1 port=-1 xserverbpp=24
Notice the section “[xrdp7]” .
It’s the one used for use with X11rdp.
Simply edit that file (you need to be root), cut & paste that to the top of the list and rename it to [xrdp1] , renumbering the others too. You should end up with something like this;
[globals] bitmap_cache=yes bitmap_compression=yes port=3389 crypt_level=low channel_code=1 max_bpp=24 #black=000000 #grey=d6d3ce #dark_grey=808080 #blue=08246b #dark_blue=08246b #white=ffffff #red=ff0000 #green=00ff00 #background=626c72 [xrdp1] name=sesman-X11rdp lib=libxup.so username=ask password=ask ip=127.0.0.1 port=-1 xserverbpp=24 [xrdp2] name=sesman-Xvnc lib=libvnc.so username=ask password=ask ip=127.0.0.1 port=-1 [xrdp3] name=console lib=libvnc.so ip=127.0.0.1 port=5900 username=na password=ask [xrdp4] name=vnc-any lib=libvnc.so ip=ask port=ask5900 username=na password=ask [xrdp5] name=sesman-any lib=libvnc.so ip=ask port=-1 username=ask password=ask [xrdp6] name=rdp-any lib=librdp.so ip=ask port=ask3389 [xrdp7] name=freerdp-any lib=libxrdpfreerdp.so ip=ask port=ask3389
Save the edited file, then restart xrdp with sudo /etc/init.d/xrdp restart . Then use your RDP client to connect again;
There ya go! X11rdp is now the default session type.
Press Cancel, and now enter your complete login/password details to your RDP client. You’ll be logged straight into your RDP session using the X11rdp server :)
B) Changing the Xrdp Logo on the login screen!
I’m including this as a bit of fun, but I can see where this might be useful in a corporate environment where you may wish to place your company logo on the login screen.
It’s actually remarkably simple…
Having looked at the xrdp source, I noticed that the utility loads the logo bitmaps at time of execution, so as an experiment, I spent a little bit of time to come up with a newer, fresher Xrdp logo, here’s what it looks like on the xrdp login screen – compare that to the old logo in the last screenshot above;
I think I like mine better, but I’m biased ;)
Basically all you need to do is replace the logo bitmaps with something of your choice – they have to be saved in BMP format, and it shouldn’t matter if the bitmap is larger or smaller in size compared to the original files (widthxheight in pixels) , because if I’ve read the xrdp source code correctly, it takes the dimensions of the source bitmap and allocates the memory properly for proper fixing into the resultant login screen, from the bottom right outwards. You’ll notice my logo is a bit bigger than the original Xrdp logo.
The bitmaps, after installation, are stored in the directory /usr/share/xrdp/
The two main ones to consider are xrdp24b.bmp, and xrdp256.bmp – obviously for 24-bit and 8-bit versions respectively.
Here’s the 24-bit one I made in GIMP as an example. If you like it, feel free to use this if you wish, but tell people where you got it from if they ask (and consider making a donation for all this fine work I’ve been doing for your benefit :D ).
And here’s the 8-bit version. Again same condition of use as above :)
Okay and that’s it for this one – I think I’ve covered just about all the specifics which are relevant to Ubuntu 11.10, and once again I hoped this helped!
Have fun!
So, how did this procedure work out for you? Let me know in the comments section! :D
(Oh and please rate and share this on your social links!)
UPDATE 1 : 2011-11-18 : Automatically remove your desktop background for the RDP session
This is relevant to the Gnome session only…
Edit your .xsession file to look like the following;
background=`gsettings get org.gnome.desktop.background picture-uri` gsettings set org.gnome.desktop.background picture-uri '' gnome-session --session=gnome-fallback gsettings set org.gnome.desktop.background picture-uri $background
Basically this saves your current background setting , then clears it, runs your gnome session, and after you log out of that session, restores the original background setting.
Simple ;)
X11rdp, Ubuntu 11.10, Gnome 3, xrdp customization - New Hotness! Updated!,
Hi Kevin
Im not sure if you have answered my question in you previous posts. The issue that I have at the the moment is that when I login remotely, I dont see sessions that were running remotely.Is it possible that suppose I was working on the session below locally on the machine below and when I go away and then rdp to the server, i can connect and see that session and continue working as if Im seated on that machine
Eg
sesman.
root@test-lab:/etc/xrdp# ps -e | grep rdp
9604 ? 00:00:00 xrdp-sessvc
9633 ? 00:00:00 xrdp-chansrv
9821 pts/0 00:00:00 xrdp
9823 pts/0 00:00:00 xrdp-sesman
root@test-lab:/etc/xrdp#
Ngaiso, hi
When I RDP in to my machine, this is what I see with ps;
kcave@phenominal-debian:~$ ps ax | grep rdp
2549 ? Sl 0:00 /usr/sbin/xrdp
2552 ? S 0:00 /usr/sbin/xrdp-sesman
12124 ? S 0:00 /usr/sbin/xrdp-sessvc 12126 12125
12126 ? S 0:03 X11rdp :10 -geometry 1024×600 -depth 24 -bs -ac -nolisten tcp
12145 ? Sl 0:00 xrdp-chansrv
12433 pts/0 S+ 0:00 grep rdp
kcave@phenominal-debian:~$
I don’t see X11rdp running on your ps output – how are you disconnecting from the RDP session locally?
EDIT:
I initiated a local session on my linux box, then disconnected, then tried reconnecting to that session from my netbook next door over the wireless connection – it works for me. Here’s a screenshot of the re-opened session from the netbook…
Regards!
Worked perfectly on Ubuntu 11.1 on my local subnet.
Worked like a charm on a 12.04, once I had read through the comments and found Daniel’s working git checkout of xrdp.
However, how is the rdp protocol securitywise? I mean, I’ve restricted sshd to only allow key-based logins so it feels a bit strange to all of a sudden do password logins over rdp.
Would it make any sense to make xrdp only listen to port 3389 locally and set-up a tunnel (ssh, stunnel, etc) to it from where-ever one wants to run rdesktop? (This will, of course, come with a performance penalty.)
Anders, hi!
As a proof of concept, I added “adress=127.0.0.1” in the [globals] section of /etc/xrdp/xrdp.ini, restarted xrdp and verified that it now only listen locally. Then set-up and ssh-tunnel from another machine with ‘ssh -L 3389:127.0.0.1:3389 ‘ and could succesfully run ‘rdesktop localhost’ and login on my remote machine without any noticeable slowdown (but I’m on a good network). Now I only have to figure out how to make a tunnel from a Windows machine, too.
Indeed that's how I do it too. :)
It's pretty easy to do it from Windows using puTTY – and as I said that's all to come in the SSH article I'm working on right now – it's already a pretty big article and that's only covering setting up the ssh server and ssh keypairs!
If I can just get a couple of days to polish the article off and add some really cool stuff on it – including tips and tricks with puTTY on Windows. So please bear with me – this is all going to get covered very soon :)
Regards!
Anders, you may be interested in the new article here : Secure your systems with ssh on Linux and puTTY on Windows – Part 1
Regards! ;)
Hi,
First of all, thanks for this great software.
I got xrdp with vnc backend running without a problem, my issues lie in X11rdp. After messing around a little bit, I got to the point where the X session is started, but I cannot connect to it.
These are the relevant parts of the config files:
xrdp.ini:
[xrdp7]
name=sesman-X11rdp
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
sesman.ini:
[X11rdp]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
When I connect to the rdp session, all processes are started as expected, to me it looks as if the entire gnome session is running as it should:
# ps faux
root 13916 0.0 0.0 72344 1808 pts/0 S 14:45 0:00 /usr/sbin/xrdp-sesman
root 14173 0.0 0.0 21656 1272 pts/0 S 15:01 0:00 \_ /usr/sbin/xrdp-sessvc 14175 14174
Guest1 14174 0.0 0.0 12792 700 pts/0 S 15:01 0:00 \_ /usr/bin/ck-launch-session /usr/bin/dbus-launch –exit-with-session /bin/ba
Guest1 14193 0.0 0.0 12272 276 ? Ss 15:01 0:00 | \_ /usr/bin/ssh-agent /usr/bin/ck-launch-session /usr/bin/dbus-launch –ex
Guest1 14204 0.0 0.0 11464 1168 pts/0 S 15:01 0:00 | \_ /bin/bash /home/Guest1/.xsession
Guest1 14209 0.0 0.0 328976 10276 pts/0 Sl 15:01 0:00 | \_ gnome-session –session gnome-fallback
Guest1 14219 0.2 0.0 510364 18200 pts/0 Sl 15:01 0:00 | \_ /usr/lib/gnome-settings-daemon/gnome-settings-daemon
Guest1 14237 0.0 0.0 235156 9020 pts/0 S 15:01 0:00 | \_ metacity
Guest1 14242 0.1 0.0 487776 19692 pts/0 Sl 15:01 0:00 | \_ gnome-panel
Guest1 14259 0.0 0.0 443536 12908 pts/0 Sl 15:01 0:00 | \_ nm-applet
Guest1 14260 0.6 0.0 507700 38956 pts/0 Sl 15:01 0:01 | \_ mono /usr/lib/docky/Docky.exe
Guest1 14264 0.0 0.0 327892 12596 pts/0 Sl 15:01 0:00 | \_ gnome-sound-applet
Guest1 14265 0.2 0.0 488372 22892 pts/0 Sl 15:01 0:00 | \_ nautilus -n
Guest1 14273 0.0 0.0 248244 9260 pts/0 Sl 15:01 0:00 | \_ /usr/lib/gnome-settings-daemon/gnome-fallback-mount-helper
Guest1 14274 0.0 0.0 214688 6568 pts/0 Sl 15:01 0:00 | \_ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
Guest1 14275 0.0 0.0 329212 11268 pts/0 Sl 15:01 0:00 | \_ bluetooth-applet
Guest1 14313 0.0 0.0 142780 3924 pts/0 Sl 15:01 0:00 | \_ telepathy-indicator
Guest1 14323 0.0 0.0 182140 9600 pts/0 S 15:01 0:00 | \_ /usr/lib/gnome-disk-utility/gdu-notification-daemon
Guest1 14325 0.0 0.0 222172 5068 pts/0 Sl 15:02 0:00 | \_ zeitgeist-datahub
Guest1 14341 0.0 0.0 311784 12068 pts/0 Sl 15:02 0:00 | \_ /usr/lib/evolution/3.2/evolution-alarm-notify
Guest1 14343 0.0 0.0 415576 13496 pts/0 Sl 15:02 0:00 | \_ update-notifier
Guest1 14175 0.6 0.0 59148 28796 pts/0 S 15:01 0:01 \_ X11rdp :10 -geometry 800×600 -depth 16 -bs -ac -nolisten tcp
root 14196 0.0 0.0 41564 1732 pts/0 Sl 15:01 0:00 \_ xrdp-chansrv
Guest1 14207 0.0 0.0 26444 720 pts/0 S 15:01 0:00 /usr/bin/dbus-launch –exit-with-session /bin/bash /home/Guest1/.xsession
Guest1 14208 0.2 0.0 26036 2092 ? Ss 15:01 0:00 //bin/dbus-daemon –fork –print-pid 10 –print-address 12 –session
Guest1 14211 0.0 0.0 56244 2672 ? S 15:01 0:00 /usr/lib/gvfs/gvfsd
Guest1 14223 0.0 0.0 157784 3360 pts/0 Sl 15:01 0:00 gnome-keyring-daemon –start –components=gpg
Guest1 14233 0.0 0.0 53312 4116 ? S 15:01 0:00 /usr/lib/libgconf2-4/gconfd-2
Guest1 14235 0.0 0.0 230392 4712 pts/0 Sl 15:01 0:00 /usr/lib/gnome-settings-daemon/gsd-printer
Guest1 14239 0.0 0.0 309996 9636 ? Sl 15:01 0:00 /usr/bin/gnome-screensaver –no-daemon
Guest1 14250 0.0 0.0 207928 4408 ? S<l 15:01 0:00 /usr/bin/pulseaudio –start –log-target=syslog
Guest1 14254 0.0 0.0 132912 2780 ? Sl 15:01 0:00 /usr/lib/d-conf/dconf-service
Guest1 14280 0.0 0.0 65304 3756 ? S 15:01 0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor
Guest1 14291 0.0 0.0 54620 2424 ? S 15:01 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
Guest1 14293 0.0 0.0 68728 2584 ? Sl 15:01 0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
Guest1 14296 0.0 0.0 60608 3228 ? S 15:01 0:00 /usr/lib/gvfs/gvfsd-trash –spawner :1.1 /org/gtk/gvfs/exec_spaw/0
Guest1 14298 0.0 0.0 60404 3488 ? S 15:01 0:00 /usr/lib/telepathy/mission-control-5
Guest1 14311 0.0 0.0 56104 2668 ? S 15:01 0:00 /usr/lib/gvfs/gvfsd-burn –spawner :1.1 /org/gtk/gvfs/exec_spaw/1
Guest1 14331 0.0 0.0 132416 18628 ? Sl 15:02 0:00 /usr/bin/python /usr/bin/zeitgeist-daemon
Guest1 14332 0.0 0.0 4204 324 ? S 15:02 0:00 \_ /bin/cat
But using rdesktop it won't connect:
Connection Log
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait…
xrdp_mm_process_login_response: login successful for displa
started connecting
connecting…
connect error
connecting…
connect error
connecting…
connect error
connecting…
connect error
connection problem, giving up
some problem
In xrdp-sesman.log everything looks fine:
[20120402-15:01:39] [INFO ] scp thread on sck 7 started successfully
[20120402-15:01:39] [INFO ] ++ created session (access granted): username Guest1, ip 192.168.16.101:35864 – socket: 7
[20120402-15:01:39] [INFO ] starting X11rdp session…
[20120402-15:01:39] [INFO ] starting xrdp-sessvc – xpid=14175 – wmpid=14174
I tried with both git head and 4cd0c118c273730043cc77b749537dedc7051571 and get the exact same situation. I've also tried adding the -uds parameter, but then the xsession doesn't start. What am I missing here??
Regards,
Tim
Tim, hi
I know you've stated you've tried both git head and the 4cd0c118c273730043cc77b749537dedc7051571 commit, but it honestly looks like the same problem as others had before using the checkout 4cd0c118c273730043cc77b749537dedc7051571 addendum.
I can only suggest starting with a clean slate and going through all the steps again. I've performed these steps on Debian Wheezy and Ubuntu 11.10 lots of times now and apart from the recent change to the xrdp git source, everything works as per the article.
Regards
Hi Kevin,
Thanks for your reply. I thought I tried everything, but removing everything and just restarting from scratch made it work. I think it was the "make uninstall" that did the trick, but I'm not sure though.
Anyway, thanks for the great article, now of to have some fun with xrdp!
Regards,
Tim
Tim,
So glad that's working for you now!
Have fun! ;)
Having a bit of an issue, not sure why. Maybe a conflict somewhere.
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait…
xrdp_mm_process_login_response: login successful for displa
started connecting
connecting… connected ok
& then the session window closes & leaves me with nothing
Any guesses what may be the issue?
I'm actually getting a similar problem to Dustin.
I'd noticed that if I tried to execute "X11rdp :1" I was getting a segmentation fault. I'd tried tracing it with gbd (which I didn't do very well) but it lead me to this post. It didn'r really help though as changing the value of the malloc call in that class and recompiling still threw the seg fault.
Instead I reverted the svn to revision 295 which is dated around October; when Kevin posted his article. A recompile and reinstall of the code now has X11rdp running without any errors, however I'm still getting chucked out at exactly the same place. Looking at /var/log/xrdp-sesman.log doesn't give a lot of information:
[20120407-14:48:03] [INFO ] scp thread on sck 7 started successfully
[20120407-14:48:03] [INFO ] ++ created session (access granted): username [MY USER], ip [MY IP ADDRESS]:58790 – socket: 7
[20120407-14:48:03] [INFO ] starting X11rdp session…
[20120407-14:48:04] [INFO ] starting xrdp-sessvc – xpid=2675 – wmpid=2674
[20120407-14:48:04] [INFO ] ++ terminated session: username [MY USER], display :10.0, session_pid 2673, ip [MY IP ADDRESS]:58790 – socket: 7
I'm going to look see if there anyway to put XRDP into a debug mode, or at least a more verbose logging to see if that helps.
~Dan
P.S. I'm running Ubuntu 11.10 x64 (originally a server build, but I needed to install a desktop manager in order to configure myth and a few other apps which seem to think users can't do command line … grumbles)
P.P.S I noticed that everytime I make a connection attempt XRDP increments the display number until it gets to 20 after which it prevents any futher connections. Not sure what/when it reverts back to zero but so far the only way I've found of reseting the counter is to reboot :-(
Dustin, Dan, I'm just not seeing that behaviour, and I've used 32 and 64-bit versions of Ubuntu 11.10 :-/
Did you perform a ps aux | grep rdp at all during this, to see if there were any instances of X11rdp running?
Regards
Runing a ps aux shows no instance of X11rdp running at any point in the process, the output is much the same as you have it in the screen shot you've posted:
~$ ps aux | grep rdp
xrdp 1137 0.0 0.0 33596 3600 ? Sl 14:43 0:00 /usr/sbin/xrdp
root 1146 0.0 0.0 87664 2324 ? S 14:43 0:00 /usr/sbin/xrdp-sesman
daniel 13200 0.0 0.0 12056 896 pts/0 S+ 19:17 0:00 grep –color=auto rdp
~Dan
Huh, thought that I'd replied to this … maybe I have and it's in moderation, in which case delete this one.
In answer to your question, nope no X11rdp processes running.
Looking at the man page for sesman.ini there are parameters to recycle the display number but they are currently ignored. I'm not sure if that is releated to my issue or not, I certainly don't think that I've been limited to connecting 20 times before this … that said though, I've not sat there all day trying to connect to my server.
Was going to try compiling in debug, day has run away with me though. Perhaps a job for tomorrow, unless anyone has any ideas of where to look?
Cheers,
~Dan
Hmm,
A very sad 3 posts in a row, however I've found the issue that was causing the disconnect. I had to edit /etc/xrdp/xrdp.ini and set max_bpp=16 in the [globals] section and xserverbpp=16 in the sesman-X11rdp [xrdp1] if you've followed Kevin's instructions.
Dusin, don't know if you are checking back, but give that a go to see if it fixes things.
Not sure why I can't do 24bit on the server (that worked find with the old xrdp) IIRC, oh well. connected and able to configure things now.
~Dan
Thanks for the outstanding work.
Is there a way to get the linux login screen instead of logging in via xrdp and loading the predefined session in home .xsession? IOW I’d like to select the session type dynamically, which in Mint can be done from its login screen.. Doing this through win7 rdp client.
That's a very good question :)
I tried to figure that one out before, and got as far as getting LightDM to display after logging into the initial xrdp login screen, but none of the Greeters used by lightdm worked.
It's all down to how xrdp works – it's really designed to just log you into a session after authenticating. There's bound to be some way to do it though, and I'll have another look at it some time soon.
I'm secretly hoping some other clever person out there will figure it out too ;)
Regards
Great, and I have it working on an Oracle Vbox VM hosted by Win7. Using Ubuntu 11.10 for the guest OS, Vbox is the latest 4.1.12. Great job of documentation. I am a newbie to Ubuntu and retired IT geek, thanks again.
Ed
I'm running Ubuntu 11.10 desktop, 64bit. I tried everything step-by-step, exactly as you said I should do, but all I get at best is a gray flickering screen with a mouse pointer. Most of the time the RDP client (from any OS) just immidiatelly disconnects. Is this thing supose to work with Unity or not? I don't want to run Unity 2D, as some suggested be put in the .xsession file of my home folder, or even GNOME 3. The new GNOME is a far cry from the good old 2.x and the Unity 2D is total misery not having any 3D action at all. Why did they even bother putting a 2D on a desktop? Is there any hope? Please help. Thank you for all the hard work you put into this article so far and hope to hear from you soon.
Hey Kevin, Thanks for an awesome tutorial. I am having a slight problem:
I followed the steps exactly as defined. I even have the exact same output as you do when I do the ps ax | grep rdp. When I go to my windows 7 box to test it, mstsc churns and churns, then finally tells me, nope, nothing doing. It's a vanilla install of Ubuntu 11.10 (with all updates applied). I keep thinking some kind of firewall is stopping it, but unless there is one on the ubuntu side by default, I can't find it.
DanS, greetings
Odd… let me check on a vanilla install again. I did that last week and all seemed to be well… Hmm. Perhaps more changes to the xrdp source? I'll check to see if there's been any commits recently too.
I'll get back to you soon.
DanS, hi again…
I removed the compiled X11rdp from /opt , deleted the symbolic link /bin/X11rdp , uninstalled the compiled xrdp (by going into ~/xrdp.git and typing sudo make uninstall).
Then I got rid of the xrdp.git and x11rdp_org directories in my user's home directory, and then re-downloaded both source trees again, performing the compilation and installation as per the article, in my Ubuntu 11.10 virtual machine.
Again, RDP works fine for me, so it has nothing to do with any changes to the source code, as far as I can see.
Check that you do not have the ufw firewall running – type sudo ufw status, it should return "Status: inactive" if it's not running.
Other than that, I suggest you try again from scratch.
My article isn't lying – it really does work :)
Let me know how you got on.
Regards!
Kevin, this is the output of my ps ax | grep rdp :
1220 ? S 0:00 /usr/sbin/xrdp-sessvc 1231 1230
1273 ? Sl 0:00 xrdp-chansrv
2226 ? S 0:00 /usr/sbin/xrdp-sessvc 2228 2227
2228 ? S 0:02 X11rdp :11 -geometry 1440×900 -depth 16 -bs -ac -nolisten tcp
2252 ? Sl 0:00 xrdp-chansrv
20113 ? S 0:00 /usr/sbin/xrdp
20115 ? S 0:00 /usr/sbin/xrdp-sesman
21112 pts/0 S+ 0:00 grep –color=auto rdp
Anything in it that you see being wrong? I'm running the nVidia graphics driver version 280.13.
I have the Firestarter firewall running, but even when stoppd I still can't get it to work. The command sudo ufw status shows that it is inactive.
Never mind, I won't bother you any more. If the title of this article is any indication then Gnome 3 is the only way to get this thing to work.
Dragan, hi
If you read my article, it explains how you can use the desktop environment of your choice – you just need to specify what you want to run in your ~/.xsession file, which will get executed once you've logged in via your RDP client.
So you're not just stuck with Gnome – I even have an example of the Xfce desktop running, in the article :)
Also, looking at your output from ps, it seems you do have an X11rdp X server running in the background. But you have 2 xrdp-sessvc instances running, where there should only be one, so, one of those is some kind of "lost" session.
Perhaps try issuing a sudo service xrdp stop , then sudo kill any remaining process related to rdp, including those sessvc processes, then sudo service xrdp start, and try to log in again. Also check your ~/.xsession file for errors – I presume you have the .xsession file in the home directory of the user you're logging in as?
From my point of view it's extremely difficult if not nigh on impossible to debug what's going on at your end, and in all honesty, if I were you I'd start the process again from scratch and see if you get better results this time. From my experience, anyone getting results that differ from the article, have made some kind of error or may have missed a step in the article.
I have tested and re-tested the steps in the article, and have used Debian and Ubuntu 32 and 64-bit versions, and get consistent results every time. I also promptly update the article whenever someone makes a great suggestion, finds out some additional information, or there's been some change to the xrdp/X11rdp source which needs to be explained in the article.
If you still can't get it working my advice to you is, keep at it and restart from scratch by removing /opt/X11rdp , removing the /bin/X11rdp symbolic link, performing a sudo make uninstall from the xrdp.git directory, then remove the xrdp.git and x11rdp_xorg directories, and starting the compilation/installation process again. You won't have to perform the apt-get install operations as those are already done and have no impact on the article second time round.
Good luck and let me know how you get on :)
Regards
Was anyone able to use Vista as the client? With Vista I get a black screen, not even an option login.
Not sure if this was posted.
I am having trouble getting this to work. I have tried 3 different flavors of Windows
1. Windows Vista – just a black screen when connecting no login panel or anything
2. Windows 7 (friend's PC) – receive a login panel, but after logging and connecting the connection is terminated
3. Windows XP – I receive gnome-fallback can not be loaded
Really excellent walkthough – thanks!
I have just used this on a recent version of 12.04 precise and can confirm that it all works like a charm. I would still like to be able to get a proper Gnome3 shell on the remote machine, but you can't have everything I guess. I am now using IceWM for performance on the remotes and Gnome2 on the local network.
On my relatively slow old file server it took almost 45 minutes for the build, but now it is done, runs fine.
Sysinfo for the curious…
AMD Sempron 3000+ 4GB RAM GeForce6150 500GB WD Root with 2TB native ZFS Raidz Data running Ubuntu12.04 64-bit
Many thanks once again!
NickB
Nice work, Kevin – I've just followed this through on Ubuntu 11.04 on VMware Workstation 8, all looks good. When I'm back at the office I'll re-migrate the image to my ESXi server where it belongs. I can't reach the Subversion server from the office image – probably our corporate firewall blocks it – so this turns out to be the only practicable way to get a useable performance from the XRDP server on the ESXi image. Without this tutorial and your earlier posting I wouldn't have dared to start on this exercise!
Regards,
Jim
Everything worked for me on Lubuntu 12.04. I am however unable to specify what session I'd like to use in the .xsession file. This is primarily due to the fact that I dont know what to put in for lxde or the default Lubuntu sessions. If I remove the .xsession file it loads the lxde desktop. How do I get it to load the Lubuntu one? (at login on the physical machine they are different options). I will be installing this on my other Xubuntu machine, which has the choice between xfce and xubuntu desktops. I am curious on how to set up the .xsession file their as well for the Xubuntu default rather than the xfce. Great tutorial though!
-David
Hi Kevin,
Great tutorial. Thank you for posting it. One quick question though: My use case is a headless server with an auto-login at boot, there's a bunch of startup apps that load up with my auto-login. But when I rdp in, I can't access those apps that are already loaded. I can only launch new instances of them. Is it possible to limit x11rdp to a single session the way VNC does or should I stick to VNC if I want a single session? I'd ultimately like the speed of RDP, but with a single session…
Hi Bill,
Do you mean when your headless system boots it also starts a VNC server with the apps running in that?
I don't think there's a way to to do that with the X11rdp server, offhand, although perhaps you could log in via RDP and then inside that access the VNC session by running a VNC client? You'd probably have to reduce the size of the VNC session screen to fit it into the RDP session's area.
Regards
Hi Kevin,
Thanks for the reply. Let me try to explain it better. By headless system, I mean I just setup a regular Ubuntu desktop install, but it sits in a closet with nothing but a network cable attached. When the system boots, it auto-logs into the desktop as normal and a few apps load (podcatcher, etc.) as if you were sitting down at it.
If I were to VNC into the machine at this point, it would use this same desktop that auto-loaded with those apps when the computer booted.
However, I'd like to remove VNC from the equation altogether and just use RDP so it'd be faster. Is there any way to boot the computer so that it auto-logs into a desktop session (so my gui apps load), and from another machine be able to RDP to that same boot-up session instead of starting a new one? It seems to me that the session manager x11rdp uses is unable to attach to that initial startup sessio (or chooses not to by design). I'm just trying to confirm if that's the case before I move on. Thanks.
Disclaimer: I'm a linux newb with years of windows experience, so please pardon my poor explainations. I used to run my windows machine this way. It would auto-load my admin account at boot, and I could remote into it at any time to monitor the apps that loaded.
Hi BIll,
Yes you're correct. The X11rdp is basically an X server in its own right. There's no way to attach to the applcations already running on the X server on your autologin session, it's simply not designed that way :)
Regards
Kevin.
XUbintu 12.04 is used.
It checked till the place which does as the procedure of this report and installs x11rdp and xrdp and where connection is possible.
Although a language setup of XUbuntu was made into Japanese and the Japanese keyboard is connected, in the client side, it is recognized as an English keyboard.
What should be done for making it recognize as a Japanese keyboard?
Hi Kevin,
thanks a lot for this guide, it is giving me some VERY usefull hints!
I have a question related to xrdp: do you have idea how to make a RDP network sharing working? I configured my Remote Desktop Client (on WindowsXP) to share some local folders, but no idea how to make them visible from xrdp machine.
Bye, keep on with this great work!
Fabio
Fabio, thanks
That's an excellent question – you could probably do this with some SSH port forwarding trickery – by using puTTY to forward the SMB port(s) to your target machine, which in theory could access the client's drives.
I might try to find this one out – it's probably a very similar technique to my other article on getting audio with your RDP connection.
Regards
Kevin.
Thank you so much for this extraordinary guide. It worked like magic! I'm very happy with the results. Thanks again!
Thanks :)
Have a thumbs-up from me ;)
Regards!
BIG thanks for this very good howto! :) There are only two newbe questions I have:
Only root is able to connect via RDP now.. how can I set the permission to another user? Because I dont want to work with root user..
And I tried all this on ubuntu 12.04, where I want to work with the classic gnome "gnome-panel".. what should be in the .xsession file to load the classic gnome (gnome-panel)?
Greets,
Karsten
Karsten, greetings…
If you can only log in as root, then I think you followed the procedure incorrectly – note though that I haven't as yet checked the procedure against Ubuntu 12.04, so it might be something to do with that, although earlier in the comments section here someone has said it works for 12.04.
I'm in the middle of a large project at the moment. After that's done I will try this on 12.04.
With regards to the gnome panel, there is information in this article (and another article in its own right) on how to do that :)
Regards!
Hi Kevin,
thank you so much for this superb tutorial. Everthing is working on my linux host (Linux Mint 12 Lisa) as it should. Client is a windows 7 laptop
But i have a question about the session which is created on my linux pc when connecting on it.
Is it possible to increase my rights – so i can shutdown, restart the linux pc and so on? As i would work localy on this pc.
Greetings and many thanks again!
Stefan
Stefan, thanks :)
If you can't do something from the menu which requires permission, then try doing it via gksudo. Try hitting ALT-F2. This should bring up a "run" window, then type "gksudo" followed by what you want to do. "gksudo reboot" for example.
Let me know if that works for you.
Regards!
Hello Kevin,
thank you for this hint. It works with gksudo, but in my opinion this is just a workaround :)
Is there a way to get the X-Session with same permissions/rights as if i would be logged in localy on my ubuntu pc ?
Regards
Stefan, hi again :)
Yes, it is a workaround ;)
Blame PolicyKit, not me (or RDP)! :)
It's PolicyKit that is preventing remote users from performing priveleged operations on their remote desktop sessions.
Remote sessions are classed by PolicyKit as being "inactive" – i.e. not directly running on a local terminal, or perhaps the user is physically at the machine but is using a different virtual terminal.
It's a huge PITA for remote users.
I found this exchange from the PolicyKit mailing list;
I'm really in doubt how much of this article to use and if I have to use the previous one as well, needs some cleanup.
Tried to follow the 11.10 guide step by step on Xubuntu 12.04, but ended up with the same results as a previous user, it will only allow me to log in via x11 sesman vnc and not the rdp session.
It's working for me on Ubuntu 12.04 – I haven't tested it on Xubuntu – but if you bear with me for now there's something I'm going to release quite soon which is pretty cool, to do with getting RDP running on your machine :)
As for Xubuntu – well that's a custom variant of standard Ubuntu, and I never claimed it worked on anything other than 11.10 which was the "hot distro" at the time I originally published the article.
However, let me have a look at Xubuntu and I'll get back to you.
Regards!
Violator, hi again…
If you want to have another go at this, please see the utility I wrote which does all the installation automatically for you.
Read all about it here : http://scarygliders.net/2012/05/23/the-scarygliders-x11rdp-o-matic-and-rdpsesconfig-hotness-upon-hotness/ ;)
Let me know how you got on.
Regards
Stefan, check out my comments on the first page on this(sometime in Feb..)..I hit this problem as well. You can change the policykit as per http://askubuntu.com/questions/47942/when-machine-is-headless-user-is-no-longer-privileged to get around this.
Works well on my install of 11.04. Can run all the graphical utilities which require admin without any issues.
Ken, thanks for the additional info :)
I'm just on the brink of releasing something cool related to all this RDP work, which will incorporate the PolicyKit fix ;)
Stay tuned ;)
Regards!
Hi Kevin and Ken,
thank you very much for your aditional informations. Again something new for me to learn :)
I will check this policykit stuff. Thank you
Regards
Stefane, check out http://scarygliders.net/2012/05/23/the-scarygliders-x11rdp-o-matic-and-rdpsesconfig-hotness-upon-hotness/ , which will configure this automatically for you.
Regards
test
FAIL!
;)
Hello Kevin, thanks for guide. It almost worked for me, but not completely. After loging in to xrdp-sesman, the Xsession is not started. I am stuck at a black screen with the "Connection Log" window. (This window has shows this text:
"connecting to sessman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
xrdp_mm_process_login_response: login successful for displa
started connecting
connecting…
connected ok" and an "OK" Button)
I cannot press the "OK" Button. The only way out is to terminate the rdesktop process…
Do you have any idea why the session is not starting?
Hammurapi…
I've had a problem on ubuntu 10.10 (virtual host) until I removed
"–session=gnome-fallback" from ~/.xsession
So have a look at ~/.xsession-errors if nothing helps :-)
Now everything run OK
Great job Kevin, thanks a lot!
BTW, it's better to use
checkinstall –type=debian –pkgname=xrdp –pkgversion=0.6.0 –install=yes –nodoc –default
instead of
make install
for xrdp packadge because it'll be seen as a regular packet in a system
AndrewT, greetings…
I'm having a look at that right now – thanks for the information!
Regards
Hi I followed this entire procedure on Ubuntu 10.04. When I try to connect from win 7 I get the following error:
Because of a security error the client could not connect to the remote computer. Verify that you are logged on to the network, and then try connecting again
Hi.
I'm trying to set up a small and powersaving home server with Ubuntu 12.04 LTS Server x64. Since I'm using Windows, you can imagine that I'm very unused to a console. I do know some of the console commands (like ls, sudo), but I would've to look up everything in google and forums to configure the server. So I need a GUI and it should be remote controlled with rdp/vnc from a Windows 7 machine (the main system) and so your how-to is exactly, what I was looking for.
I chose KDE as my favourite GUI and followed your guide and I think everything went fine until step 4 "Bingo!" … it does NOT work for me :/ It's exactly the same problem what dustin and dan got, but for me it didn't help to set the color depth to 16bits.
I also tried your script and LDXE, but now I don't get a connection at all.
What did I do wrong?
Hi DHAmoKK
I don't think you're doing anything wrong as such – this article was written before 12.04 LTS Server existed, and the utilities were only tested on the Desktop versions – my fault for not making that clear – although on saying that in my defense the fact they use Zenity (which can't be seen on the Server editions without installing Gnome or some other desktop environment with the zenity package installed anyway) should have made one come to the conclusion the V1 utilties were tested only on the desktop editions :)
However, I'm just about to release Version 2 of the utilities which have a text dialog interface and bug fixes, rewrites, new command line switches, and more, so, if you bear with me for a day or so then perhaps try this new version out? It'll work straight from the Server editions which have no desktop environment installed by default. I'm currently in the testing stage before releasing, so, stay tuned :)
Best regards!
Hi.
Thanks very much for your reply and your ongoing work :D
Well, to MY defense, I have to say that as a Windows-User I don't know, what zenity is, so I just installed the package and ran the script ;) Plus, you said, it 'might' work on other Debian versions, too, so I just gave it a try.
But yes, I noticed that the compiling part was done in a few miliseconds, way too fast (while compiling manually took between 14-15 minutes on a virtual machine with 2 processor cores and 4GB, while the virtual disk resides on a SSD). So I think, the script was missing the compiler, too.
Well, thanks again for your hard work and I'll gladly wait for a new version. I might even donate a small amount for that ;)
Heheh have a thumbs-up from me ;)
Keep an eye on the front page within the next day or so – I'll announce the release of version 2 in a new post there.
Oh and Zenity is basically a way for command line scripts to display messages, notifications, and other types of "window-y" boxes, on a user's desktop. V1 of my utilities ONLY used Zenity to display menus, messages etc. as my original motive was to present the user with a nice GUI front-end – hence the reason the utility blazed through on your 12.04 LTS server – must've been a lot of "cannot find zenity"-type messages in the console ;)
Regards!
Thank you for this tutorial. I've tried it on a Ubuntu 11.10 and it works™!
I had to find a different source for x11rdp, because the svn repo didn't work for me. Found a git repo here: http://github.com/Magister/x11rdp_xorg71.git
I've noticed that my keyboard (romanian) was not working and that after a while white color in KDE becomes darkgrey. I suspect some handle leak somewhere, because if I do a /etc/init.d/xrdp restart everything works fine.
I've also tried to build the newest stuff from http://github.com/FreeRDP/xrdp.git, namely the X11R7.6 version, but didn't work as expected, so I've gone back to the working solution :)
Thanks! Glad it worked. No idea about the KDE white—>grey thingy, never seen that behaviour except on a bad monitor ;)
And you now know the reason why I use the older source tree – it works, and too much is happening right now to the bleeding-edge source to be useful. :)
Regards!
Unfortunately I had to revert to VNC because I cannot run OpenGL applications over xrdp :(
I hope that one day xrdp could allow OpenGL applications to work because the windows Remote Desktop client beats all VNC clients out there, you don't have any CAPS LOCK problems, and you can use Alt-Tab on Linux.
0.o
Wow, good luck getting OpenGL apps to run over anything other than natively on your graphics card :)
Regards
Working on 12.04 , and i got clipboard working now :) , but still no sound :(
Did you do that manually or use the new automated tools?
Also, audio? I covered that in my article here : http://scarygliders.net/2012/04/06/get-audio-with-your-xrdpx11rdp-connections-lan-or-remote/
Regards
Hi,
I have tried this several times now.
I have install X11rdp when I rdp it connects and the terminal session works fine how ever I am not able to see the desktop.
All I see is black and white dots.
Any suggestions why?
Thanks
Well after few attempts with the combination of XFCE it worked fine.
Thanks
Whoops! And I replied to your initial comment before checking the spam folder for this reply. :)
Oh well, glad it worked out for you.
Regards
Hi Christus,
You haven't mentioned what linux distribution you are running, it helps to know this ;)
Also, why do the manual method above, when I wrote a utility that does all this for you, just click on this link and you can see what it does and download it (it's free!) and give that a try.
Let me know how you got on!
Regards.
Hi Kevin
It's Ubutu 12.04 LTS
Well I could have used the automated version. Any How it works now and Thanks again ;-)
Christus
With Combination of XFCE it worked fine.
Cool.
Thanks
Hi
Am new to to this forum and also a newbie to the xdrp concept. I have ubuntu 10.10 ltsp server with some thin clients pxe booting into the server. However i want to introduce other terminals(WT3125SE) which can only use xdrp to boot into the server. I have done all the steps in the tutorial but i still keep getting this error when i try to login as client xrdp_mm_process_login_response login failed. Can anyone out there help me out?
Thanks in advance…
When using XRDP how do I make it use cinnamon for the default desktop on Ubuntu 12 Thank you KAI
When its time for me to test RDP from another computer, this is the screen that I get after login:
Any ideas what's wrong with my setup?
Thanks
Hi Kevin,
thank you for your hard and continous work on this!
I first tried ur script with no success. I just get a black screen when connection from Win Xp/7 to my Debian 6.0.5.
Going through the steps manually i am stuck at: "Okay from another computer try running your RDP client and see if you can connect and log in to an RDP session…"
Thats where i only get a black screen with no login window like Robotball postet earlier.
/var/log/xrdp-sesman.log just shows:
[20120730-18:43:37] [WARN ] [init:45] libscp initialized
[20120730-18:43:38] [CORE ] starting sesman with pid 31077
[20120730-18:43:38] [INFO ] listening…
Any ideas/hints on where to look?
TYIA
dme, hi again…
From the messages above it certainly looks like xrdp is up and running and listening for connection attempts.
Can you try changing the colour depth settings on your client? Try changing the colour depth to 16 or 24 (or even 8) – see what happens.
Regards
Kevin.
Tried different color depths and resolutions with no success.
Ok i did an strace on xrdp:
strace -f -o strace2.out -p 22959
Process 22959 attached – interrupt to quit
Process 31093 attached <–connected with mstsc
Process 31093 detached <– this looks like it should not happen?
Process 31094 attached <– automaticly reattached
Process 31094 detached <– closed mstsc
Process 22959 detached <– stopped strace
The whole strace2.out is here: http://www.korthing.de/strace2.zip
The fun starts at line #67394. And line 67398 shows:
22959 bind(5, {sa_family=AF_FILE, path="/tmp/xrdp_000059af_process_self_term_event_00000030"}, 110) = -1 EACCES (Permission denied)
Which is bad i guess. But please have a look at the whole file. I am not experienced in reading straces.
I must have screwed up something with the usergroups/rights.
The /tmp dir is 755 root:root. Is that what it is supposed to be? Setting it to 777 gives me a login screen but after putting in my login info i am stuck at "sending login info to sesman".
I guess there are some other dirs where i do not have the right permissions.
The user i used to follow your guide is a new user with just its own group. And the user is in the sudouers file. Should i set anything different?
Hmm, to be perfectly honest, I think you should start from scratch and try the utilities I wrote – they DO work on Debian 6.0.5 – I have tested them on that and many other distros.
This manual method tutorial was originally written well before Debian 6.0.5 existed, and whilst I updated it every now and again when new Distribution releases arrived, I haven't tested the manual method on 6.0.5
There's a lot going on in my life right now, so, I haven't had much time recently to spend on testing this method on 6.0.5 or any other of the more modern distro versions. I have spent the last few months getting the automatic scripts working, tested, rewritten, tested again, bugfixed, retested, more bugfixes etc etc etc , so really, I highly recommend you start from scratch and use the utilities. I'll be writing another blog entry soon on what's going on in my life and why blogging will be light for the next few months – big changes in my life ahead :)
If you find actual bugs with xrdp – you're best to contact the xrdp & X11rdp author Jay Sorg, who is a rather helpful chap. Look for the xrdp-devel mailing list and join that as well. Also, read the previous mailing-list messages as they may contain some info related to your problems – although to be honest it looks like something went wrong when you tried installing using this manual method :)
Best regards!
dme, hi again…
I updated my x11rdp-o-matic & RDPsesconfig utilities to v2.4 which includes a fix so the utilities will run properly in a non-English system.
At the same time I tested this version on a fresh Debian 6.0.5 installation, with a Japanese locale set (to test the fix).
The utilities compiled installed and configured xrdp & x11rdp perfectly, so like I suggest, perhaps do a reinstall of your system and then download and try v2.4
Let me know how you get on!
Regards.
Hi Kevin,
I have just installed X11rdp using X11RDP-o-Matic. While I can connect via RDP, regardless of what session do I use (Gnome, Gnome classic, Unity 2d,…) I can only see my desktop wallpaper, no panels, no icons, just empty desktop. I'm on Ubuntu 11.10.
Any idea how to fix this?
Thanks for your great work
Glypto
Hi Glypto,
Not sure if you've found a solution to your problem, but try this…
echo "gnome-session –session=ubuntu-2d" > ~/.xsession
You should get a UI – i had the same problem, and it worked for me…
Good luck!
G
Dear friends.
I've installed xrdp using the automatic process and I can log in my ubuntu 12.04 machine and run some programs there, but when I try to run a java program, a .jar one. The system freezes.
Any idea?
Thanks in advance and best wishes.
Is there a way to set the default to [xrdp1]? Right now I'm using this to connect to a local VM linux box, and I have the credentials saved, so I'd like to auto select xrdp1 config without me having to hit ok at the "Login to xrdp" screen. That is, I don't want to see that login prompt at all.
Cheers!
Chris
Hola amigo ahi tu sabes si ahi forma que cuando entre a la seccion xrpd el sistema me traiga un programa especifco Ejemplo que incie y me traiga solo el Editor de texto y que otro usuario inicie y el le muestre el navegador y asi por el estilo muchas gracias
—-
Hello friend there you know if there is that when you enter the system section XRPD bring me a specifc Example program that INCIE and bring me only the Text Editor and another user logs and show you the browser and so on many thanks
—
hi mr Kevin.
first of all i want to thank you for this tutorial.
i was able to follow the instruction of the ff:
sudo apt-get install subversion
svn co svn://server1.xrdp.org/srv/svn/repos/main/x11rdp_xorg71
sudo apt-get build-dep xserver-xorg-core
sudo apt-get install automake1.7 automake1.9
sudo mkdir /opt/X11rdp
cd x11rdp_xorg71
but when i get to
time sudo sh buildx.sh /opt/X11rdp
im having an error saying
sh: Can't open buildx.sh
I'm pretty sure i follwed everything can you help me with this?
Mathew hi,
This tutorial is kind of out of date now, did you try the automatic scripts I wrote?
Regards
Kevin
I am very impressed with your tutorial.
Thank you very much. I have 2 questions:
How to redirect the printer to your desktop?
How to redirect sound to your local desktop?
Thanks in advance.
Kumar
Kumar, for audio try my writeup at : http://scarygliders.net/2012/04/06/get-audio-with-your-xrdpx11rdp-connections-lan-or-remote/
For printers, well, I haven't had the opportunity to look into that yet, but port redirection via ssh might work, I wrote about ssh at : http://scarygliders.net/2012/04/04/secure-your-systems-with-ssh-on-linux-and-putty-on-windows-part-1/
Hope this helps!
I can confirm this approach and/or your scripts works fine in ubuntu 12.10 (provided of course you install the relevant window manager). I have it running a xfce session. I use it on my home desktop monster server to serve out desktops to my more limited but more mobile comptuters. I even used it with 12.10's remote login feature on the login screen which I'll admit is a cool feature but one that I probably won't use much (there are not ubuntu workstations lying around at work : ( )
Thanks for the scripts, the deb for xrdp is still not quite right in ubuntu. So this made everything work!
As Kevin Cave says, script very cool, but having problems with national characters. I use Ubuntu 12.04.1 LTS.
I install KDE:
apr-get install kde-standard
When I install X11rdp using this script. All working good, but in Dolphin Russian folders shows bad. IMHO because used ACSII charset, but operation system gets file and folder names in UTF8. So, non-english characters, which in UTF8 describes by 2 or more symbols, show incorrectly.
One more little problem: script not check, if I start it from xrdp session, and in a center of installing process, when it removes xrdp package, it hults with session. I understand, than stupid to start this script from xrdp session, but that about foolproof :)
Hi, a friend has installed ubuntu 12.04 and uses xrdp as you. But when we connect, everyone of us gets an own session, due to different screen resolutions, do you know, how we can work around this? and the same login data always uses the same session and if another one is already in, this one gets kicked? same functionality as in windows servers.
Michael, hi
You have multiple users wanting to log into the same session?
What you’re describing is in fact the correct way xrdp works – each different user on the system should have their own session, and also, if a different person logs on as an already logged-on user, and their resolution/colour depth is also the same, then whoever is logging on will grab that session and the other person will be kicked off – that’s what’s supposed to happen :)
Regards
Hi,
I used your script and they worked on ubuntu 12.10 64 bit!
Can you explain it please a bit more in detail how this achieve this. What I want to achieve is to connect to my office pc from my home office and there it should take my current session and shows all my open windows. A small howto would be great. Thanks,
Hmm, a tutorial on HOW to use x11rdp after it’s installed?
Excellent suggestion!
Regards!
Sorry for my dumb question … I thought maybe someone has the same problem and solved it. Although you already wrote that this is feasible thats why I hoped you can explain a bit more in detail, because I tried it and it does not work
Regards
Al, hi
No no! Your question wasn't dumb at all :)
This answer I gave in another post might be relevent to your question? : http://scarygliders.net/2012/06/20/x11rdp-o-matic-and-rdpsesconfig-version-2/comment-page-2/#comment-3470
Hope that helps
Regards,
Kevin.
You weren’t joking when you said it would take a while to compile x11rdp. I have a quiet day at work today and thought I’d play with my Raspberry Pi but I only have SSH access at the moment. This has been compiling for over four hours now. I knew it’d be slower on a Pi but I thought it’d be an hour or so tops.
Lol, it’s going to take a looooong time on a Pi :)
Regards!
I am using Kubuntu 12.04 and I followed the proceedure above, but I don’t get any windows manager in the RDP window (no matter what I try in .xsession or startwm.sh ….but if opened another term session on my local system and export DISPLAY=”:10″ I am then able to start xterm or gnome-session-fallback on the RDP session. I should say now that the execute rights are on both .xsession and startwm.sh
Any ideas how I resolve the issue – its driving me mad now!
Thanks
Hello Kevin,
First of all, thanks a lot for this great tutorial, very clear & helpful.
I installed xrdp/x11rdp on debian 6.0.
I’ve now just a little question, regarding the mouse pointer.
Cursor is black&white and pixeled, is there something to do ?
Thanks,
Best regards,
The source tree used in the above tutorial is pretty ancient now, and numerous things like your problem were corrected in more recent versions of x11rdp.
Try using the X11RDP-o-Matic v3.0beta3 – it’s really working quite good and uses the up-to-date source ;)
Hi Kevin. I have used the “X11RDP-o-Matic v3.0beta3” just yesterday and I’m getting the same mouse pointer issue (big, black & white and with no transparency over background -black box around it). OS is Xubuntu 12.04 running as a VirtualBox guest. No issue when running xrdp with vnc4server instead of X11rdp. Script don’t shown any error. I’ll gonna try to install the resulting DEB packages for xrdp and x11rdp on a Lubuntu VirtualBox guest and will report later.
Very usefull and valuable work! Running the script was a piece of cake! Thank you very much!
Try adding
new_cursors=no
in the [globals] section of /etc/xrdp.ini, restart xrdp, and log back in.It might solve your problem.
Hi, I really appreciate this site, and the script with –justdoit is pure golden, I have it working to some extent.
I am using ubuntu 12.10 and I can’t seem to open the active session no matter what I do?
any ideas tips or other would be greatly appreciated!
Sincerely
X.
I am running Xubuntu 13.04 on a Hyper-V server and I had trouble installing using the automated process. The manual process above however worked first go. Thanks for the awesome set of instructions.
Hello, thanks for your nice tutorial. I am facing a problem while connecting to the Ubuntu server 12.04 from Windows 7 desktop. Every time I connect to the server, it takes me to the current existing session. But I want to open a new session, which can not be seen by other server user. Can you help me in this regard?
Try using a custom resolution – a new session will be created. If you want to reconnect to that other session, then specify the resolutionused when that session was started.
e.g. Session 1 – resolution == 1024×768 (or whatever)
Session 2 – resolution == 1024×770 (or whatever)
Reconnect to session 1 – use Session 1 size.
Reconnect to session 2 – use Session 2 size.
Lastly, you could always log in as a different user.
Regards.
This works in CrunchBang out of the box, following author’s build instructions. Add this to .xsession
openbox-session
If you want other window managers (jwm, xfce4, scrotwm, dwm) you must install them first
jwm
xfce4-session
scrotwm
dwm
I tested all 4 of these and they work with xrdp, although you must add some configuration to scrotwm and dwm or you won’t have any menus/options. I was using CrunchBang in a VirtualBox running on my Win7 desktop.
Here are a few other window managers to try if anyone has the time.
https://wiki.archlinux.org/index.php/Comparison_of_Tiling_Window_Managers
This is a really nice alternative to using a VNC server.
After testing this with Wireshark I get the feeling that SSL/TLS is not supported yet in X11Rdp. Anybody know anything about that? I read that RSA is being used if you set crypt_level=high in your xrdp.ini file (though I don’t know how to verify this in Wireshark), but I see no options for using SSL/TLS.
I can make SSL/TLS work when connecting to another windows box, and I can verify in Wireshark that the handshake is ocurring.
For me, when connecting to a VPS over a WAN, strong encryption is a must-have.
[…] BOX Recent CommentsDustin on X11rdp, Ubuntu 11.10, Gnome 3, xrdp customization – New Hotness! Updated!Matthias J. on X11rdp, Ubuntu 11.10, Gnome 3, xrdp customization – New Hotness! Updated!Kevin […]