Closed leo-b closed 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.
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
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.
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
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 ofexecv
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.
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..
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.
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.
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:
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)"
"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.
Well, that's a pain. I hope 2044b89cbe5767b61adfd6b00c5916198c7b9bf1 solves it. Try 6.2-r36682 or later.
Yay!!! :partying_face: This one works! Thanks a lot!
On windows, xpra seems to incorrectly parse the command and its arguments when reconnecting after the ssh connection has been lost.
This connection works fine but xpra crashes when reconnecting after the ssh connection had been lost:
I could avoid calling Xpra_cmd with the full path of course, but for enabling ssh agent forwarding, I am using:
... which also leads to the same problem when parsing
--ssh="plink -A"
: