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

2021-07-27 Thread Tomáš Cerha
> The upstream PyHoca GUI still uses Python2 on distros that still have 
> Python2. On Debian 11, PyHoca GUI runs on Python3.

And are there any known attempts to make it work on Python 3 on Windows?

> Your problem seems to be in this session.log line:
> 
> ```
> Error: Wrong version or invalid session authentication cookie.
> ```

Do I understand it correctly when I assume that cookie is not the problem when 
I see the same cookie in X2Go client log and in the options file present in the 
session directory as indicated below?

>> pytis2go[8736] (x2goproxy-pylib) DEBUG: NX3 Proxy mode is server, 
>> cookie=2532ea9e54c10c087472bb500e715d1d, host=127.0.0.1, port=52113.
>> 
>> 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

So if the cookie is ok, what problem might be with the version?  How do I check 
which version is expected?

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

Yes, believe that the user can access the Windows xserver (VcXsrv 1.15.2.2) 
because when I run the same client in Python 2 environment with the same X 
server, it works as expected.

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

Probably not as indicated above.

Both the X server and the nxproxy.exe binary are the same versions in both 
cases (with X2Go client running in Python 2 or Python 3).  It just does not 
work with Python 3.

> 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.

Thank you for pointing this out. I will try to experiment with these 
testscripts.

Best regards

Tomáš Cerha

___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user


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

2021-07-27 Thread Tomáš Cerha
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.

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? 

Thank you for any idea.

Best regards

Tomáš Cerha



___
x2go-user mailing list
x2go-user@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-user