Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.98k stars 169 forks source link

xpra ssh reconnect: argument quoting on windows #4355

Closed leo-b closed 2 months ago

leo-b commented 2 months ago

On windows, xpra seems to incorrectly parse the command and its arguments when reconnecting after the ssh connection has been lost.

"C:\Program Files\Xpra\Xpra_cmd.exe" start ssh://leo@strike.wu.ac.at/100 --start-child=qterminal --exit-with-children=yes --audio=no --webcam=no -d ssh,util --ssh="plink"

This connection works fine but xpra crashes when reconnecting after the ssh connection had been lost:

C:\Program Files\Xpra>"C:\Program Files\Xpra\Xpra_cmd.exe" start ssh://leo@strike.wu.ac.at/100 --start-child=qterminal --exit-with-children=yes --audio=no --webcam=no -d ssh,util --ssh="plink"
2024-09-11 11:38:51,510 debug enabled for ['xpra.util.child_reaper', 'server', 'util', 'exec']
2024-09-11 11:38:51,513 ChildReaper(None)
2024-09-11 11:38:51,513 using process polling every 2 seconds
2024-09-11 11:38:51,514 add_process(<Popen: returncode: None args: ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']>, 'splash', ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash'], True, True, None) pid=23236
2024-09-11 11:38:51,522 debug enabled for ['xpra.platform.win32.window_hooks', 'win32', 'window', 'util']
2024-09-11 11:38:51,830 debug enabled for ['xpra.gtk.info', 'gtk', 'util']
2024-09-11 11:38:51,837 debug enabled for ['xpra.gtk.widget', 'gtk', 'util']
2024-09-11 11:38:51,843 debug enabled for ['xpra.gtk.pixbuf', 'gtk', 'util']
2024-09-11 11:38:51,847 debug enabled for ['xpra.gtk.css_overrides', 'gtk', 'util']
2024-09-11 11:38:51,861 debug enabled for ['xpra.net.net_util', 'network', 'util']
2024-09-11 11:38:51,947  - loaded 'C:\Program Files\Xpra\share\xpra\css\10_header_bar.css'
2024-09-11 11:38:51,950  - loaded 'C:\Program Files\Xpra\share\xpra\css\20_progress_bar.css'

2024-09-11 11:38:52,137 Xpra GTK3 client version 6.1.2-r0
2024-09-11 11:38:52,141 debug enabled for ['xpra.util.io', 'network', 'util']
2024-09-11 11:38:52,737  running on Microsoft Windows Microsoft Windows 10 Enterprise
2024-09-11 11:38:52,740  cpython 3.11
2024-09-11 11:38:52,745 debug enabled for ['xpra.net.subprocess_wrapper', 'util']
2024-09-11 11:38:57,803 debug enabled for ['xpra.util.parsing', 'util', 'scaling']
2024-09-11 11:38:57,806 parse_scaling(('on', 6720, 1800, 0.1, 8.0))
2024-09-11 11:38:58,068 make_instance([<class 'xpra.platform.win32.notifier.Win32_Notifier'>, <class 'xpra.client.gtk3.notifier.GINotifier'>, <class 'xpra.gtk.notifier.GTKNotifier'>], <bound method NotificationClient.notification_closed of gtk3.client>, <bound method NotificationClient.notification_action of gtk3.client>)
2024-09-11 11:38:58,071 make_instance(..) <class 'xpra.platform.win32.notifier.Win32_Notifier'>()=<xpra.platform.win32.notifier.Win32_Notifier object at 0x000001f1325a4a10>
2024-09-11 11:38:58,088 created named pipe 'Xpra\30980'
2024-09-11 11:38:58,541 Error setting up the pipeline:
2024-09-11 11:38:58,544  gst_parse_error: could not link decoder to sink (3)
2024-09-11 11:38:58,544  GStreamer pipeline for:
2024-09-11 11:38:58,544   appsrc name=src emit-signals=1 block=0 is-live=1 do-timestamp=1 stream-type=0 format=2 caps=video/x-h264,width=128,height=128,profile=(string)main,stream-format=(string)byte-stream,alignment=(string)au ! \
2024-09-11 11:38:58,545   d3d11h264dec name=decoder ! \
2024-09-11 11:38:58,545   appsink name=sink emit-signals=1 max-buffers=10 drop=False sync=False async=True qos=False caps=video/x-raw,width=128,height=128,format=(string)I420
2024-09-11 11:38:58,545 Error creating context h264 128x128 YUV420P
2024-09-11 11:38:58,546 gstreamer: h264 decoding failed: failed to setup gstreamer pipeline
2024-09-11 11:38:58,554 make_instance((None, <class 'xpra.client.gtk3.tray_menu.GTKTrayMenu'>), gtk3.client)
2024-09-11 11:38:58,558 make_instance(..) <class 'xpra.client.gtk3.tray_menu.GTKTrayMenu'>()=<xpra.client.gtk3.tray_menu.GTKTrayMenu object at 0x000001f132a5cb50>
2024-09-11 11:38:58,574 keyboard layout 'German' : 'de' (0x407)
2024-09-11 11:39:00,376 Win32Hooks: window frame size is 11x11
2024-09-11 11:39:00,378 Win32Hooks: message_map={36: <bound method Win32Hooks.on_getminmaxinfo of <xpra.platform.win32.window_hooks.Win32Hooks object at 0x000001f10ec516d0>>}
2024-09-11 11:39:00,770 OpenGL enabled on 'Intel(R) HD Graphics 520'
2024-09-11 11:39:00,782 debug enabled for ['xpra.net.ssh.exec_client', 'network', 'ssh']
2024-09-11 11:39:00,783 executing ssh command: plink -l leo -T strike.wu.ac.at 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi'"'"''

