Xpra: Ticket #1966: SSH: Paramiko fails to respect double quotes

For reference, both my server and client are Fedora 28 running trunk r20495 built from source.

Using xpra start ssh:user@host fails with Paramiko selected when a user gives a --start= flag that uses double quotes to run commands that are multiple words. For example, --start="xterm -hold -e dmesg" will fail, but --start=xterm does not.

I double checked that Paramiko was at fault by running the same commands with --ssh="ssh -X", and they go through just fine, and the session starts successfully. Unfortunately, I'm not getting any specific error in the client output, even with -d ssh, just the Xpra usage output that is given when a user enters an unrecognized option.

Interestingly, running xpra start-desktop ssh:user@host --start="xrandr -s 1920x1080" --start=i3 gives a different output:

2018-09-21 09:50:17,588 Error: failed to receive anything, not an xpra server?
2018-09-21 09:50:17,589   could also be the wrong protocol, username, password or port
2018-09-21 09:50:17,589   or the session was not found
2018-09-21 09:50:17,589 Connection lost

Running with -d ssh prints the following relevant line:

2018-09-21 09:51:16,269 Authentication (publickey) successful!
2018-09-21 09:51:16,282 will try to run xpra from: ['$XDG_RUNTIME_DIR/xpra/run-xpra', 'xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra']
2018-09-21 09:51:16,383 exec_command('which $XDG_RUNTIME_DIR/xpra/run-xpra')
2018-09-21 09:51:16,387 exit status is not ready yet, sleeping
2018-09-21 09:51:16,397 exit status is not ready yet, sleeping
2018-09-21 09:51:16,407 exit status is not ready yet, sleeping
2018-09-21 09:51:16,418 exec_command('which $XDG_RUNTIME_DIR/xpra/run-xpra')=0
2018-09-21 09:51:16,418 trying to open SSH session, window-size=134217727, timeout=60
2018-09-21 09:51:16,482 channel exec_command($XDG_RUNTIME_DIR/xpra/run-xpra "_proxy_start_desktop" ""--start=xrandr -s 1920x1080"" ""--start=i3"" ""--debug=ssh"")

I wonder if those double double quotes are to blame?



Fri, 21 Sep 2018 16:53:02 GMT - J. Max Mena: description changed

(forgot quotes, and clarified which command works as expected)


Sat, 22 Sep 2018 05:14:45 GMT - Antoine Martin: status changed; resolution set

FYI: the debug flag to use is -d ssh.

Fixed in r20497. (we were quoting command line arguments twice with paramiko)


Sat, 23 Jan 2021 05:38:34 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1966