[X2Go-Dev] Bug#149: Profile files not being sources in x2goserver-xsession
Matthew L. Dailey
matthew.l.dailey at dartmouth.edu
Mon Mar 25 17:17:33 CET 2013
Package: x2goserver
Version: 4.1.0.0
Greetings,
When launching X sessions, x2goserver-xsession does not source the following files:
/etc/profile
$HOME/.profile
/etc/xprofile
$HOME/.xprofile
This can lead to problems if important things are needed from these files, usually PATH additions. I've looked at a couple of greeters - lightdm and gdm - and each of these source these files within their Xsession script.
So, the fix is to just use the same logic in the Xsession script within x2goserver-xsession. Below (and attached) is a patch based on code from the lightdm Xsession script.
Thanks for your attention and please let me know if you have any questions or need any other information.
--
Matthew L. Dailey
Systems Administrator
Thayer School of Engineering
Dartmouth College
--- Xsession.orig 2013-03-25 11:41:16.629002598 -0400
+++ Xsession 2013-03-25 11:54:44.588718173 -0400
@@ -49,6 +49,14 @@
"<x2go-dev at lists.x2go.org>."
}
+# Load profile
+for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
+ if [ -f "$file" ]; then
+ echo "Loading profile from $file";
+ . "$file"
+ fi
+done
+
# initialize variables for use by all session scripts
OPTIONFILE=/etc/x2go/Xsession.options
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xsession.patch
Type: application/octet-stream
Size: 471 bytes
Desc: not available
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20130325/a509569a/attachment.obj>
More information about the x2go-dev
mailing list