[X2Go-User] Question about the change in proxy/nx3.py

Pavel hanak at is-it.eu
Thu Apr 30 20:48:38 CEST 2020


Hi,

I am using my own small python application which is based
on X2GoClient class from python-x2go.
The application runs on windows, so it is necessary to start
nxproxy.exe. The binary sits in C:\Users\user\win_apps\nxproxy\nxproxy.exe
and in my app I set the environment variable NXPROXY_BINARY
pointing to this path.

This whole thing worked very well with python-x2go==0.5.0.6.

Now I am on my way from Python2 to Python3, so I noticed,
the newer version of python-x2go is also trying to be
Python3 compatible. I made the necessary changes in my app
and updated python-x2go to 0.6.1.3.

But my application stopped to work. The reason was,
nxproxy.exe didn't start.

I tried to find out the problem and noticed there is an error log file
in C:\users\user\.x2go\S-user-50-1588199962_stRxterm_dp32 containing:

   Loop: PANIC! Can't open options file
   '.\..\S-user-50-1588199962_stRxterm_dp32\options'. Error is 2 'No such
   file or directory'.
   Error: Can't open options file
   '.\..\S-user-50-1588199962_stRxterm_dp32\options'. Error is 2 'No such
   file or directory'.

So I looked further and noticed this change in nx3.py between 0.6.0.2
and 0.6.1.0:

- self.PROXY_OPTIONS= [ 'nx/nx', 'options=%s' % os.path.join("\\", "..",
"S-%s" % self.session_info.name, 'options'), ]
+ self.PROXY_OPTIONS= [ 'nx/nx', 'options=%s' % os.path.join(".", "..",
"S-%s" % self.session_info.name, 'options'), ]

I reverted this change and my app worked correctly again.

Now my question is: what is the motivation to change the path to options
file and eventually, if the change is correct, what should I do in my
app to be able to start nxproxy.exe again? The path to options file look
as relative path, but to what? To nxproxy binary, or to nxproxy
directory, or to session_id directory? The explanation would be very
welcome.

Thanks in advance.

Pavel


More information about the x2go-user mailing list