xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Last modified 2 days ago

#2867 assigned defect

cli ssh assumes host is command

Reported by: devin Owned by: Antoine Martin
Priority: major Milestone: 4.1
Component: android Version: 4.0.x
Keywords: Cc:


I'm using xpra to start a graphical application on a host machine that is reached after 2 previous ssh connections. Unfortunately for some reason the way I write the connection command it has some problems. it currently treats the host of the xpra server as a command to run.

xpra start --ssh="ssh user@bastion ssh shell.bastion" ssh://user@activejob --remote-xpra="/home/u4/user/base_xpra" -d ssh
2020-08-28 10:46:03,287 parse_ssh_string(ssh user@bastion ssh shell.bastion)
Warning: vendor 'Intel Open Source Technology Center' is greylisted,
 you may want to turn off OpenGL if you encounter bugs
2020-08-28 10:46:04,207 Xpra GTK3 X11 client version 4.0.2-r26625 64-bit
2020-08-28 10:46:04,319  running on Linux Ubuntu 20.04 focal
2020-08-28 10:46:04,322  window manager is 'GNOME Shell'
2020-08-28 10:46:04,349 Warning: failed to import opencv:
2020-08-28 10:46:04,349  No module named 'cv2'
2020-08-28 10:46:04,350  webcam forwarding is disabled
2020-08-28 10:46:04,669 GStreamer version 1.16.2 for Python 3.8.2 64-bit
2020-08-28 10:46:04,670 Warning: no pulseaudio information available
2020-08-28 10:46:04,670  No module named 'distutils.spawn'
2020-08-28 10:46:04,830 No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
2020-08-28 10:46:05,111 Warning: vendor 'Intel Open Source Technology Center' is greylisted,
2020-08-28 10:46:05,111  you may want to turn off OpenGL if you encounter bugs
2020-08-28 10:46:05,216 OpenGL enabled with Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
2020-08-28 10:46:05,229 executing ssh command: "ssh" "user@bastion" "ssh" "shell.bastion" "-l" "user" "-T" "activejob" "sh -c 'xpra initenv;if [ -x /home/u4/user/base_xpra ]; then /home/u4/user/base_xpra _proxy_start "--ssh=ssh user@bastion ssh shell.bastion" "--debug=ssh" "--remote-xpra=/home/u4/user/base_xpra";else echo "no run-xpra command found"; exit 1; fi'"
2020-08-28 10:46:05,355  keyboard settings: rules=evdev, model=pc105, layout=us
2020-08-28 10:46:05,358  desktop size is 1366x768 with 1 screen:
2020-08-28 10:46:05,358   :0.0 (361x203 mm - DPI: 96x96) workarea: 1294x741 at 72x27
2020-08-28 10:46:05,358     BOE LVDS-1 (309x173 mm - DPI: 112x112)
bash: activejob: command not found
bash: line 2: syntax error near unexpected token `('
bash: line 2: `Tp��~�g�fc՟�&�V�&���L%\��Z�d3�{�ZX'�k���i�^�yb���Y�r���c�j�NZ@RfT�ibS����-Np�nJ�F�wbS���lI�W��+��!��0�)dr�ᤣ�j�5'�8�M[���&�B���n�M7*�k
                                                        ����	��Ŋ5Ә��ʆ�X�6\����Y;s���(���u˭7�	��Fa��s�<тr��8��歠޹�qo;
/home/u4/user/base_xpra: line 2: singularity: command not found
2020-08-28 10:46:07,606 Error: failed to receive anything, not an xpra server?
2020-08-28 10:46:07,606   could also be the wrong protocol, username, password or port
2020-08-28 10:46:07,607   or the session was not found
2020-08-28 10:46:07,607 Connection lost

Change History (3)

comment:1 Changed 3 weeks ago by devin

Version: 3.0.x4.0.x

oops, selected the wrong version. I'm running xpra 4.0.x

comment:2 Changed 4 days ago by Antoine Martin

Status: newassigned

Here's a more simple test case, without using remote-xpra (which is not relevant to this ticket), and using variations on localhost to keep things simple.

First, no hop:

xpra attach --ssh="ssh -v" ssh://antoine@localhost/ -d ssh
parse_ssh_string(ssh -v)
executing ssh command: "ssh" "-v" "-l" "antoine" "-T" "localhost" \
    "sh -c 'xpra initenv;if .. exit 1; fi'"

With one hop - using to distinguish it from localhost:

xpra attach --ssh="ssh -v -A localhost ssh -v" ssh://antoine@ -d ssh
parse_ssh_string(ssh -v -A localhost ssh -v)
executing ssh command: "ssh" "-v" "-A" "localhost" "ssh" "-v" "-l" "antoine" "-T" "" "sh -c 'xpra initenv;if .. exit 1; fi'"

With two hops - using localhost.localdomain to distinguish that part:

xpra attach --ssh="ssh -v -A localhost ssh -v -A localhost.localdomain ssh -v" ssh://antoine@ -d ssh
parse_ssh_string(ssh -v -A localhost ssh -v -A localhost.localdomain ssh -v)
executing ssh command: "ssh" "-v" "-A" "localhost" "ssh" "-v" "-A" "localhost.localdomain" "ssh" "-v" "-l" "antoine" "-T" "" "sh -c 'xpra initenv;if .. exit 1; fi'"

It still fails mysteriously with 2 hops, which I will investigate.

But your command was never going to work, it should have been something like:

xpra start --ssh="ssh user1@host1 ssh user2@host2 ssh" ssh://user3@host3

To go 1-2-3.

comment:3 Changed 2 days ago by devin

Thanks for looking into this further, and yes that last ssh in the --ssh="...... ssh" appears to be what was missing leading to the final host being treated as a command to run. I'm certainly still looking for ways to not require the numerous hops as that is the best case scenario, but that's not an xpra related issue =D. Thanks again!

Note: See TracTickets for help on using tickets.