X2Go Bug report logs - #149
Profile files not being sources in x2goserver-xsession

version graph

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: "Matthew L. Dailey" <matthew.l.dailey@dartmouth.edu>

Date: Mon, 25 Mar 2013 16:48:01 UTC

Severity: normal

Tags: patch, pending

Found in version 4.1.0.0

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 25 Mar 2013 16:36:44 +0000
From matthew.l.dailey@dartmouth.edu  Mon Mar 25 17:36:43 2013
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
[Message part 1 (text/plain, inline)]
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@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

[xsession.patch (application/octet-stream, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Wed Apr 24 08:33:55 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.