Public bug reported:

System : Kubuntu 20.04 LTS (although application to other Ubuntu flavours)
XRDP : 0.9.12-1

xrdp project member here.

While working on an xrdp issue
(https://github.com/neutrinolabs/xrdp/issues/1773) we ascertained that
the PATH elements /bin and /usr/bin were swapped between a console
session and an xrdp session.

The consequence of this was that the timeshift-gtk executable was being
found in /bin on the xrdp session. Consequently, polkit was unable to
find the correct action to apply, and the invocation failed. When run
explicitly from /usr/bin, the invocation succeeded.

Further investigation showed that for most login methods, pan_env.so is
being used to set the PATH (and indeed the locale). For Kubuntu
graphical console logins, this is done in /etc/pam.d/sddm, for Ubuntu
this is done in /etc/pam.d/gmm-password and for Xubuntu this is done in
/etc/pam.d/lightdm.

For xrdp issue #1773, we resolved user's immediate problem by applying
this patch to /etc/xrdp/startwm.sh:-

--- startwm.sh.orig     2021-01-13 13:02:36.017117908 +0000
+++ startwm.sh  2021-01-12 13:50:10.396884171 +0000
@@ -2,6 +2,11 @@
 # xrdp X session start script (c) 2015, 2017 mirabilos
 # published under The MirOS Licence
 
+# Emulate pam_env.so
+if test -r /etc/environment; then
+    . /etc/environment
+fi
+
 if test -r /etc/profile; then
        . /etc/profile
 fi

Note that this file is an upstream file to the xrdp project.

This bug is a request to either adopt the patch above, or include the
corresponding pam_env calls in /etc/pam.d/xrdp-sesman. An advantage of
the second is that I believe you would be able to remove the locale
stuff from /etc/xrdp/startwm.sh, but I haven't tested this.

** Affects: xrdp (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to xrdp in Ubuntu.
https://bugs.launchpad.net/bugs/1911435

Title:
  xrdp session is not using the same PATH as a console session

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xrdp/+bug/1911435/+subscriptions

-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to