Somehow I was assuming you are using Windows (despite you not having
mentioned that). Please note that the vcxsrv killing is only for
Windows. If you are using Linux you can kill the nxproxy process.

Further I have just checked the source regarding the timeout.
Unfortunately you'd need to increase the timeout (default is 120s) on
the x2goclient side and there's currently no easy way to achieve that.
The only thing I can think of is renaming the nxproxy  binary to
something else and place a wrapper script called nxproxy at the old
location. That script would parse the command line, modify the passed
options file and then start nxproxy.

nxproxy is started by x2goclient with a call similar to this (also on
windows the call will not differ much):

/usr/bin/nxproxy -S nx/nx,options=SOME_PATH/options:DISPLAYNUM

So the wrapper script needs to extract SOME_PATH and modify the options file
 there, which looks similar to this:

nx/nx,root=SOME_PATH,connect=localhost,cookie=COOKIE,port=PORT,errors=SOME_PATH/S-SESSIONID/sessions:DISPLAYNUM

The wrapper script needs to insert e.g. "timeout=300," at one of the
commas, leading to

nx/nx,root=SOME_PATH,timeout=300,connect=localhost,cookie=COOKIE,port=PORT,errors=SOME_PATH/S-SESSIONID/sessions:DISPLAYNUM

and then start nxproxy with the modified options file:

/usr/bin/nxproxy.orig -S nx/nx,options=SOME_PATH/options:54

Here's the script:
------------------------8<--------------------------------------
#!/bin/bash
#
# the (hardcoded) default for timeout is 120s and x2goclient dies not
# offer a facilitiy to modify/set this value. For flaky connections it
# might help to increase the timeout. A value of 0 will disable the
# timeout.

NEW_TIMEOUT=300

# 1. mv nxproxy nxproxy.orig
# 2. place this script as nxproxy
# 3. chmod --reference nxproxy.orig nxproxy
# 4. chown --reference nxproxy.orig nxproxy

# ----------------------------------
# nxproxy is started by x2goclient with a call similar to this (also
on windows the call will not differ much):
# /usr/bin/nxproxy -S nx/nx,options=SOME_PATH/options:DISPLAYNUM

# So the wrapper script needs to extract SOME_PATH and modify the options file
#  there, which looks similar to this:
# 
nx/nx,root=SOME_PATH,connect=localhost,cookie=COOKIE,port=PORT,errors=SOME_PATH/S-SESSIONID/sessions:DISPLAYNUM
# The wrapper script needs to insert e.g. "timeout=300," at one of the
commas, leading to
# 
nx/nx,root=SOME_PATH,timeout=300,connect=localhost,cookie=COOKIE,port=PORT,errors=SOME_PATH/S-SESSIONID/sessions:DISPLAYNUM

OPTFILE=$(echo "$@" | sed -n 's@.*options=\(.*/options\).*@\1@p')

sed -i 's/timeout=[0-9]*,//g;s/,/,timeout='$NEW_TIMEOUT',/' $OPTFILE

exec $0.orig "$@"
------------------------8<--------------------------------------

Hope that helps,

Uli


On Thu, Sep 23, 2021 at 8:33 PM Ulrich Sibiller <ul...@gmx.de> wrote:
>
> You can kill the vcxsrv process to make window vanish.
>
> Depending on how unstable your connection is and if it comes back right away 
> you could try to increase the timeouts in /etc/x2go/x2goagent.options. man 
> x2goagent should contain some hints about timeouts.
>
> Uli
>
>
> James Bowery <jabow...@gmail.com> schrieb am Do., 23. Sep. 2021, 16:53:
>>
>> I frequently encounter connection interruptions.  Each such interruption 
>> results in the x2go client freezing for about a minute before the 
>> notification window pops up to ask if I want to terminate the session or 
>> not.  Upon confirming, it then takes another minute before the x2go window 
>> closes.
>>
>> Is there any way grab the x2go client by the scruff of the neck and make it 
>> go away the moment I notice it isn't responding to keypresses?
>> _______________________________________________
>> x2go-user mailing list
>> x2go-user@lists.x2go.org
>> https://lists.x2go.org/listinfo/x2go-user
_______________________________________________
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user

Reply via email to