[X2Go-User] Session not starting with Python 3 on Windows

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Tue Jul 27 15:54:56 CEST 2021


Hi,

On  Di 27 Jul 2021 12:56:59 CEST, Tomáš Cerha wrote:

> Dear list,
>
> I am using the X2Go Python API to develop a custom UI for running  
> our applications from Windows and Linux client machines.
>
> We are now migrating to Python 3.  The client now works on Linux in  
> Python 2 and 3 and on Windows in Python 2.  I, however, can’t get it  
> to work in Python 3 on Windows.
>
> I see that the official PyHoca GUI for Windows is still Python 2.7  
> so I am curious what is the current state of X2Go migration to  
> Python 3 and whether there are some known issues.

The upstream PyHoca GUI still uses Python2 on distros that still have  
Python2. On Debian 11, PyHoca GUI runs on Python3.

> Some details of my particular problem:
>
> I am trying to start xterm (for testing) from Windows on a Linux  
> server.  My client starts the X2Go session, starts nxproxy, but the  
> xterm window doesn’t appear.
>
> The client’s log looks like this:
>
> pytis2go[8736] (x2goclient-pylib) DEBUG: command for new session is: xterm
> pytis2go[8736] (x2gocontrolsession-pylib) DEBUG: executing command  
> on X2Go server ,,xterm Python 3'': echo  
> X2GODATABEGIN:dfa49ff9-eec5-11eb-80a1-080027e6e559;  
> PATH=/usr/local/bin:/usr/bin:/bin sh -c "echo"; echo  
> X2GODATAEND:dfa49ff9-eec5-11eb-80a1-080027e6e559
> pytis2go[8736] (x2goguardian-pylib) DEBUG: Entering X2Go Guardian  
> client management loop...
> pytis2go[8736] (x2goproxy-pylib) DEBUG: NX3 Proxy mode is server,  
> cookie=2532ea9e54c10c087472bb500e715d1d, host=127.0.0.1, port=52113.
> pytis2go[8736] (x2goproxy-pylib) DEBUG: NX3 proxy writes session log  
> to  
> C:\Users\IEUser\.x2go\S-cerha-50-1627381881_stRxterm_dp32\session.log.
> pytis2go[8736] (x2goproxy-pylib) DEBUG: forking threaded subprocess:  
> C:\pytis2go\win_apps\nxproxy\nxproxy.exe -S  
> nx/nx,options=\..\S-cerha-50-1627381881_stRxterm_dp32\options:50
> pytis2go[8736] (x2goproxy-pylib) DEBUG: waiting for proxy to come  
> up: 0.4s x 1
> pytis2go[8736] (x2goproxy-pylib) DEBUG: waiting for port fw tunnel  
> to come up: 0.5s x 1
> pytis2go[8736] (x2goguardian-pylib) DEBUG: Entering X2Go Guardian  
> client management loop...
>
> The session.log at this time contains:
>
> NXPROXY - Version 3.5.0
>
> Copyright (C) 2001, 2010 NoMachine.
> See http://www.nomachine.com/ for more information.
>
> Info: Proxy running in client mode with pid '9596'.
> Session: Starting session at 'Tue Jul 27 03:32:06 2021'.
> Info: Connecting to remote host '127.0.0.1:52113'.
> Info: Connection to remote proxy '127.0.0.1:52113' established.
>
> If I kill the client after some time when “nothing happens”, the  
> session.log contains these additional lines:
>
> Error: The remote NX proxy closed the connection.
> Warning: Couldn't start '/bin/true'. Error is 2 'No such file or directory'.
> Warning: Trying with path  
> '/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:.:/cygdrive/c/pytis2go/venv/p2go3/Scripts:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/OpenSSH:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/Puppet  
> Labs/Puppet/bin:/cygdrive/c/Users/IEUser/AppData/Local/Microsoft/WindowsApps'.
> Error: Failure negotiating the session in stage '7'.
> Error: Wrong version or invalid session authentication cookie.
> Session: Terminating session at 'Tue Jul 27 03:33:16 2021'.
> Session: Session terminated at 'Tue Jul 27 03:33:16 2021'.
> Warning: Couldn't start 'nxclient'. Error is 2 'No such file or directory'.
> Warning: Trying with path  
> '/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:.:/usr/NX/bin:/opt/NX/bin:/usr/local/NX/bin:.:/cygdrive/c/pytis2go/venv/p2go3/Scripts:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/OpenSSH:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/Puppet  
> Labs/Puppet/bin:/cygdrive/c/Users/IEUser/AppData/Local/Microsoft/WindowsApps'.
>
> The “options” file in the session directory contains:
>
> nx/nx,retry=5,composite=1,connect=127.0.0.1,clipboard=1,cookie=2532ea9e54c10c087472bb500e715d1d,port=52113,errors=.\..\S-cerha-50-1627381881_stRxterm_dp32\session.err:50
>
> I suppose that nxproxy.exe can not depend on the currently active  
> Python version, so the problem should be on the x2go Python library  
> side.  Does anyone have any idea how to proceed?  What to check or  
> how to further debug it?

Your problem seems to be in this session.log line:

```
Error: Wrong version or invalid session authentication cookie.
```

> Thank you for any idea.

Are you sure that the user that launches nxproxy.exe can access the  
local (MS Windows side) Xserver correctly?

Or, the cookie string is wrong (see options file) and differs by some  
reason (X2Go client side / server side).

In nx-libs upstream sources [1], you find some testscripts that you  
could modify and check if the interplay of nxproxy.exe (MSWin version)  
and nxagent (on Linux / X2Go Server) play together well.

Mike

[1] https://github.com/ArcticaProject/nx-libs


-- 

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: Digitale PGP-Signatur
URL: <https://lists.x2go.org/pipermail/x2go-user/attachments/20210727/7234f6c1/attachment.sig>


More information about the x2go-user mailing list