2024-09-11 11:39:00,784 kwargs={'stderr': -1, 'startupinfo': <subprocess.STARTUPINFO object at 0x000001f132b1eb90>, 'creationflags': 528, 'env': { [...], 'PLINK_PROTOCOL': 'ssh'}}
2024-09-11 11:39:00,810 add_process(<Popen: returncode: None args: ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at...>, 'ssh', ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''], True, False, None) pid=19092
2024-09-11 11:39:00,826 poll() procinfo list: [ProcInfo(23236 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(19092 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
[...]
2024-09-11 11:39:21,830 SSH EOF on stderr
2024-09-11 11:39:21,832 SSH stderr:
2024-09-11 11:39:21,833  found existing display 100 : LIVE
2024-09-11 11:39:21,833  debug enabled for ['xpra.net.ssh.agent', 'server', 'ssh']
2024-09-11 11:39:21,834  debug enabled for ['xpra.util.child_reaper', 'server', 'util', 'exec']
2024-09-11 11:39:21,835  setup_proxy_ssh_socket(['/usr/bin/xpra', '_proxy_start', ':100', '--ssh=plink', '--debug=ssh,util', '--audio=no', '--webcam=no', '--exit-with-children=yes', '--start-child=qterminal'], ''
2024-09-11 11:39:21,835  setup_proxy_ssh_socket invalid SSH_AUTH_SOCK=''
2024-09-11 11:39:21,837 found 4 frames:
2024-09-11 11:39:21,837 0: 0x5de4
2024-09-11 11:39:21,838   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 11:39:21,838   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 11:39:21,838   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 108, in run
2024-09-11 11:39:21,839   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 153, in do_run
2024-09-11 11:39:21,839 1: 0x3504
2024-09-11 11:39:21,839   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 11:39:21,839   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 11:39:21,840   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 11:39:21,840   File "E:/xpra/xpra/client/mixins/windows.py", line 1520, in _draw_thread_loop
2024-09-11 11:39:21,840 2: 0x2e70
2024-09-11 11:39:21,851   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 11:39:21,852   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 11:39:21,852   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 11:39:21,852   File "E:/xpra/xpra/platform/win32/gui.py", line 1275, in init_keyboard_listener
2024-09-11 11:39:21,852 3: 0x30b4
2024-09-11 11:39:21,853   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
2024-09-11 11:39:21,854   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
2024-09-11 11:39:21,855   File "fs/bin/xpra", line 20, in <module>
2024-09-11 11:39:21,855   File "E:/xpra/xpra/scripts/main.py", line 138, in main
2024-09-11 11:39:21,855   File "E:/xpra/xpra/scripts/main.py", line 513, in run_mode
2024-09-11 11:39:21,855   File "E:/xpra/xpra/scripts/main.py", line 576, in do_run_mode
2024-09-11 11:39:21,856   File "E:/xpra/xpra/scripts/main.py", line 2356, in run_remote_server
2024-09-11 11:39:21,856   File "E:/xpra/xpra/scripts/main.py", line 2046, in do_run_client
2024-09-11 11:39:21,857   File "E:/xpra/xpra/client/gtk3/client_base.py", line 188, in run
2024-09-11 11:39:21,857   File "E:/xpra/xpra/client/gtk3/client_base.py", line 194, in gtk_main
2024-09-11 11:39:21,857   File "C:/msys64/mingw64/lib/python3.11/site-packages/gi/overrides/Gtk.py", line 1694, in main
2024-09-11 11:39:21,858   File "E:/xpra/xpra/client/base/client.py", line 1260, in call_handler
2024-09-11 11:39:21,858   File "E:/xpra/xpra/client/base/client.py", line 771, in _process_connection_lost
2024-09-11 11:39:21,859   File "E:/xpra/xpra/client/base/client.py", line 700, in warn_and_quit
2024-09-11 11:39:21,924   File "E:/xpra/xpra/client/gtk3/client_base.py", line 206, in quit
2024-09-11 11:39:21,925   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 11:39:21,926   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 11:39:21,928   File "E:/xpra/xpra/client/base/client.py", line 669, in cleanup
2024-09-11 11:39:21,928   File "E:/xpra/xpra/util/pysystem.py", line 17, in dump_all_frames
2024-09-11 11:39:21,939 cleanup()
2024-09-11 11:39:22,115 poll() procinfo list: []
2024-09-11 11:39:22,119 poll() procinfo list: []
2024-09-11 11:39:22,123 found 3 frames:
2024-09-11 11:39:22,123 0: 0x5de4
2024-09-11 11:39:22,124   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 11:39:22,124   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 11:39:22,125   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 108, in run
2024-09-11 11:39:22,125   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 153, in do_run
2024-09-11 11:39:22,126 1: 0x2e70
2024-09-11 11:39:22,137   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 11:39:22,156   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 11:39:22,156   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 11:39:22,157   File "E:/xpra/xpra/platform/win32/gui.py", line 1275, in init_keyboard_listener
2024-09-11 11:39:22,157 2: 0x30b4
2024-09-11 11:39:22,159   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
2024-09-11 11:39:22,160   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
2024-09-11 11:39:22,165   File "fs/bin/xpra", line 20, in <module>
2024-09-11 11:39:22,170   File "E:/xpra/xpra/scripts/main.py", line 138, in main
2024-09-11 11:39:22,170   File "E:/xpra/xpra/scripts/main.py", line 513, in run_mode
2024-09-11 11:39:22,171   File "E:/xpra/xpra/scripts/main.py", line 576, in do_run_mode
2024-09-11 11:39:22,171   File "E:/xpra/xpra/scripts/main.py", line 2356, in run_remote_server
2024-09-11 11:39:22,172   File "E:/xpra/xpra/scripts/main.py", line 2046, in do_run_client
2024-09-11 11:39:22,172   File "E:/xpra/xpra/client/gtk3/client_base.py", line 188, in run
2024-09-11 11:39:22,173   File "E:/xpra/xpra/client/gtk3/client_base.py", line 194, in gtk_main
2024-09-11 11:39:22,173   File "C:/msys64/mingw64/lib/python3.11/site-packages/gi/overrides/Gtk.py", line 1694, in main
2024-09-11 11:39:22,174   File "E:/xpra/xpra/client/base/client.py", line 1260, in call_handler
2024-09-11 11:39:22,175   File "E:/xpra/xpra/client/base/client.py", line 771, in _process_connection_lost
2024-09-11 11:39:22,176   File "E:/xpra/xpra/client/base/client.py", line 700, in warn_and_quit
2024-09-11 11:39:22,176   File "E:/xpra/xpra/client/gtk3/client_base.py", line 206, in quit
2024-09-11 11:39:22,176   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 11:39:22,176   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 11:39:22,177   File "E:/xpra/xpra/client/mixins/tray.py", line 78, in cleanup
2024-09-11 11:39:22,178   File "E:/xpra/xpra/platform/win32/tray.py", line 60, in cleanup
2024-09-11 11:39:22,178   File "E:/xpra/xpra/platform/win32/NotifyIcon.py", line 442, in close
2024-09-11 11:39:22,179   File "E:/xpra/xpra/platform/win32/NotifyIcon.py", line 451, in destroy
2024-09-11 11:39:22,179   File "E:/xpra/xpra/client/mixins/tray.py", line 113, in xpra_tray_exit
2024-09-11 11:39:22,179   File "E:/xpra/xpra/client/base/client.py", line 322, in disconnect_and_quit
2024-09-11 11:39:22,179   File "E:/xpra/xpra/client/gtk3/client_base.py", line 206, in quit
2024-09-11 11:39:22,179   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 11:39:22,196   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 11:39:22,197   File "E:/xpra/xpra/client/base/client.py", line 669, in cleanup
2024-09-11 11:39:22,198   File "E:/xpra/xpra/util/pysystem.py", line 17, in dump_all_frames
2024-09-11 11:39:22,201 poll() procinfo list: []
2024-09-11 11:39:22,201 poll() procinfo list: []
2024-09-11 11:39:22,201 poll() procinfo list: []
2024-09-11 11:39:22,202 poll() procinfo list: []
2024-09-11 11:39:22,704 poll() procinfo list: []
2024-09-11 11:39:22,717 poll() procinfo list: []
2024-09-11 11:39:22,719 found 3 frames:
2024-09-11 11:39:22,720 0: 0x5de4
2024-09-11 11:39:22,721   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 11:39:22,722   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 11:39:22,723   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 108, in run
2024-09-11 11:39:22,723   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 153, in do_run
2024-09-11 11:39:22,724 1: 0x2e70
2024-09-11 11:39:22,725   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 11:39:22,725   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 11:39:22,733   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 11:39:22,733   File "E:/xpra/xpra/platform/win32/gui.py", line 1275, in init_keyboard_listener
2024-09-11 11:39:22,734 2: 0x30b4
2024-09-11 11:39:22,735   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
2024-09-11 11:39:22,735   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
2024-09-11 11:39:22,736   File "fs/bin/xpra", line 20, in <module>
2024-09-11 11:39:22,736   File "E:/xpra/xpra/scripts/main.py", line 138, in main
2024-09-11 11:39:22,736   File "E:/xpra/xpra/scripts/main.py", line 513, in run_mode
2024-09-11 11:39:22,737   File "E:/xpra/xpra/scripts/main.py", line 576, in do_run_mode
2024-09-11 11:39:22,737   File "E:/xpra/xpra/scripts/main.py", line 2356, in run_remote_server
2024-09-11 11:39:22,737   File "E:/xpra/xpra/scripts/main.py", line 2050, in do_run_client
2024-09-11 11:39:22,738   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 11:39:22,738   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 11:39:22,738   File "E:/xpra/xpra/client/base/client.py", line 669, in cleanup
2024-09-11 11:39:22,738   File "E:/xpra/xpra/util/pysystem.py", line 17, in dump_all_frames
2024-09-11 11:39:22,739 poll() procinfo list: []
2024-09-11 11:39:22,739 poll() procinfo list: []
CONNECTION_LOST, reconnecting

C:\Program Files\Xpra>Invalid subcommand 'Files\\Xpra\\Xpra_cmd.exe'
Usage:
(this xpra installation does not support starting local servers)
        Program
        Program start [REMOTE-DISPLAY]
        Program start-desktop [REMOTE-DISPLAY]
        Program start-monitor [REMOTE-DISPLAY]
        Program shadow [DISPLAY]
        Program shadow-screen [DISPLAY]
        Program upgrade-shadow [DISPLAY]
        Program attach [DISPLAY]
        Program sessions
        Program launcher
        Program gui
        Program start-gui
        Program bug-report
        Program toolbox
        Program about
        Program example
        Program detach [DISPLAY]
        Program info [DISPLAY]
        Program id [DISPLAY]
        Program version [DISPLAY]
        Program stop [DISPLAY]
        Program exit [DISPLAY]
        Program screenshot filename [DISPLAY]
        Program control DISPLAY command [arg1] [arg2]..
        Program print DISPLAY filename
        Program shell [DISPLAY]
        Program send-file
        Program configure
        Program clean [DISPLAY1] [DISPLAY2]..
        Program clean-sockets [DISPLAY]
        Program clean-displays [DISPLAY]
        Program autostart
        Program showconfig
        Program list
        Program list-sessions
        Program list-windows
        Program displays
        Program encoding
        Program path-info
        Program html5
        Program docs
        Program list-mdns
        Program mdns-gui

see 'man xpra' or 'xpra --help' for more details

I could avoid calling Xpra_cmd with the full path of course, but for enabling ssh agent forwarding, I am using:

Xpra_cmd.exe start ssh://leo@remotehost/100 --start-child=qterminal --exit-with-children=yes --audio=no --webcam=no -d ssh --ssh="plink -A"

... which also leads to the same problem when parsing --ssh="plink -A":

Xpra_cmd.exe start ssh://leo@strike.wu.ac.at/100 --start-child=qterminal --exit-with-children=yes --audio=no --webcam=no -d ssh,util --ssh="plink -A"
2024-09-11 14:24:46,776 debug enabled for ['xpra.util.child_reaper', 'server', 'util', 'exec']
2024-09-11 14:24:46,778 ChildReaper(None)
2024-09-11 14:24:46,779 using process polling every 2 seconds
2024-09-11 14:24:46,779 add_process(<Popen: returncode: None args: ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']>, 'splash', ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash'], True, True, None) pid=6720
2024-09-11 14:24:46,844 debug enabled for ['xpra.platform.win32.window_hooks', 'win32', 'window', 'util']
2024-09-11 14:24:48,142 debug enabled for ['xpra.gtk.info', 'gtk', 'util']
2024-09-11 14:24:48,169 debug enabled for ['xpra.gtk.widget', 'gtk', 'util']
2024-09-11 14:24:48,196 debug enabled for ['xpra.gtk.pixbuf', 'gtk', 'util']
2024-09-11 14:24:48,242 debug enabled for ['xpra.gtk.css_overrides', 'gtk', 'util']
2024-09-11 14:24:48,360 debug enabled for ['xpra.net.net_util', 'network', 'util']
2024-09-11 14:24:49,616  - loaded 'C:\Program Files\Xpra\share\xpra\css\10_header_bar.css'
2024-09-11 14:24:49,632  - loaded 'C:\Program Files\Xpra\share\xpra\css\20_progress_bar.css'

2024-09-11 14:24:50,420 Xpra GTK3 client version 6.1.2-r0
2024-09-11 14:24:50,421 debug enabled for ['xpra.util.io', 'network', 'util']
2024-09-11 14:24:51,461  running on Microsoft Windows Microsoft Windows 10 Enterprise
2024-09-11 14:24:51,464  cpython 3.11
2024-09-11 14:24:51,479 debug enabled for ['xpra.net.subprocess_wrapper', 'util']
2024-09-11 14:24:56,742 debug enabled for ['xpra.util.parsing', 'util', 'scaling']
2024-09-11 14:24:56,745 parse_scaling(('on', 6720, 1800, 0.1, 8.0))
2024-09-11 14:25:00,449 make_instance([<class 'xpra.platform.win32.notifier.Win32_Notifier'>, <class 'xpra.client.gtk3.notifier.GINotifier'>, <class 'xpra.gtk.notifier.GTKNotifier'>], <bound method NotificationClient.notification_closed of gtk3.client>, <bound method NotificationClient.notification_action of gtk3.client>)
2024-09-11 14:25:00,452 make_instance(..) <class 'xpra.platform.win32.notifier.Win32_Notifier'>()=<xpra.platform.win32.notifier.Win32_Notifier object at 0x0000013540e35210>
2024-09-11 14:25:00,529 created named pipe 'Xpra\25976'
2024-09-11 14:25:02,146 Error setting up the pipeline:
2024-09-11 14:25:02,148  gst_parse_error: could not link decoder to sink (3)
2024-09-11 14:25:02,149  GStreamer pipeline for:
2024-09-11 14:25:02,149   appsrc name=src emit-signals=1 block=0 is-live=1 do-timestamp=1 stream-type=0 format=2 caps=video/x-h264,width=128,height=128,profile=(string)main,stream-format=(string)byte-stream,alignment=(string)au ! \
2024-09-11 14:25:02,149   d3d11h264dec name=decoder ! \
2024-09-11 14:25:02,150   appsink name=sink emit-signals=1 max-buffers=10 drop=False sync=False async=True qos=False caps=video/x-raw,width=128,height=128,format=(string)I420
2024-09-11 14:25:02,150 Error creating context h264 128x128 YUV420P
2024-09-11 14:25:02,150 gstreamer: h264 decoding failed: failed to setup gstreamer pipeline
2024-09-11 14:25:02,174 make_instance((None, <class 'xpra.client.gtk3.tray_menu.GTKTrayMenu'>), gtk3.client)
2024-09-11 14:25:02,187 make_instance(..) <class 'xpra.client.gtk3.tray_menu.GTKTrayMenu'>()=<xpra.client.gtk3.tray_menu.GTKTrayMenu object at 0x000001354114c5d0>
2024-09-11 14:25:02,236 keyboard layout 'German' : 'de' (0x407)
2024-09-11 14:25:03,452 Win32Hooks: window frame size is 11x11
2024-09-11 14:25:03,454 Win32Hooks: message_map={36: <bound method Win32Hooks.on_getminmaxinfo of <xpra.platform.win32.window_hooks.Win32Hooks object at 0x000001351d47d990>>}
2024-09-11 14:25:03,805 OpenGL enabled on 'Intel(R) HD Graphics 520'
2024-09-11 14:25:03,835 debug enabled for ['xpra.net.ssh.exec_client', 'network', 'ssh']
2024-09-11 14:25:03,838 executing ssh command: plink -A -l leo -T strike.wu.ac.at 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi'"'"''

2024-09-11 14:25:03,839 kwargs={'stderr': -1, 'startupinfo': <subprocess.STARTUPINFO object at 0x0000013546408e50>, 'creationflags': 528, 'env': {....., 'PLINK_PROTOCOL': 'ssh'}}
2024-09-11 14:25:03,891 add_process(<Popen: returncode: None args: ['plink', '-A', '-l', 'leo', '-T', 'strike.wu...>, 'ssh', ['plink', '-A', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''], True, False, None) pid=10436
2024-09-11 14:25:03,953 poll() procinfo list: [ProcInfo(6720 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(10436 : ['plink', '-A', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb" "--ssh=plink -A" "--debug=ssh,util" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
[...]
2024-09-11 14:25:22,981 SSH EOF on stderr
2024-09-11 14:25:22,993 SSH stderr:
2024-09-11 14:25:22,996  found existing display 100 : LIVE
2024-09-11 14:25:23,002  debug enabled for ['xpra.net.ssh.agent', 'server', 'ssh']
2024-09-11 14:25:23,005  debug enabled for ['xpra.util.child_reaper', 'server', 'util', 'exec']
2024-09-11 14:25:23,012  setup_proxy_ssh_socket(['/usr/bin/xpra', '_proxy_start', ':100', '--env=SSH_AGENT_UUID=c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb', '--ssh=plink -A', '--debug=ssh,util', '--audio=no', '--webcam=no', '--exit-with-children=yes', '--start-child=qterminal'], '/tmp/ssh-VeaqNJvsmV/agent.1430889'
2024-09-11 14:25:23,014  setup_proxy_ssh_socket '/run/user/500/xpra/100/ssh/c07e089fde235fb918507f91c2987929ebeae1efa2900c94cb1118d0714173fb' -> '/tmp/ssh-VeaqNJvsmV/agent.1430889'
2024-09-11 14:25:23,021 found 4 frames:
2024-09-11 14:25:23,031 0: 0x44c
2024-09-11 14:25:23,032   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 14:25:23,033   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 14:25:23,033   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 108, in run
2024-09-11 14:25:23,034   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 153, in do_run
2024-09-11 14:25:23,034 1: 0x7904
2024-09-11 14:25:23,035   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 14:25:23,035   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 14:25:23,036   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 14:25:23,036   File "E:/xpra/xpra/client/mixins/windows.py", line 1520, in _draw_thread_loop
2024-09-11 14:25:23,037 2: 0x3518
2024-09-11 14:25:23,038   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 14:25:23,038   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 14:25:23,045   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 14:25:23,046   File "E:/xpra/xpra/platform/win32/gui.py", line 1275, in init_keyboard_listener
2024-09-11 14:25:23,046 3: 0x26c4
2024-09-11 14:25:23,047   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
2024-09-11 14:25:23,048   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
2024-09-11 14:25:23,049   File "fs/bin/xpra", line 20, in <module>
2024-09-11 14:25:23,049   File "E:/xpra/xpra/scripts/main.py", line 138, in main
2024-09-11 14:25:23,050   File "E:/xpra/xpra/scripts/main.py", line 513, in run_mode
2024-09-11 14:25:23,051   File "E:/xpra/xpra/scripts/main.py", line 576, in do_run_mode
2024-09-11 14:25:23,052   File "E:/xpra/xpra/scripts/main.py", line 2356, in run_remote_server
2024-09-11 14:25:23,053   File "E:/xpra/xpra/scripts/main.py", line 2046, in do_run_client
2024-09-11 14:25:23,086   File "E:/xpra/xpra/client/gtk3/client_base.py", line 188, in run
2024-09-11 14:25:23,087   File "E:/xpra/xpra/client/gtk3/client_base.py", line 194, in gtk_main
2024-09-11 14:25:23,088   File "C:/msys64/mingw64/lib/python3.11/site-packages/gi/overrides/Gtk.py", line 1694, in main
2024-09-11 14:25:23,088   File "E:/xpra/xpra/client/base/client.py", line 1260, in call_handler
2024-09-11 14:25:23,089   File "E:/xpra/xpra/client/base/client.py", line 771, in _process_connection_lost
2024-09-11 14:25:23,091   File "E:/xpra/xpra/client/base/client.py", line 700, in warn_and_quit
2024-09-11 14:25:23,092   File "E:/xpra/xpra/client/gtk3/client_base.py", line 206, in quit
2024-09-11 14:25:23,093   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 14:25:23,094   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 14:25:23,095   File "E:/xpra/xpra/client/base/client.py", line 669, in cleanup
2024-09-11 14:25:23,123   File "E:/xpra/xpra/util/pysystem.py", line 17, in dump_all_frames
2024-09-11 14:25:23,149 cleanup()
2024-09-11 14:25:23,297 poll() procinfo list: []
2024-09-11 14:25:23,304 poll() procinfo list: []
2024-09-11 14:25:23,305 found 3 frames:
2024-09-11 14:25:23,305 0: 0x44c
2024-09-11 14:25:23,306   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 14:25:23,316   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 14:25:23,330   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 108, in run
2024-09-11 14:25:23,333   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 153, in do_run
2024-09-11 14:25:23,335 1: 0x3518
2024-09-11 14:25:23,338   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 14:25:23,338   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 14:25:23,350   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 14:25:23,351   File "E:/xpra/xpra/platform/win32/gui.py", line 1275, in init_keyboard_listener
2024-09-11 14:25:23,353 2: 0x26c4
2024-09-11 14:25:23,354   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
2024-09-11 14:25:23,355   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
2024-09-11 14:25:23,355   File "fs/bin/xpra", line 20, in <module>
2024-09-11 14:25:23,355   File "E:/xpra/xpra/scripts/main.py", line 138, in main
2024-09-11 14:25:23,356   File "E:/xpra/xpra/scripts/main.py", line 513, in run_mode
2024-09-11 14:25:23,356   File "E:/xpra/xpra/scripts/main.py", line 576, in do_run_mode
2024-09-11 14:25:23,356   File "E:/xpra/xpra/scripts/main.py", line 2356, in run_remote_server
2024-09-11 14:25:23,356   File "E:/xpra/xpra/scripts/main.py", line 2046, in do_run_client
2024-09-11 14:25:23,367   File "E:/xpra/xpra/client/gtk3/client_base.py", line 188, in run
2024-09-11 14:25:23,368   File "E:/xpra/xpra/client/gtk3/client_base.py", line 194, in gtk_main
2024-09-11 14:25:23,369   File "C:/msys64/mingw64/lib/python3.11/site-packages/gi/overrides/Gtk.py", line 1694, in main
2024-09-11 14:25:23,370   File "E:/xpra/xpra/client/base/client.py", line 1260, in call_handler
2024-09-11 14:25:23,370   File "E:/xpra/xpra/client/base/client.py", line 771, in _process_connection_lost
2024-09-11 14:25:23,370   File "E:/xpra/xpra/client/base/client.py", line 700, in warn_and_quit
2024-09-11 14:25:23,370   File "E:/xpra/xpra/client/gtk3/client_base.py", line 206, in quit
2024-09-11 14:25:23,371   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 14:25:23,371   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 14:25:23,371   File "E:/xpra/xpra/client/mixins/tray.py", line 78, in cleanup
2024-09-11 14:25:23,372   File "E:/xpra/xpra/platform/win32/tray.py", line 60, in cleanup
2024-09-11 14:25:23,372   File "E:/xpra/xpra/platform/win32/NotifyIcon.py", line 442, in close
2024-09-11 14:25:23,372   File "E:/xpra/xpra/platform/win32/NotifyIcon.py", line 451, in destroy
2024-09-11 14:25:23,373   File "E:/xpra/xpra/client/mixins/tray.py", line 113, in xpra_tray_exit
2024-09-11 14:25:23,377   File "E:/xpra/xpra/client/base/client.py", line 322, in disconnect_and_quit
2024-09-11 14:25:23,383   File "E:/xpra/xpra/client/gtk3/client_base.py", line 206, in quit
2024-09-11 14:25:23,387   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 14:25:23,387   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 14:25:23,387   File "E:/xpra/xpra/client/base/client.py", line 669, in cleanup
2024-09-11 14:25:23,388   File "E:/xpra/xpra/util/pysystem.py", line 17, in dump_all_frames
2024-09-11 14:25:23,412 poll() procinfo list: []
2024-09-11 14:25:23,413 poll() procinfo list: []
2024-09-11 14:25:23,414 poll() procinfo list: []
2024-09-11 14:25:23,414 poll() procinfo list: []
2024-09-11 14:25:23,915 poll() procinfo list: []
2024-09-11 14:25:23,921 poll() procinfo list: []
2024-09-11 14:25:23,922 found 3 frames:
2024-09-11 14:25:23,924 0: 0x44c
2024-09-11 14:25:23,926   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 14:25:23,926   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 14:25:23,927   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 108, in run
2024-09-11 14:25:23,928   File "E:/xpra/xpra/platform/win32/namedpipes/listener.py", line 153, in do_run
2024-09-11 14:25:23,930 1: 0x3518
2024-09-11 14:25:23,935   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1002, in _bootstrap
2024-09-11 14:25:23,935   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
2024-09-11 14:25:23,936   File "C:/msys64/mingw64/lib/python3.11/threading.py", line 982, in run
2024-09-11 14:25:23,937   File "E:/xpra/xpra/platform/win32/gui.py", line 1275, in init_keyboard_listener
2024-09-11 14:25:23,938 2: 0x26c4
2024-09-11 14:25:23,938   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
2024-09-11 14:25:23,939   File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
2024-09-11 14:25:23,940   File "fs/bin/xpra", line 20, in <module>
2024-09-11 14:25:23,942   File "E:/xpra/xpra/scripts/main.py", line 138, in main
2024-09-11 14:25:23,949   File "E:/xpra/xpra/scripts/main.py", line 513, in run_mode
2024-09-11 14:25:23,950   File "E:/xpra/xpra/scripts/main.py", line 576, in do_run_mode
2024-09-11 14:25:23,950   File "E:/xpra/xpra/scripts/main.py", line 2356, in run_remote_server
2024-09-11 14:25:23,951   File "E:/xpra/xpra/scripts/main.py", line 2050, in do_run_client
2024-09-11 14:25:23,952   File "E:/xpra/xpra/client/gtk3/client_base.py", line 243, in cleanup
2024-09-11 14:25:23,953   File "E:/xpra/xpra/client/gui/ui_client_base.py", line 277, in cleanup
2024-09-11 14:25:23,953   File "E:/xpra/xpra/client/base/client.py", line 669, in cleanup
2024-09-11 14:25:23,954   File "E:/xpra/xpra/util/pysystem.py", line 17, in dump_all_frames
2024-09-11 14:25:23,955 poll() procinfo list: []
2024-09-11 14:25:23,956 poll() procinfo list: []
CONNECTION_LOST, reconnecting

C:\Program Files\Xpra>2024-09-11 14:25:24,605 xpra initialization error:
 no such option: -A
totaam commented 2 months ago

Is this running from some weird shell? mingw perhaps? I've tried to reproduce this issue from a cmd.exe window and from the default MSYS2 shell and it worked every time.

leo-b commented 2 months ago

The original Xpra_cmd.exe is started from plain cmd.exe. But at that time everything is fine anyways.

However, when reconnecting, xpra does some commandline re-arrangements, I guess that this will be the correct place where reconnect is handled: https://github.com/Xpra-org/xpra/blob/4ead5528dcf1167c2bbdd52480bad6176b289460/xpra/scripts/main.py#L1504

For some strange reason I don't see the Popen or execv log lines, even though I used -d exec:

C:\Windows\System32>"C:\Program Files\Xpra\Xpra_cmd.exe" start ssh://leo@strike.wu.ac.at/100 --start-child=qterminal --exit-with-children=yes --audio=no --webcam=no -d ssh,exec --ssh="plink"
2024-09-12 16:22:15,644 debug enabled for ['xpra.util.child_reaper', 'server', 'util', 'exec']
2024-09-12 16:22:15,645 ChildReaper(None)
2024-09-12 16:22:15,646 using process polling every 2 seconds
2024-09-12 16:22:15,647 add_process(<Popen: returncode: None args: ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']>, 'splash', ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash'], True, True, None) pid=29304
2024-09-12 16:22:16,016 debug enabled for ['xpra.client.mixins.windows', 'client', 'exec']

2024-09-12 16:22:16,190 Xpra GTK3 client version 6.1.2-r0
2024-09-12 16:22:16,632  running on Microsoft Windows Microsoft Windows 10 Enterprise
2024-09-12 16:22:16,633  cpython 3.11
2024-09-12 16:22:21,976 created named pipe 'Xpra\9304'
2024-09-12 16:22:22,390 Error setting up the pipeline:
2024-09-12 16:22:22,390  gst_parse_error: could not link decoder to sink (3)
2024-09-12 16:22:22,390  GStreamer pipeline for:
2024-09-12 16:22:22,391   appsrc name=src emit-signals=1 block=0 is-live=1 do-timestamp=1 stream-type=0 format=2 caps=video/x-h264,width=128,height=128,profile=(string)main,stream-format=(string)byte-stream,alignment=(string)au ! \
2024-09-12 16:22:22,391   d3d11h264dec name=decoder ! \
2024-09-12 16:22:22,391   appsink name=sink emit-signals=1 max-buffers=10 drop=False sync=False async=True qos=False caps=video/x-raw,width=128,height=128,format=(string)I420
2024-09-12 16:22:22,392 Error creating context h264 128x128 YUV420P
2024-09-12 16:22:22,392 gstreamer: h264 decoding failed: failed to setup gstreamer pipeline
2024-09-12 16:22:22,398 debug enabled for ['xpra.client.gtk3.tray_menu', 'exec']
2024-09-12 16:22:22,409 keyboard layout 'German' : 'de' (0x407)
2024-09-12 16:22:24,486 OpenGL enabled on 'Intel(R) HD Graphics 520'
2024-09-12 16:22:24,495 debug enabled for ['xpra.net.ssh.exec_client', 'network', 'ssh']
2024-09-12 16:22:24,496 executing ssh command: plink -l leo -T strike.wu.ac.at 'sh -c '"'"'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi'"'"''
2024-09-12 16:22:24,496 kwargs={'stderr': -1, 'startupinfo': <subprocess.STARTUPINFO object at 0x000002471804f790>, 'creationflags': 528, 'env': {' CHOCOLATEYTOOLSLOCATION': 'C:\\Tools', 'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\leo\\AppData\\Roaming', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', 'CHOCOLATEYLASTPATHUPDATE': '133516062534020221', 'COMMONPROGRAMFILES': 'C:\\Program Files\\Common Files', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files', 'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files', 'COMPUTERNAME': 'LEO-X1', 'COMSPEC': 'C:\\WINDOWS\\system32\\cmd.exe', 'DRIVERDATA': 'C:\\Windows\\System32\\Drivers\\DriverData', 'FP_NO_HOST_CHECK': 'NO', 'HOMEDRIVE': 'C:', 'HOMEPATH': '\\Users\\leo', 'LOCALAPPDATA': 'C:\\Users\\leo\\AppData\\Local', 'LOGONSERVER': '\\\\LEO-X1', 'MOZ_PLUGIN_PATH': 'C:\\Program Files\\Tracker Software\\PDF Viewer\\Win32', 'NUMBER_OF_PROCESSORS': '4', 'ONEDRIVE': 'C:\\Users\\leo\\OneDrive - Wirtschaftsuniversität Wien - IT-SERVICES', 'ONEDRIVECOMMERCIAL': 'C:\\Users\\leo\\OneDrive - Wirtschaftsuniversität Wien - IT-SERVICES', 'OS': 'Windows_NT', 'PATH': 'C:\\Program Files\\Xpra;C:\\Program Files\\Xpra;C:\\Program Files\\Xpra\\lib;C:\\Program Files\\Python311\\Scripts;C:\\Program Files\\Python311;C:\\Program Files\\Eclipse Adoptium\\jdk-17.0.2.8-hotspot\\bin;C:\\WINDOWS\\SYSTEM32;C:\\WINDOWS;C:\\WINDOWS\\SYSTEM32\\WBEM;C:\\WINDOWS\\SYSTEM32\\WINDOWSPOWERSHELL\\V1.0;C:\\PROGRAM FILES (X86)\\GS\\GS9.06\\LIB;C:\\PROGRAM FILES (X86)\\GS\\GS9.06\\BIN;C:\\PROGRAM FILES (X86)\\INTEL\\OPENCL SDK\\2.0\\BIN\\X86;C:\\PROGRAM FILES (X86)\\INTEL\\OPENCL SDK\\2.0\\BIN\\X64;C:\\PROGRAM FILES\\SAMSUNG\\ALLSHARE FRAMEWORK DMS\\1.3.21;C:\\PROGRAM FILES\\SAMSUNG\\ALLSHARE FRAMEWORK DMS\\1.3.21\\64BIT;C:\\PROGRAM FILES (X86)\\COMMON FILES\\LENOVO\\EASYPLUSSDK\\BIN;C:\\Program Files\\ThinkPad\\Bluetooth Software;C:\\Program Files\\ThinkPad\\Bluetooth Software\\syswow64;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\OpenVPN\\bin;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files (x86)\\gnupg\\bin;C:\\Program Files\\Intel\\WiFi\\bin;C:\\Program Files\\Common Files\\Intel\\WirelessCommon;C:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\dotnet;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\PuTTY;C:\\Users\\leo\\AppData\\Local\\Programs\\Python\\Launcher;C:\\Users\\leo\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\Intel\\WiFi\\bin;C:\\Program Files\\Common Files\\Intel\\WirelessCommon;C:\\Users\\leo\\AppData\\Local\\Microsoft\\WinGet\\Links;.', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 78 Stepping 3, GenuineIntel', 'PROCESSOR_LEVEL': '6', 'PROCESSOR_REVISION': '4e03', 'PROGRAMDATA': 'C:\\ProgramData', 'PROGRAMFILES': 'C:\\Program Files', 'PROGRAMFILES(X86)': 'C:\\Program Files (x86)', 'PROGRAMW6432': 'C:\\Program Files', 'PROMPT': '$P$G', 'PSMODULEPATH': 'C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'PUBLIC': 'C:\\Users\\Public', 'SESSIONNAME': 'Console', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:\\WINDOWS', 'TEMP': 'C:\\Users\\leo\\AppData\\Local\\Temp', 'TMP': 'C:\\Users\\leo\\AppData\\Local\\Temp', 'TVT': 'C:\\Program Files (x86)\\Lenovo', 'USERDOMAIN': 'LEO-X1', 'USERDOMAIN_ROAMINGPROFILE': 'LEO-X1', 'USERNAME': 'leo', 'USERPROFILE': 'C:\\Users\\leo', 'VBOX_MSI_INSTALL_PATH': 'C:\\Program Files\\Oracle\\VirtualBox\\', 'VBOX_USER_HOME': 'C:\\Users\\leo\\.VirtualBox', 'WINDIR': 'C:\\WINDOWS', '__PSLOCKDOWNPOLICY': '0', 'GDK_SCALE': '1', 'GDK_DPI_SCALE': '1', 'GTK_CSD': '0', 'CRYPTOGRAPHY_OPENSSL_NO_LEGACY': '1', 'CUDA_PATH': 'C:\\Program Files\\Xpra', 'GI_TYPELIB_PATH': 'C:\\Program Files\\Xpra\\lib\\girepository-1.0', 'GTK_THEME': 'Windows-10', 'GST_PLUGIN_PATH': 'C:\\Program Files\\Xpra\\lib\\gstreamer-1.0', 'PLINK_PROTOCOL': 'ssh'}}
2024-09-12 16:22:24,516 add_process(<Popen: returncode: None args: ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at...>, 'ssh', ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''], True, False, None) pid=30672
2024-09-12 16:22:24,536 poll() procinfo list: [ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:24,716  keyboard settings: layout=de
2024-09-12 16:22:24,726  desktop size is 6720x1800:
2024-09-12 16:22:24,731   Default (1185x317 mm - DPI: 144x144)
2024-09-12 16:22:24,732     Lenovo Wide viewing angle & High density FlexView Display 2560x1440 2560x1440 at    0x0    (309x174 mm - DPI: 210x210) workarea: 2401x1440
2024-09-12 16:22:24,747     Dell Inc. DELL2407WFPHC 2880x1800 at 3840x0    (519x324 mm - DPI: 141x141) workarea: 2880x1800 at 3840x0
2024-09-12 16:22:26,538 poll() procinfo list: [ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:28,539 poll() procinfo list: [ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:29,830 enabled remote logging
2024-09-12 16:22:29,836 Xpra X11 seamless server version 6.1
2024-09-12 16:22:30,126 build_start_menu() 11 menu items
2024-09-12 16:22:30,146 self.client.server_xdg_menu={'Accessories': {'Name': 'Accessories', 'Generic .. ', 'command': 'xfce4-terminal --preferences'}}}}
2024-09-12 16:22:30,185  * category: Accessories
[...]
2024-09-12 16:22:31,172 running, 1 windows
2024-09-12 16:22:31,192 poll() procinfo list: [ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:33,193 poll() procinfo list: [ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:35,194 poll() procinfo list: [ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']), ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:35,218 add_dead_process(ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash']))
2024-09-12 16:22:35,219 add_dead_process returncode=1, dead=True, callback=None
2024-09-12 16:22:35,221 child 'splash' with pid 29304 has terminated (ignored)
2024-09-12 16:22:35,224 updated procinfo=ProcInfo(29304 : ['C:\\Program Files\\Xpra\\Xpra.exe', 'splash'])
2024-09-12 16:22:35,234 poll() procinfo list: [ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:35,244 check() watched=(), alive=(), quit callback=None
2024-09-12 16:22:37,195 poll() procinfo list: [ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:38,602 UI thread is now blocked
2024-09-12 16:22:39,673 UI thread is running again, resuming
2024-09-12 16:22:39,960 poll() procinfo list: [ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
[...]
2024-09-12 16:22:57,996 poll() procinfo list: [ProcInfo(30672 : ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at', 'sh -c \'if command -v "xpra" > /dev/null 2>&1; then xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";elif [ -x Xpra_cmd.exe ]; then Xpra_cmd.exe _proxy_start ":100" "--ssh=plink" "--debug=ssh,exec" "--audio=no" "--webcam=no" "--exit-with-children=yes" "--start-child=qterminal";else echo "no run-xpra command found"; exit 1; fi\''])]
2024-09-12 16:22:58,113 SSH EOF on stderr
2024-09-12 16:22:58,136 SSH stderr:
2024-09-12 16:22:58,157 poll() procinfo list: []
2024-09-12 16:22:58,195 poll() procinfo list: []
2024-09-12 16:22:58,184  found existing display 100 : LIVE
2024-09-12 16:22:58,278 poll() procinfo list: []
2024-09-12 16:22:58,292  debug enabled for ['xpra.net.ssh.agent', 'server', 'ssh']
2024-09-12 16:22:58,303 poll() procinfo list: []
2024-09-12 16:22:58,324 poll() procinfo list: []
2024-09-12 16:22:58,320  debug enabled for ['xpra.util.child_reaper', 'server', 'util', 'exec']
2024-09-12 16:22:58,333 poll() procinfo list: []
2024-09-12 16:22:58,334  setup_proxy_ssh_socket(['/usr/bin/xpra', '_proxy_start', ':100', '--ssh=plink', '--debug=ssh,exec', '--audio=no', '--webcam=no', '--exit-with-children=yes', '--start-child=qterminal'], ''
2024-09-12 16:22:58,346  setup_proxy_ssh_socket invalid SSH_AUTH_SOCK=''
2024-09-12 16:22:58,827 poll() procinfo list: []
2024-09-12 16:22:58,840 poll() procinfo list: []
2024-09-12 16:22:58,852 poll() procinfo list: []
2024-09-12 16:22:58,862 poll() procinfo list: []
CONNECTION_LOST, reconnecting

C:\Windows\System32>Invalid subcommand 'Files\\Xpra\\Xpra_cmd.exe'
Usage:
(this xpra installation does not support starting local servers)
        Program
        Program start [REMOTE-DISPLAY]
        Program start-desktop [REMOTE-DISPLAY]
        Program start-monitor [REMOTE-DISPLAY]
        Program shadow [DISPLAY]
        Program shadow-screen [DISPLAY]
        Program upgrade-shadow [DISPLAY]
        Program attach [DISPLAY]
        Program sessions
        Program launcher
        Program gui
        Program start-gui
        Program bug-report
        Program toolbox
        Program about
        Program example
        Program detach [DISPLAY]
        Program info [DISPLAY]
        Program id [DISPLAY]
        Program version [DISPLAY]
        Program stop [DISPLAY]
        Program exit [DISPLAY]
        Program screenshot filename [DISPLAY]
        Program control DISPLAY command [arg1] [arg2]..
        Program print DISPLAY filename
        Program shell [DISPLAY]
        Program send-file
        Program configure
        Program clean [DISPLAY1] [DISPLAY2]..
        Program clean-sockets [DISPLAY]
        Program clean-displays [DISPLAY]
        Program autostart
        Program showconfig
        Program list
        Program list-sessions
        Program list-windows
        Program displays
        Program encoding
        Program path-info
        Program html5
        Program docs
        Program list-mdns
        Program mdns-gui

see 'man xpra' or 'xpra --help' for more details
totaam commented 2 months ago

However, when reconnecting, xpra does some commandline re-arrangements

It does, but like I said, it works fine for me from cmd.exe and from the MSYS2 shell. I tested this by killing the user's server-side ssh process.

leo-b commented 2 months ago

I tested this by killing the user's server-side ssh process.

So did I.

I guess that this will be the correct place where reconnect is handled:

Ah! I think I looked at the wrong place. Most likely this will be the relevant spot: https://github.com/Xpra-org/xpra/blob/4ead5528dcf1167c2bbdd52480bad6176b289460/xpra/scripts/main.py#L2456

Unfortunately there are no debug logging statements here. Could you add some that document args and attach_args handling for the next test build?

Btw.: I don't know if this is still relevant but there has been a suggestion to use the subprocess module instead of execv on windows:

https://bugs.python.org/issue19124#msg198599 and https://bugs.python.org/issue19124#msg389227

totaam commented 2 months ago

Could the problem come from here (see #4026): https://github.com/Xpra-org/xpra/blob/4ead5528dcf1167c2bbdd52480bad6176b289460/xpra/scripts/main.py#L2337-L2344

script_file = os.path.basename(script_file) os.path.abspath(script_file)

Somehow it is getting confused? (works for me from a python shell) Or maybe we should also stick it into attach_args[0].

Unfortunately there are no debug logging statements here.

I am a little bit wary of adding logging statements there, so added carefully in 5852c2a871827b3584c6997e2515c583c8d7788d, try 6.2-r36679 or later.

I don't know if this is still relevant but there has been a suggestion to use the subprocess module instead of execv on windows

These constraints are fine for us. We definitely don't want the old process lingering around, so terminating it as soon as the new process starts is fine.

leo-b commented 2 months ago

Could the problem come from here (see https://github.com/Xpra-org/xpra/issues/4026)

I don't think so. script_file and abs_script_file seem to be calculated correctly.

The error output shows that the Xpra_cmd.exe binary is found and executed. (I guess Invalid subcommand comes from the new Xpra_cmd process, right?)

C:\Windows\System32>Invalid subcommand 'Files\\Xpra\\Xpra_cmd.exe'

Files\\Xpra\\Xpra_cmd.exe is passed as the first argument. That's why I suspect a problem with args or respectively attach_args.

try 6.2-r36679 or later.

Thanks! Hopefully this will provide further insights..

leo-b commented 2 months ago

OK. Both abs_script_file and attach_args look good:

"C:\Program Files\Xpra\Xpra_cmd.exe" start ssh://leo@strike.wu.ac.at/100 --start-child=qterminal --exit-with-children=yes --audio=no --webcam=no -d client --ssh="plink"

CONNECTION_LOST, reconnecting
2024-09-13 13:36:17,440 debug enabled for ['xpra.scripts.main', 'client']
2024-09-13 13:36:17,443 reconnecting to {'display_name': 'ssh://leo@strike.wu.ac.at/100', 'cmdline': ['C:\\Program Files\\Xpra\\Xpra_cmd.exe', 'start', 'ssh://leo@strike.wu.ac.at/100', '--start-child=qterminal', '--exit-with-children=yes', '--audio=no', '--webcam=no', '-d', 'client', '--ssh=plink'], 'type': 'ssh', 'proxy_command': ['_proxy_start'], 'exit_ssh': True, 'remote_xpra': ['xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra', 'Xpra_cmd.exe'], 'username': 'leo', 'host': 'strike.wu.ac.at', 'local': False, 'port': 22, 'display': '100', 'display_as_args': [':100', '--ssh=plink', '--debug=client', '--audio=no', '--webcam=no', '--exit-with-children=yes', '--start-child=qterminal'], 'is_putty': True, 'agent': False, 'full_ssh': ['plink', '-l', 'leo', '-T', 'strike.wu.ac.at']} using script file 'C:\\Program Files\\Xpra\\Xpra_cmd.exe' and args=['C:\\Program Files\\Xpra\\Xpra_cmd.exe', 'attach', 'ssh://leo@strike.wu.ac.at/100', '--webcam=no', '-d', 'client', '--ssh=plink']
2024-09-13 13:36:17,449  derived from 'Xpra_cmd.exe' and ['C:\\Program Files\\Xpra\\Xpra_cmd.exe', 'start', 'ssh://leo@strike.wu.ac.at/100', '--start-child=qterminal', '--exit-with-children=yes', '--audio=no', '--webcam=no', '-d', 'client', '--ssh=plink']

C:\Program Files\Xpra>Invalid subcommand 'Files\\Xpra\\Xpra_cmd.exe'
Usage:
(this xpra installation does not support starting local servers)
        Program
        Program start [REMOTE-DISPLAY]
        Program start-desktop [REMOTE-DISPLAY]
        Program start-monitor [REMOTE-DISPLAY]
        Program shadow [DISPLAY]
        Program shadow-screen [DISPLAY]
        Program upgrade-shadow [DISPLAY]
        Program attach [DISPLAY]
        Program sessions
        Program launcher
        Program gui
        Program start-gui
        Program bug-report
        Program toolbox
        Program about
        Program example
        Program detach [DISPLAY]
        Program info [DISPLAY]
        Program id [DISPLAY]
        Program version [DISPLAY]
        Program stop [DISPLAY]
        Program exit [DISPLAY]
        Program screenshot filename [DISPLAY]
        Program control DISPLAY command [arg1] [arg2]..
        Program print DISPLAY filename
        Program shell [DISPLAY]
        Program send-file
        Program configure
        Program clean [DISPLAY1] [DISPLAY2]..
        Program clean-sockets [DISPLAY]
        Program clean-displays [DISPLAY]
        Program autostart
        Program showconfig
        Program setup-ssl
        Program show-ssl
        Program list
        Program list-sessions
        Program list-windows
        Program displays
        Program encoding
        Program path-info
        Program html5
        Program docs
        Program list-mdns
        Program mdns-gui

see 'man xpra' or 'xpra --help' for more details

So the problem could be inside microsofts windows c runtime version of execv?

Microsoft documentation states that spaces are not supported: https://learn.microsoft.com/en-us/cpp/c-runtime-library/exec-wexec-functions?view=msvc-170

Note

Spaces embedded in strings may cause unexpected behavior; for example, passing _exec the string "hi there" will result in the new process getting two arguments, "hi" and "there". If the intent was to have the new process open a file named "hi there", the process would fail. You can avoid this by quoting the string: "\"hi there\"".

Maybe that's why subprocess.Popen converts an args sequence to a string before calling CreateProcess: https://docs.python.org/3/library/subprocess.html#subprocess.Popen

On Windows, if args is a sequence, it will be converted to a string in a manner described in Converting an argument sequence to a string on Windows. This is because the underlying CreateProcess() operates on strings.

totaam commented 2 months ago

Based on this, I have added bdbf53f2d1c4c43cbe066456767547882095e24a (v6.2-r36680 or later) This doesn't break anything here, and perhaps it will help? I have been unable to reproduce your issue since the start, so I can't be sure.

leo-b commented 2 months ago

Based on this, I have added https://github.com/Xpra-org/xpra/commit/bdbf53f2d1c4c43cbe066456767547882095e24a (v6.2-r36680 or later) This doesn't break anything here, and perhaps it will help?

Thanks. But this won't work because it only quotes the program path, not the arguments. The problem is that attach_args is internally converted to a string (unquoted) by _execv before it is passed to CreateProcess.

This illustrates the problem:

"C:\Program Files\Xpra\Python_exec_cmd.exe" "import os; p='C:\\Program Files\\Xpra\\Python_exec_cmd.exe'; args=(p, 'import sys; print(sys.argv)'); print(args); os.execv(p, args)"
('C:\\Program Files\\Xpra\\Python_exec_cmd.exe', 'import sys; print(sys.argv)')

C:\Windows\System32>Traceback (most recent call last):
  File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
  File "C:/msys64/mingw64/lib/python3.11/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
  File "xpra/platform/win32/scripts/exec.py", line 20, in <module>
  File "<string>", line 1
    Files\Xpra\Python_exec_cmd.exe
          ^
SyntaxError: unexpected character after line continuation character

I didn't manage to get this working using os.execv(), not even when quoting the args. Most likely this is because shlex.quote() is designed for UNIX shells and subprocess does its own more complicated quoting.

However, we shouldn't use execv() on windows anyways. Windows documentation says that spaces are not handled correctly and python developers strongly advice to use subprocess instead.

Unfortunately windows simply doesn't provide a way to replace the running process like execv() does. So there are basically two choices:

  1. Spawn the new process and immediately exit the current. This is what the windows version of execv does according to this issue. Using subprocess, this would be done like that:
"C:\Program Files\Xpra\Python_exec_cmd.exe" "import sys, subprocess, os; p='C:\Program Files\Xpra\Python_exec_cmd.exe'; args=(p, 'import sys; print(sys.argv)'); print(args); subprocess.Popen(args); os._exit(0)"
  1. Spawn the new process, wait for the result and exit the waiting process with the return code of the new process:
"C:\Program Files\Xpra\Python_exec_cmd.exe" "import sys, subprocess; p='C:\Program Files\Xpra\Python_exec_cmd.exe'; args=(p, 'import sys; print(sys.argv)'); print(args); sys.exit(subprocess.run(args))"

In both variants subprocess takes care of the correct quoting of the command and its args. Both variants work fine on my system.

totaam commented 2 months ago

Well, that's a pain. I hope 2044b89cbe5767b61adfd6b00c5916198c7b9bf1 solves it. Try 6.2-r36682 or later.

leo-b commented 2 months ago

Yay!!! :partying_face: This one works! Thanks a lot!