Subject: Bug#820: [X2Go-Dev] Bug#820: Fwd: Patch: x2goserver: x2goruncommand - set IMEXIT="true" for gnome-terminal

From: Rok Mandeljc <[email-masked]>
Date: Tue, 17 Mar 2015 11:09:02 +0100

On 17. 03. 2015 07:02, Mihai Moldovan wrote:
> Control: submitter -1 Rok Mandeljc <[email-masked]>
> Thanks
>
>
> On 17.03.2015 06:41 AM, Mihai Moldovan wrote:
>> I have been trying to set up x2goserver on my Fedora 21 boxes, and
>> gnome-terminal seems to be failing with symptoms similar to those
>> described in #268.
>>
>> It seems that x2goruncommand has been reworked a bit since that patch,
>> and now attempts to force the forking programs to stay in the foreground
>> by capturing their output to STDOUT. Unfortunately, this does not seem
>> to work for gnome-terminal; the terminal window appears on the client
>> for a second, then closes and the session is proclaimed to be finished.
>> This can be fixed by explicitly setting IMEXIT="true" if called binary
>> is gnome-terminal, which is done by the attached patch.
> This looked weird at first glance, because you've previously (two years
> ago) sent a patch to explicitly disable IMEXIT for GNOME Terminal.
>
> However, Mike#1 changed the IMEXIT behavior with commit
> c3afe1c154dfeb0ba052f7506f0cadc5f6c62871 and that's also why it's now
> failing for GNOME Terminal.

Indeed :)

> I'll be adding IMEXIT="true" and your comment where gnome-terminal is
> defined, if that's OK with you?

If you are talking about the if [ "$cmd" == "TERMINAL" ] switch, then I
think it will not fix the case when session is "single command" and the
"gnome-terminal" is manually entered as a binary (with or without path).
I use such session definition on couple of workstations that have both
KDE and GNOME installed to get gnome-terminal instead of konsole... Not
sure how wide-spread that use case is, though; or if it could perhaps be
done better?

>
> Will craft and commit a patch tomorrow.
>
> Thanks for contributing!
>
>
>
> Mihai
>
>
> N.B.: shouldn't this be also required for KDE4's konsole? Looks like it,
> but I'm not a KDE user, so... input welcome.

Capturing konsole's output to STDOUT seems to do the trick, at least at
the moment. So for now, it works correctly without setting IMEXIT.

Regards,
    Rok