From unknown Thu Apr 09 08:24:46 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#155: [X2Go-Dev] Multiple X2goclient instances fail (patch)
Reply-To: Eugene San <eugenesan@gmail.com>, 155@bugs.x2go.org
Resent-From: Eugene San <eugenesan@gmail.com>
Resent-To: x2go-dev@lists.berlios.de
Resent-CC: X2Go Developers <x2go-dev@lists.berlios.de>
X-Loop: owner@bugs.x2go.org
Resent-Date: Fri, 07 Jun 2013 06:18:02 +0000
Resent-Message-ID: <handler.155.B155.137058530415469@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 155
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: moreinfo patch
Received: via spool by 155-submit@bugs.x2go.org id=B155.137058530415469
          (code B ref 155); Fri, 07 Jun 2013 06:18:02 +0000
Received: (at 155) by bugs.x2go.org; 7 Jun 2013 06:08:24 +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=0.0 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,
	RCVD_IN_DNSWL_BLOCKED,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham version=3.3.2
Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45])
	by ymir (Postfix) with ESMTPS id 07DEA5DB20
	for <155@bugs.x2go.org>; Fri,  7 Jun 2013 08:08:22 +0200 (CEST)
Received: by mail-pb0-f45.google.com with SMTP id mc8so4265839pbc.32
        for <155@bugs.x2go.org>; Thu, 06 Jun 2013 23:08:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :cc:content-type;
        bh=zCI5aLUiogbo1X/YuVCb2dyKbunjuaRFPo0E0RwVyKM=;
        b=S0k0DbwdS/HH4A9mj25ydh+DHNsS3yquAEoZvkhLCT8yzbhQEp65WhQNHIS1KfNnAj
         OGf536spcK6rPnFITP0ludjP/mt234Ty4hGTzSzIMC3ztvTD3dzNp7G4SYK3U7xsbAjT
         Ck3sy6GktKUL6SUn1YSlUVPODGACL+QZEqde/eHQJEF4LpfUObLhPCn2W/TfhtSJAGeH
         vyMBjyprLM30Gv5w5OqXCkV2bhnlf7wxL4jfeqeYIJp6JIcbYc+zpuJn5rvDPu2KV1r/
         TAYKVPvcf3+ZesXLjPhu7q0tDGGF6ypijH9Q0orwrNlJCSAW9Md4j5gpeMRCP57FfdcR
         UFzg==
X-Received: by 10.68.96.193 with SMTP id du1mr1773370pbb.142.1370585300376;
 Thu, 06 Jun 2013 23:08:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.70.58.135 with HTTP; Thu, 6 Jun 2013 23:08:00 -0700 (PDT)
In-Reply-To: <20130606010105.68542iznst745wdt@mail.das-netzwerkteam.de>
References: <CAAVBiEVdX4=b9dAVOk9BMSKAwa-hmxXmbsvjBpDQyefjU8+3iA@mail.gmail.com>
 <20130606010105.68542iznst745wdt@mail.das-netzwerkteam.de>
From: Eugene San <eugenesan@gmail.com>
Date: Fri, 7 Jun 2013 09:08:00 +0300
Message-ID: <CAAVBiEUGgUoFwUYzQ=OzPjG9xaziY3VqkzwCc+cJABXKabmNEQ@mail.gmail.com>
To: x2go-dev@lists.berlios.de
Cc: 155@bugs.x2go.org
Content-Type: multipart/mixed; boundary=047d7b624b7af6a4f804de8a4138

--047d7b624b7af6a4f804de8a4138
Content-Type: multipart/alternative; boundary=047d7b624b7af6a4f504de8a4136

--047d7b624b7af6a4f504de8a4136
Content-Type: text/plain; charset=UTF-8

Hello,

The patch you offered tries to solve a bit different problem than mine.
My problem is connecting to multiple x2go servers from single client.
However I find your patch very useful for "reversed" situation, described
in bug #155
Also replacing perl usage with awk is probably a good thing.

And thank you for noticing problem with my previous patch.
New patch attached seems to be working fine.

Regards



