From matthew.l.dailey@dartmouth.edu  Mon Mar 25 17:36:43 2013
Received: (at submit) by bugs.x2go.org; 25 Mar 2013 16:36:44 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,
	URIBL_BLOCKED autolearn=ham version=3.3.2
X-Greylist: delayed 1123 seconds by postgrey-1.34 at ymir; Mon, 25 Mar 2013 17:36:42 CET
Received: from mailhub2.dartmouth.edu (mailhub2.Dartmouth.EDU [129.170.17.107])
	by ymir (Postfix) with ESMTPS id BA2855DB1E
	for <submit@bugs.x2go.org>; Mon, 25 Mar 2013 17:36:42 +0100 (CET)
Received: from schultz.kiewit.dartmouth.edu (Schultz.Kiewit.Dartmouth.EDU [129.170.70.6])
	(authenticated bits=0)
	by mailhub2.dartmouth.edu (8.13.5/DND2.0/8.13.5) with ESMTP id r2PGHaHG002850
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO)
	for <submit@bugs.x2go.org>; Mon, 25 Mar 2013 12:17:42 -0400
From: "Matthew L. Dailey" <matthew.l.dailey@dartmouth.edu>
Content-Type: multipart/mixed; boundary="Apple-Mail=_8623FD7E-BFD8-4CA5-9025-121750F8C3AA"
Subject: Profile files not being sources in x2goserver-xsession
Message-Id: <6771F3F3-D07E-414B-BD54-FB5862F08767@dartmouth.edu>
Date: Mon, 25 Mar 2013 12:17:33 -0400
To: "submit@bugs.x2go.org" <submit@bugs.x2go.org>
Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\))
X-Mailer: Apple Mail (2.1503)
X-MailScanner: Found to be clean by mailhub2.dartmouth.edu
X-MailScanner-From: matthew.l.dailey@dartmouth.edu


--Apple-Mail=_8623FD7E-BFD8-4CA5-9025-121750F8C3AA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

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.=20

--=20
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@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=3D/etc/x2go/Xsession.options


--Apple-Mail=_8623FD7E-BFD8-4CA5-9025-121750F8C3AA
Content-Disposition: attachment;
	filename=xsession.patch
Content-Type: application/octet-stream;
	name="xsession.patch"
Content-Transfer-Encoding: 7bit

--- 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@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

--Apple-Mail=_8623FD7E-BFD8-4CA5-9025-121750F8C3AA--

