From unknown Wed Apr 08 23:38:18 2026
MIME-Version: 1.0
X-Mailer: MIME-tools 5.507 (Entity 5.507)
X-Loop: owner@bugs.x2go.org
From: owner@bugs.x2go.org (X2Go Bug Tracking System)
Subject: Bug#1035 closed by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
 (Re: [X2Go-Dev] Bug#1035: capture x2goruncommand debug output for
 x2gofeature X2GO_XSESSION)
Message-ID: <handler.1035.b1035.154283189011292.notifdone@bugs.x2go.org>
References: <20181121202340.Horde.a6V0o-rUiboXmoeuBtjnqn2@mail.das-netzwerkteam.de>
X-X2go-PR-Keywords: patch
X-X2go-PR-Message: they-closed 1035
X-X2go-PR-Package: x2goserver
X-X2go-PR-Source: x2goserver
Date: Wed, 21 Nov 2018 20:25:03 +0000
Content-Type: multipart/mixed; boundary="----------=_1542831903-11359-0"

This is a multi-part message in MIME format...

------------=_1542831903-11359-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

This is an automatic notification regarding your Bug report
which was filed against the x2goserver package:

#1035: capture x2goruncommand debug output for x2gofeature X2GO_XSESSION

It has been closed by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Mike Gabriel <mike.gab=
riel@das-netzwerkteam.de> by
replying to this email.


--=20
1035: http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=3D1035
X2Go Bug Tracking System
Contact owner@bugs.x2go.org with problems

------------=_1542831903-11359-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 1035) by bugs.x2go.org; 21 Nov 2018 20:24:50 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.1 required=3.0 tests=BAYES_00,RDNS_NONE,
	URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 3A1875DAED
	for <1035@bugs.x2go.org>; Wed, 21 Nov 2018 21:24:47 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id HtdjbKwRcNUa for <1035@bugs.x2go.org>;
	Wed, 21 Nov 2018 21:24:39 +0100 (CET)