On Thu, Jun 6, 2013 at 2:01 AM, Mike Gabriel <
mike.gabriel@das-netzwerkteam.de> wrote:

> Hi Thomas, hi Eugene,
> ugene
>
> On Mi 05 Jun 2013 06:33:15 CEST Eugene San wrote:
>
>  Hi all,
>>
>> This subject was already discussed here, but since no solution exists till
>> now, I've hacked not ideal but practical solution.
>>
>> Attached patch should minimize chances of conflicting ports x2goserver is
>> using.
>> On the first run, x2gostartagent script randomly selects ports from
>> specific range (30000-30099) and save them to config file to be used for
>> the following sessions.
>> Later one can tune those values in config file
>> (/etc/x2go/x2goagent.options).
>>
>> Regards
>>
>>
> Eugene: the patch your provided via x2go-dev ML won't work (as
> x2goagent.options cannot be written by the user).
>
> However, here is another patch that you and Thomas (the submitter of issue
> #155 in X2Go BTS) may test with your class room setups.
>
> Patch is attached. Please give feedback. The patch reverts some code
> introduced in x2goserver 3.1.1.3 (or so).
>
> Thanks+Greets,
> Mike
>
>
> --
>
> DAS-NETZWERKTEAM
> mike gabriel, herweg 7, 24357 fleckeby
> fon: +49 (1520) 1976 148
>
> GnuPG Key ID 0x25771B31
> mail: mike.gabriel@das-netzwerkteam.**de<mike.gabriel@das-netzwerkteam.de>,
> http://das-netzwerkteam.de
>
> freeBusy:
> https://mail.das-netzwerkteam.**de/freebusy/m.gabriel%40das-**
> netzwerkteam.de.xfb<https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb>
>

--047d7b624b7af6a4f504de8a4136
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>Hello,<br><br></div></div>The patch you off=
ered tries to solve a bit different problem than mine.<br>My problem is con=
necting to multiple x2go servers from single client.<br><span id=3D"result_=
box" class=3D"" lang=3D"en"><span class=3D"">However</span></span> I find y=
our patch very useful for &quot;reversed&quot; situation, described in bug =
#155<br>

Also replacing perl usage with awk is probably a good thing.<br><br>And tha=
nk you for noticing problem with my previous patch.<br></div><div>New patch=
 attached seems to be working fine.<br></div><div><br></div><div>Regards<br=
>

<br></div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quot=
e">On Thu, Jun 6, 2013 at 2:01 AM, Mike Gabriel <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:mike.gabriel@das-netzwerkteam.de" target=3D"_blank">mike.gabri=
el@das-netzwerkteam.de</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi Thomas, hi Eugene,<br>
ugene<div><div class=3D"h5"><br>
On Mi 05 Jun 2013 06:33:15 CEST Eugene San wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
This subject was already discussed here, but since no solution exists till<=
br>
now, I&#39;ve hacked not ideal but practical solution.<br>
<br>
Attached patch should minimize chances of conflicting ports x2goserver is<b=
r>
using.<br>
On the first run, x2gostartagent script randomly selects ports from<br>
specific range (30000-30099) and save them to config file to be used for<br=
>
the following sessions.<br>
Later one can tune those values in config file<br>
(/etc/x2go/x2goagent.options).<br>
<br>
Regards<br>
<br>
</blockquote>
<br></div></div>
Eugene: the patch your provided via x2go-dev ML won&#39;t work (as x2goagen=
t.options cannot be written by the user).<br>
<br>
However, here is another patch that you and Thomas (the submitter of issue =
#155 in X2Go BTS) may test with your class room setups.<br>
<br>
Patch is attached. Please give feedback. The patch reverts some code introd=
uced in x2goserver 3.1.1.3 (or so).<br>
<br>
Thanks+Greets,<br>
Mike<span class=3D"HOEnZb"><font color=3D"#888888"><br>
<br>
<br>
-- <br>
<br>
DAS-NETZWERKTEAM<br>
mike gabriel, herweg 7, 24357 fleckeby<br>
fon: +49 (1520) 1976 148<br>
<br>
GnuPG Key ID 0x25771B31<br>
mail: <a href=3D"mailto:mike.gabriel@das-netzwerkteam.de" target=3D"_blank"=
>mike.gabriel@das-netzwerkteam.<u></u>de</a>, <a href=3D"http://das-netzwer=
kteam.de" target=3D"_blank">http://das-netzwerkteam.de</a><br>
<br>
freeBusy:<br>
<a href=3D"https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwe=
rkteam.de.xfb" target=3D"_blank">https://mail.das-netzwerkteam.<u></u>de/fr=
eebusy/m.gabriel%40das-<u></u>netzwerkteam.de.xfb</a><br>
</font></span></blockquote></div><br></div>

--047d7b624b7af6a4f504de8a4136--
--047d7b624b7af6a4f804de8a4138
Content-Type: application/octet-stream; 
	name="x2goserver-4.0.0.2-postinst-config-ports.patch"
Content-Disposition: attachment; 
	filename="x2goserver-4.0.0.2-postinst-config-ports.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hhmys9id2

LS0tIGEvZGViaWFuL3gyZ29zZXJ2ZXIucG9zdGluc3QKKysrIGIvZGViaWFuL3gyZ29zZXJ2ZXIu
cG9zdGluc3QKQEAgLTEwMyw2ICsxMDIsMTggQEAKIAkJCWxuIC1zIC91c3Ivc2hhcmUvYXBwbGlj
YXRpb25zIC9ldGMveDJnby9hcHBsaWNhdGlvbnMgCiAJCWZpCiAKKwkJIyBjb25maWd1cmUgcHNl
dWRvLXVuaXF1ZSBwb3J0cyB0byBiZSB1c2VkIGJ5IFNTSCBhbmQgTlhBR0VOVDoKKwkJIyBzZWxl
Y3QgZnJvbSAzMDAwMC0zMDA5OSBbMzAwMDAgKGJhc2UpICsgNzkgKHJhbmRvbSkgKyAxMCAoeDJn
bykgKyAxMCAoc3NoKV0KKwkJaWYgISBncmVwIC1xIFgyR09fUE9SVCAvZXRjL3gyZ28veDJnb2Fn
ZW50Lm9wdGlvbnM7IHRoZW4KKwkJCVgyR09fUE9SVF9CQVNFPWBhd2sgJ0JFR0lOIHsgc3JhbmQo
KTsgcHJpbnRmICgiJWRcbiIsIGludChyYW5kKCkqNzkpKzEpOyB9J2AKKwkJCVgyR09fUE9SVD0k
KChYMkdPX1BPUlRfQkFTRSArIDMwMDAwKSkgIyBGaXJzdCBwb3J0IGZvciBYMkdPCisJCQlTU0hf
UE9SVD0kKChYMkdPX1BPUlRfQkFTRSArIDMwMDEwKSkgIyBGaXJzdCBwb3J0IGZvciBTU0gKKwkJ
CWVjaG8gIiIgPj4gL2V0Yy94MmdvL3gyZ29hZ2VudC5vcHRpb25zCisJCQllY2hvICIjIFBvcnRz
IHRvIGJlIHVzZWQgYnkgU1NIIGFuZCBOWEFHRU5UIiA+PiAvZXRjL3gyZ28veDJnb2FnZW50Lm9w
dGlvbnMKKwkJCWVjaG8gIiMiID4+IC9ldGMveDJnby94MmdvYWdlbnQub3B0aW9ucworCQkJZWNo
byAiWDJHT19QT1JUPSRYMkdPX1BPUlQiID4+IC9ldGMveDJnby94MmdvYWdlbnQub3B0aW9ucwor
CQkJZWNobyAiU1NIX1BPUlQ9JFNTSF9QT1JUIiA+PiAvZXRjL3gyZ28veDJnb2FnZW50Lm9wdGlv
bnMKKwkJZmkKIAkJOzsKIAogCWFib3J0LXVwZ3JhZGV8YWJvcnQtcmVtb3ZlfGFib3J0LWRlY29u
ZmlndXJlKQo=
--047d7b624b7af6a4f804de8a4138--
