Subject: x2go session environment broken

From: Henning Schild <[email-masked]>
Date: Mon, 16 Nov 2015 19:38:48 +0100

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

>From 853e1d6152fc09c1255cd009b7b4630f3d984a7e Mon Sep 17 00:00:00 2001
From: Henning Schild <[email-masked]>
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 <[email-masked]>
---
 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