From unknown Tue Apr 28 11:05:46 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#820: Fwd: [X2Go-Dev] Patch: x2goserver: x2goruncommand - set IMEXIT="true" for gnome-terminal
Reply-To: Mihai Moldovan <ionic@ionic.de>, 820@bugs.x2go.org
Resent-From: Mihai Moldovan <ionic@ionic.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Tue, 17 Mar 2015 05:45:02 +0000
Resent-Message-ID: <handler.820.B.142657088311157@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 820
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.142657088311157
          (code B); Tue, 17 Mar 2015 05:45:02 +0000
Received: (at submit) by bugs.x2go.org; 17 Mar 2015 05:41:23 +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.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID,
	URIBL_BLOCKED autolearn=ham version=3.3.2
Received: from Root24.de (powered.by.root24.eu [5.135.3.88])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id B5CE25DAA2
	for <submit@bugs.x2go.org>; Tue, 17 Mar 2015 06:41:19 +0100 (CET)
Received: from nopileos.local (home.ionic.de [217.92.117.31])
	by mail.ionic.de (Postfix) with ESMTPSA id 6D4D44F08961;
	Tue, 17 Mar 2015 06:41:18 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ionic.de; s=default;
	t=1426570878; bh=/Z7mVXliFOVUobCnKzuBwkTHB7IlwuhmkzKsrewp5Qo=;
	h=Date:From:To:Subject:References:In-Reply-To:From;
	b=fCeM4ZwcSLeEFo6Jf6tsB/KVe3rXt+8deA1Nvj5z42XC99eEZFpyB2rH84bO37USy
	 Gu/7ciC8EZYSeO8SuY5mgpKpnLhP2y58ve5H0SL9nWCL0yGW1PBHB77al/iOYHWt76
	 xhm2jG46HbyF2Ht+ZbSUVgevPA1RWArnPDyK3o9Q=
Message-ID: <5507BE76.1060309@ionic.de>
Date: Tue, 17 Mar 2015 06:41:10 +0100
From: Mihai Moldovan <ionic@ionic.de>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: submit@bugs.x2go.org, Rok Mandeljc <rok.mandeljc@gmail.com>
References: <550752A1.1070807@gmail.com>
In-Reply-To: <550752A1.1070807@gmail.com>
X-Forwarded-Message-Id: <550752A1.1070807@gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="I5XJWLDcKIDClJ9hwKiLRattj196ndR8q"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--I5XJWLDcKIDClJ9hwKiLRattj196ndR8q
Content-Type: multipart/mixed;
 boundary="------------020204030301070602080807"

This is a multi-part message in MIME format.
--------------020204030301070602080807
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Package: x2goserver
Version 4.0.1.19
Tag: patch
Submitter: Rok Mandeljc <rok.mandeljc@gmail.com>


-------- Forwarded Message --------
Subject: 	[X2Go-Dev] Patch: x2goserver: x2goruncommand - set
IMEXIT=3D"true" for gnome-terminal
Date: 	Mon, 16 Mar 2015 23:01:05 +0100
From: 	Rok Mandeljc <rok.mandeljc@gmail.com>
To: 	x2go-dev@lists.x2go.org



Hello,

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=3D"true" if called binary
is gnome-terminal, which is done by the attached patch.

Regards,
    Rok






--------------020204030301070602080807
Content-Type: text/x-patch;
 name="0001-x2goruncommand-set-IMEXIT-true-if-called-binary-is-g.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename*0="0001-x2goruncommand-set-IMEXIT-true-if-called-binary-is-g.pa";
 filename*1="tch"

=46rom 55078582d8ed695b44c0bb564765636326c0c0f3 Mon Sep 17 00:00:00 2001
From: Rok Mandeljc <rok.mandeljc@gmail.com>
Date: Mon, 16 Mar 2015 22:41:12 +0100
Subject: [PATCH] x2goruncommand: set IMEXIT=3D"true" if called binary is
 gnome-terminal

The STDOUT trick used by x2goruncommand to keep programs that fork
to background (sort of) in the foreground does not seem to have
the desired effect with gnome-terminal on Fedora 21. To make it
work, IMEXIT needs to be set to "TRUE".
---
 x2goserver/bin/x2goruncommand | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncomman=
d
index ac7ff7f..5bda27b 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -274,6 +274,14 @@ then
 	fi
 fi
=20
+# A work-around for gnome-terminal; the application quits immediately,
+# and we cannot keep it in foreground with STDOUT trick
+if [ "$BNAME" =3D=3D "gnome-terminal" ]
+then
+        IMEXIT=3D"true"
+fi
+
+
 if [ "$X2GO_SESS_TYPE" =3D=3D "P" ]
 then
 	IMEXIT=3D"true"
--=20
2.1.0



--------------020204030301070602080807
Content-Type: text/plain; charset=UTF-8;
 name="Attached Message Part"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="Attached Message Part"

_______________________________________________
x2go-dev mailing list
x2go-dev@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-dev

--------------020204030301070602080807--

--I5XJWLDcKIDClJ9hwKiLRattj196ndR8q
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJVB757AAoJEB/WLtluJTqHCAIQAMe1aeWh9KEoRnvVM+CjB8A2
4NYs9OmdPqx27vnpNStSn8SAEXYrfbeSvW1JGQbFNMGzD1abLcm40mqBMk+i/vRM
9HcCzxFcjI3H9uEBooQEHo14+9atTEHXz6tzioQgSNUxn+D9TvVxygYAyE5QFyMs
TXnWu9LuKqBXKHL/MeHUFyIkwVs0v7g6qaFPJb0j0lmhjKpBIwOWPGjsi627bP0r
/mcB9GKEAfJm9exiKt5hpdWQc9yeF0AqaoyXUZY8q83WqXM7cUmBKU1j6qnYvyIs
eo1kkQgUqhSfUEfQbw9Z5eUhQ1e/rnpEaqoL61VCHnKiGc4GW/glfdTq7H66QLz5
x3U8GbNgUn8oXgtX/26y9dv3inVrvnGqdZPpYXyPSpfZObwR3yqSAlatCCDJUcPK
YXWIwpCfmPR9kBGrn/oNVnrBCpu6oIsu70xQGNRuVUb9s2XaMjFtNqdeJwiwft9w
viZVbucK70LQ7CaD+UvU8iez+9crhhxXVMtzmgDRTLsNY1LtyZtEeaQYZEPF/Sf0
FMZtU3BrZgixt/lCaOcGkd0iz0pAlIl3CmHgme9Hy+jBiN6yOIAuoiQj5hEDyFbn
r3L8VH0tpqF4rLnQ0a0bznvhl16IHtG89r2b23pcQyXAGjGYYW4p8m7gMf/HpKjg
mA0g3w8l8JDRMSia/Dd2
=NvSR
-----END PGP SIGNATURE-----

--I5XJWLDcKIDClJ9hwKiLRattj196ndR8q--
