Public bug reported: In Ubuntu 14.04; package xrdp, version 0.6.0-1:
If /etc/X11/Xsession is not a /bin/sh script, xrdp sessions may not start. The trouble is that /etc/xrdp/startwm.sh begins with #!/bin/sh and executes Xsession with . /etc/X11/Xsession If Xsession contains anything that is not a valid /bin/sh command, an error may result; depending on the error, Xsession may misbehave (leaving an improperly-set-up session) or just exit (abruptly terminating the session). Live example: we have a heavily-localised Xsession file. It is a bash script; its first line is #!/bin/bash It contains some commands that are valid bash but not valid /bin/sh (== dash). They are sufficiently invalid that Xsession exits. Hence no one can make a useful session via RDP. The same Xsession file has worked for years with kdm, so it is not a general assumption that Xsession is a /bin/sh script; in fact I think the general X11 rule is that it's just some sort of executable. A simple fix is to replace the offending line in startwm.sh with exec /etc/X11/Xsession (Or just /etc/X11/Xsession without the exec, but it's the last line of the file, so there's no reason to keep the extra process hanging around.) This lets the kernel decide what to do about Xsession, #!/bin/bash tells it what to do, and everything works. Thanks! ** Affects: xrdp (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1693518 Title: xrdp fails if Xsession not /bin/sh script To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xrdp/+bug/1693518/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs