#1000 closed defect (fixed)
remote xpra connection fails with fish shell
Reported by: | lapsio | Owned by: | lapsio |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | client | Version: | 0.17.x |
Keywords: | Cc: |
Description (last modified by )
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 Password: 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
Attachments (2)
Change History (13)
comment:1 Changed 5 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from Antoine Martin to lapsio |
comment:2 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Not heard back and not going to backport this to older branches, so closing.
comment:3 Changed 5 years ago by
Milestone: | 0.16 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | 0.15.x → 0.17.x |
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
comment:4 Changed 5 years ago by
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)
comment:5 Changed 5 years ago by
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.
comment:6 Changed 4 years ago by
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.
comment:7 Changed 4 years ago by
Status: | reopened → new |
---|
Here's a patch to fix this issue.
Comments:
- the patch doesn't work with python 2.6 which is still supported. Use this syntax instead:
cmd.append("sh -c '%s'" % remote_cmd)
- why do you remove the check for
INITENV_COMMAND
, this is likely to break things if the value is not set - how many other shells have you tested this on? (this change has the potential to break a very large number of currently working setups, and I don't have enough time or incentive to thoroughly test them all)
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.
Changed 4 years ago by
Attachment: | fix-fish2.patch added |
---|
comment:8 Changed 4 years ago by
- Fixed.
- The check is still there and equivalent to before. Just instead of appending to 'cmd' it's being passed to the string formatter which then updates cmd.
- I've tested it with fish, bash, csh, zsh, and sh. This should be completely agnostic to the shell though considering sh is part of the POSIX standard. I'm not sure if there are any setups where /bin/sh would be missing.
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.
comment:9 Changed 4 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
comment:11 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1000
You should be able to workaround this with:
This will be the default in version 0.16