X2Go Bug report logs - #1035
capture x2goruncommand debug output for x2gofeature X2GO_XSESSION

version graph

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

Reported by: Tor Perkins <x2go34@noid.net>

Date: Sat, 14 May 2016 15:00:02 UTC

Severity: normal

Tags: patch

Found in version 4.0.1.19

Fixed in version 4.0.1.20

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

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1035; Package x2goserver. (Sat, 14 May 2016 15:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tor Perkins <x2go34@noid.net>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Sat, 14 May 2016 15:00:02 GMT) Full text and rfc822 format available.

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

From: Tor Perkins <x2go34@noid.net>
To: submit@bugs.x2go.org
Subject: capture x2goruncommand debug output for x2gofeature X2GO_XSESSION
Date: Fri, 13 May 2016 09:58:12 -0700
[Message part 1 (text/plain, inline)]
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


[0001-capture-x2goruncommand-debug-output-for-x2gofeature-.patch (text/x-patch, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1035; Package x2goserver. (Wed, 21 Nov 2018 20:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Wed, 21 Nov 2018 20:25:01 GMT) Full text and rfc822 format available.

Message #10 received at 1035@bugs.x2go.org (full text, mbox):

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
Date: Wed, 21 Nov 2018 20:23:40 +0000
[Message part 1 (text/plain, inline)]
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  
patch became part of 4.0.1.20.

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

Mike
-- 

DAS-NETZWERKTEAM
mike gabriel, 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

[Message part 2 (application/pgp-signature, inline)]

Marked as fixed in versions 4.0.1.20. Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to 1035-submit@bugs.x2go.org. (Wed, 21 Nov 2018 20:25:02 GMT) Full text and rfc822 format available.

Marked Bug as done Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to 1035-submit@bugs.x2go.org. (Wed, 21 Nov 2018 20:25:03 GMT) Full text and rfc822 format available.

Notification sent to Tor Perkins <x2go34@noid.net>:
Bug acknowledged by developer. (Wed, 21 Nov 2018 20:25:03 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Mon Dec 10 04:30:57 2018; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.