From henning@hennsch.de  Mon Nov 16 19:38:48 2015
Received: (at submit) by bugs.x2go.org; 16 Nov 2015 18:38:49 +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=-0.5 required=5.0 tests=BAYES_05,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from wp038.webpack.hosteurope.de (wp038.webpack.hosteurope.de [80.237.132.45])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id C60DC5DA53
	for <submit@bugs.x2go.org>; Mon, 16 Nov 2015 19:38:47 +0100 (CET)
Received: from aftr-88-217-180-90.dynamic.mnet-online.de ([88.217.180.90] helo=localhost); authenticated
	by wp038.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	id 1ZyOfv-0002aC-Hq; Mon, 16 Nov 2015 19:38:47 +0100
Date: Mon, 16 Nov 2015 19:38:48 +0100
From: Henning Schild <henning@hennsch.de>
To: submit@bugs.x2go.org
Subject: x2go session environment broken
Message-ID: <20151116193848.2bc2e443@hennsch.de>
X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="MP_/S0Q0Xs9aoKvcVM5XZ_W+xa1"
X-bounce-key: webpack.hosteurope.de;henning@hennsch.de;1447699127;713834df;

--MP_/S0Q0Xs9aoKvcVM5XZ_W+xa1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: x2goserver
Tag: patch
Version: bfe3ba761c1d3e9143285ca17edc87ac763ce35d

Hi,

i have been using x2go for years, also on servers where i needed to
set environment variables for proxies etc. A regular x2go-session fails
to include stuff that is configured in /etc/env.d/ and /etc/profile.d/.
I think those directories are actually distro specific, the solution is
to start everything in a login shell.

For me the attached patch helps setting environment variables on several
debian systems, i did not test on other distros.

Henning
--MP_/S0Q0Xs9aoKvcVM5XZ_W+xa1
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename=0001-x2goruncommand-use-a-login-shell-for-the-commands.patch

>From 853e1d6152fc09c1255cd009b7b4630f3d984a7e Mon Sep 17 00:00:00 2001
From: Henning Schild <henning@hennsch.de>
Date: Mon, 16 Nov 2015 18:51:04 +0100
Subject: [PATCH] x2goruncommand: use a login-shell for the commands

x2go should use a login-shell when starting new sessions. That way the
whole environment will be like having logged in locally or via ssh.
Without a login shell environment setup by /etc/env.d/ and
/etc/profile.d/ wont be done.

Signed-off-by: Henning Schild <henning@hennsch.de>
---
 x2goserver/bin/x2goruncommand | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index fa62f71..ac69ec1 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 
 # Copyright (C) 2007-2015 X2Go Project - http://wiki.x2go.org
 #
-- 
2.4.10


--MP_/S0Q0Xs9aoKvcVM5XZ_W+xa1--