Received: from fregna.das-netzwerkteam.de (unknown [IPv6:2a01:4f8:202:1381::1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 3B54E5DACB
	for <1035@bugs.x2go.org>; Wed, 21 Nov 2018 21:24:39 +0100 (CET)
Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [148.251.201.105])
	by fregna.das-netzwerkteam.de (Postfix) with ESMTPS id 2194A60533;
	Wed, 21 Nov 2018 20:24:39 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 1E66AC261A;
	Wed, 21 Nov 2018 21:24:39 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de
Received: from grimnir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id nFUNvniPSj-V; Wed, 21 Nov 2018 21:24:33 +0100 (CET)
Received: from das-netzwerkteam.de (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id 743DFC26B4;
	Wed, 21 Nov 2018 21:23:40 +0100 (CET)
Received: from [37.123.126.38] ([37.123.126.38]) by mail.das-netzwerkteam.de
 (Horde Framework) with HTTPS; Wed, 21 Nov 2018 20:23:40 +0000
Date: Wed, 21 Nov 2018 20:23:40 +0000
Message-ID: <20181121202340.Horde.a6V0o-rUiboXmoeuBtjnqn2@mail.das-netzwerkteam.de>
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: Tor Perkins <x2go34@noid.net>, 1035@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1035: capture x2goruncommand debug output for
 x2gofeature X2GO_XSESSION
In-Reply-To: <20160514145720.6FA7F32B800B@noid.net>
User-Agent: Horde Application Framework 5
Accept-Language: de,en
Organization: DAS-NETZWERKTEAM
X-Originating-IP: 37.123.126.38
X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Firefox/60.0
Content-Type: multipart/signed; boundary="=_L9wnEYCcnY5Ng5mELw8OV8m";
 protocol="application/pgp-signature"; micalg=pgp-sha256
MIME-Version: 1.0

This message is in MIME format and has been PGP signed.

--=_L9wnEYCcnY5Ng5mELw8OV8m
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Control: fixed -1 4.0.1.20
Control: close -1

Hi Tor,

On  Fr 13 Mai 2016 18:58:12 CEST, Tor Perkins wrote:

> Package: x2goserver
> Version: 4.0.1.19
> Tags: patch
>
>
> Hello,
>
> I had recently had a problem with my /etc/xprofile file that
> prevented session startup.  The details are not too important; it
> had to do with a difference of default shell (/bin/sh) being either
> /bin/dash or /bin/bash.
>
> After enabling the 'debug' loglevel on the server, I still had no
> helpful output indicating what the problem might be...
>
> I did some ferreting about and noticed that x2goruncommand was not
> capturing cmd output when using x2gofeature X2GO_XSESSION
> (/etc/x2go/Xsession).  The client side invocation of x2goruncommand
> (via sshlib) redirects remote command output to /dev/null, so it is
> also not preserved when using the client's --debug option...
>
> This small patch appends the missing output to an already existing
> debug file in x2goruncommand ($MESSAGE_FILE).  With this in place, I
> was able to see the "smoking gun":
>
>   cat ~/.x2go/C-user-50-1463156913_stD.Xclients_dp24/cmdoutput
>
>     exec /root/.Xclients
>     Loading profile from /etc/profile
>     Loading profile from /root/.profile
>     Loading profile from /etc/xprofile
>     /etc/xprofile: 14: Bad substitution        <--  whoop!
>
> The file is deleted (as before) if not at loglevel debug.
>
> Thanks for your consideration.
>
> - Tor

You may have missed it, as this bug never got closed. However, your=20=20
patch=20became part of 4.0.1.20.

So closing this bug manually now. Thanks for your patch.

Mike
--=20

DAS-NETZWERKTEAM
mike=20gabriel, herweg 7, 24357 fleckeby
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de


--=_L9wnEYCcnY5Ng5mELw8OV8m
Content-Type: application/pgp-signature
Content-Description: Digitale PGP-Signatur
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIzBAABCAAdFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAlv1vssACgkQmvRrMCV3
GzHYfQ/9FLsta42MxXaiPBlq7P5lZpVcIVRPe+/4pdyaxZ92pHnj1db+YzLjOIiJ
ZsAN49lxa2OKmRxJpFo6Y3l7AfPWuUfhyqAR5DFID/6vwb85LQOrHqEyjvyoR7Ui
PGpt3N2ygr6OGtMS/f3f9or745JOIWkRy0IKdtCBpaSg8Y4Xrk+njNVKa5iMj2aQ
QuOtRNg0aAT+txYO76slouypCMyi5TsMhcPQIQUo8sIVzahlf+AES1TNLqbEQCBz
MlHQSxFW9ACgEDTU/mm4LWwBmOSy75zFt/h0UtNAaogD1+qtqWJwgDAG3FyA3wcI
QHgBnyh4SB3PyBHGzoz7qQcQZqjbp4V4Iera6SxB3Oqk3YQG+ZgW1eTmHc+TjD1e
lYzxABQNTH3kgKEyVpMH1JHuQ84ri/F4Eq1IbGsA5MrL4Nmk80AfJyfPPGFO4XpG
XMTasZFrrbaPg/3d2U0ybMzz+KpEDFiXtIniEhyp8nCSwKUzFdCtbTgFwFNtS5Ln
c+8ntrrNR2YkaAK6TajNUltGin21JRhU20eVNJLnPn941NACb2eBYyZSGTa/szme
mRXEmiBOwhskOSv9C6BUsrHKli6ZXTKDj66o0obDRWxJYFeRoFlDx7MLQAsmevrf
GBBQ7mF4Q9RQQ+qzR4R6SfDq1T0ZKJ8MUisJKRAnRAK7ssn8n0w=
=u7R7
-----END PGP SIGNATURE-----

--=_L9wnEYCcnY5Ng5mELw8OV8m--


------------=_1542831903-11359-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by bugs.x2go.org; 14 May 2016 14:57:31 +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=1.8 required=3.0 tests=BAYES_50,DATE_IN_PAST_12_24
	autolearn=no version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 12D2F5DACF
	for <submit@bugs.x2go.org>; Sat, 14 May 2016 16:57:30 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id oRzhG8+ncvvb for <submit@bugs.x2go.org>;
	Sat, 14 May 2016 16:57:23 +0200 (CEST)
Received: from anoid.noid.net (anoid.noid.net [74.95.194.161])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id CFEF65DA8E
	for <submit@bugs.x2go.org>; Sat, 14 May 2016 16:57:22 +0200 (CEST)
Received: from anoid.noid.net (localhost.noid.net [127.0.0.1])
	by anoid.noid.net (GNU) with ESMTP id bfa35010
	for <submit@bugs.x2go.org>;
	Sat, 14 May 2016 07:57:21 -0700 (PDT)
From: Tor Perkins <x2go34@noid.net>
Date: Fri, 13 May 2016 09:58:12 -0700
Subject: capture x2goruncommand debug output for x2gofeature X2GO_XSESSION
To: submit@bugs.x2go.org
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.7.2.5"
Message-ID: <20160514145720.6FA7F32B800B@noid.net>
X-Mini-Diatribe: To fix America:
	1. Cut government in half
	2. Wait thirty years
	3. Repeat as necessary

This is a multi-part message in MIME format.
--------------1.7.2.5
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

Package: x2goserver
Version: 4.0.1.19
Tags: patch


Hello,

I had recently had a problem with my /etc/xprofile file that
prevented session startup.  The details are not too important; it
had to do with a difference of default shell (/bin/sh) being either
/bin/dash or /bin/bash.

After enabling the 'debug' loglevel on the server, I still had no
helpful output indicating what the problem might be...

I did some ferreting about and noticed that x2goruncommand was not
capturing cmd output when using x2gofeature X2GO_XSESSION
(/etc/x2go/Xsession).  The client side invocation of x2goruncommand
(via sshlib) redirects remote command output to /dev/null, so it is
also not preserved when using the client's --debug option...

This small patch appends the missing output to an already existing
debug file in x2goruncommand ($MESSAGE_FILE).  With this in place, I
was able to see the "smoking gun":

  cat ~/.x2go/C-user-50-1463156913_stD.Xclients_dp24/cmdoutput

    exec /root/.Xclients
    Loading profile from /etc/profile
    Loading profile from /root/.profile
    Loading profile from /etc/xprofile
    /etc/xprofile: 14: Bad substitution        <--  whoop!

The file is deleted (as before) if not at loglevel debug.

Thanks for your consideration.

- Tor



--------------1.7.2.5
Content-Type: text/x-patch; name="0001-capture-x2goruncommand-debug-output-for-x2gofeature-.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-capture-x2goruncommand-debug-output-for-x2gofeature-.patch"

diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index 43b4064..0ca2e35 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -313,7 +313,7 @@ if [ "$EXEC" != "" ] && [ -x "$EXEC" ]; then
 	if x2gofeature X2GO_XSESSION &>/dev/null && [ "x$X2GO_SESS_TYPE" = "xD" ]; then
 		STARTUP="$cmd$args"
 		"$X2GO_LIB_PATH/x2gosyslog" "$0" "notice" "launching session with Xsession-x2go mechanism, using STARTUP=\"$STARTUP\""
-		XSESSION_EXEC="$cmd" STARTUP="/usr/bin/env LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${STARTUP}" /etc/x2go/Xsession
+		XSESSION_EXEC="$cmd" STARTUP="/usr/bin/env LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${STARTUP}" /etc/x2go/Xsession >>"$MESSAGE_FILE" 2>&1
 	else
 		"$X2GO_LIB_PATH/x2gosyslog" "$0" "debug" "executing command \"$cmd$args\"..."


--------------1.7.2.5--

------------=_1542831903-11359-0--
