Xpra: Ticket #1000: remote xpra connection fails with fish shell

xpra fails to connect to remote host if user is using fish as default shell with log:

lapsio@linux-6o92 ~> xpra attach "ssh:pi:12"
2015-10-13 19:37:11,772 rencode import error: No module named rencode
2015-10-13 19:37:11,927 Warning: zlib is the only compressor enabled
2015-10-13 19:37:11,927  install and enable lzo or lz4 support for better performance
2015-10-13 19:37:11,927 Warning: 'rencode' packet encoder not found
2015-10-13 19:37:11,927  the other packet encoders are much slower
2015-10-13 19:37:11,927 xpra gtk2 client version 0.15.5 (r10506)
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
2015-10-13 19:37:12,168 OpenGL_accelerate module loaded
2015-10-13 19:37:12,168 Using accelerated ArrayDatatype
2015-10-13 19:37:12,169 OpenGL support could not be enabled:
2015-10-13 19:37:12,169  vendor 'VMware, Inc.' is blacklisted!
2015-10-13 19:37:12,276 detected keyboard: rules=evdev, model=pc104, layout=us
2015-10-13 19:37:12,276 desktop size is 5760x2560 with 1 screen(s):
2015-10-13 19:37:12,277   ':12.0' (1463x650 mm - DPI: 100x100) workarea: 1366x714
2015-10-13 19:37:12,277     screen
Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
fish: xpra initenv || echo "Warning: xpra server does not support initenv" 1>&2;~/.xpra/run-xpra _proxy :12
2015-10-13 19:37:16,011 failed to receive anything, not an xpra server?
2015-10-13 19:37:16,011   could also be the wrong username, password or port
2015-10-13 19:37:16,011   or maybe this server does not support 'unknown' compression or 'bencode' packet encoding?
2015-10-13 19:37:16,012 Connection lost

Tue, 13 Oct 2015 17:51:56 GMT - Antoine Martin: owner, description changed

You should be able to workaround this with:

XPRA_INITENV_COMMAND="xpra initenv" xpra attach ssh:...

This will be the default in version 0.16

Fri, 23 Oct 2015 06:45:20 GMT - Antoine Martin: status changed; resolution set

Not heard back and not going to backport this to older branches, so closing.

Mon, 09 May 2016 21:30:26 GMT - Léo: status, version changed; resolution, milestone deleted

This was indeed fixed in 0.16 (thank you), but seems to have been broken in 0.17 after adding support for XDG (#1129).

2016-05-09 23:43:07,711  detected keyboard: rules=evdev, model=pc105, layout=fr
2016-05-09 23:43:07,713  desktop size is 1366x768 with 1 screen:
2016-05-09 23:43:07,713   :0.0 (361x203 mm - DPI: 96x96)
2016-05-09 23:43:07,713     monitor 1 (344x194 mm - DPI: 100x100)
Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
fish: xpra initenv;~/.xpra/run-xpra _proxy :100 || $XDG_RUNTIME_DIR/xpra/run-xpra _proxy :100 || xpra _proxy :100

Tue, 10 May 2016 06:18:58 GMT - Antoine Martin:

Can you please figure out a syntax that will work with fish as well as the more common shells? (it works for 99.9% of users - I'm reluctant to change it)

Tue, 10 May 2016 07:44:52 GMT - Léo:

There's simply no way to get the "or" in fish without using its own syntax.

Would it instead be possible to launch xpra initenv using sh -c? For example:

sh -c "xpra initenv;~/.xpra/run-xpra _proxy :100 || $XDG_RUNTIME_DIR/xpra/run-xpra _proxy :100 || xpra _proxy :100"

…so that xpra does not depend on the default shell and gets a POSIX-compliant shell.

XPRA_INITENV_COMMAND also doesn't seem to work anymore -- it used to be a workaround to completely remove the \|\| which caused issues in the init command.

Thu, 08 Sep 2016 23:27:40 GMT - Keunhong Park: attachment set

Fixes shell dependence.

Thu, 08 Sep 2016 23:28:41 GMT - Keunhong Park:

Here's a patch to fix this issue. This runs the commands using 'sh -c' which circumvents the issue of the default shell being different.

Also I think it'd be useful to have a contribution guide somewhere. It's not clear where/how to contribute changes to. The whole svn + trac thing seems a bit archaic.

Fri, 09 Sep 2016 02:12:40 GMT - Antoine Martin: status changed

Here's a patch to fix this issue.


Also I think it'd be useful to have a contribution guide somewhere. It's not clear where/how to contribute changes to.

I have added information here: http://xpra.org/trac/wiki/FAQ?action=diff&version=73 Let me know if there's anything else missing.

Fri, 09 Sep 2016 02:45:20 GMT - Keunhong Park: attachment set

Fri, 09 Sep 2016 02:56:34 GMT - Keunhong Park:

Thanks for the guide :) I didn't mean to suggest that you shouldn't be using svn if that's the message you got. The contribution process just isn't familiar to me.

Fri, 09 Sep 2016 03:02:53 GMT - Antoine Martin: status changed; resolution set

Thanks, applied in r13622. OTOH, the only thing this could break is when people use a restricted ssh shell command. Tough.

Closing, feel free to re-open if I've missed something.

Fri, 13 Jan 2017 09:25:03 GMT - Antoine Martin:

This has caused a regression: #1407.

Sat, 23 Jan 2021 05:12:06 GMT - migration script:

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