#1244 closed defect (fixed)
--socket-dir option is ignored
Reported by: | nyavango | Owned by: | nyavango |
---|---|---|---|
Priority: | minor | Milestone: | 1.0 |
Component: | core | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
Shortly telling, --socket-dir
option has no effect. xpra start creates socket in default location, xpra attach seeks sockets in default location.
Steps to reproduce:
- create
${HOME}/.testXpra
directory to store sockets - run
xpra --socket-dir=${HOME}/.testXpra start :19
- expects: socket number 19 in
${HOME}/.testXpra
directory - get: socket number 19 in
${HOME}/.xpra
directory - get:
${HOME}/.testXpra
directory is empty - run
xpra --socket-dir=${HOME}/.testXpra
- expects: empty list, because
${HOME}/.testExpra
is empty - got: list contains single live session at :19
So, from practical perspective --socket-dir
is ignored. But it is still correctly parsed. If I replace it with --socket-diir
for example, I would get parse error.
version: 0.17.3
OS: Gentoo Linux, rolling release.
Attachments (1)
Change History (10)
Changed 5 years ago by
Attachment: | list-socket-dir-only.patch added |
---|
comment:1 Changed 5 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from Antoine Martin to nyavango |
The problem comes from the changes for #963: we now allow multiple sockets to be created for a single server.
The problem with the socket being created in the "wrong" directory comes from the fact that the bind option defaults to a specific path (~/.xpra/) in the default config we ship.
And so when we try to create the sockets, this takes precedence over socket-dir.
This should be fixed in r12947 by switching to "auto" by default.
You can workaround this by:
- editing
/etc/xpra/xpra.conf
and setting bind to auto - using
--bind=$HOME/.testXpra
on the command line - using an absolute path for your socket on the command line, etc..
The second part (fixing "xpra list" to only search "socket-dir") is much harder to fix properly. The patch attached would only search socket-dir, but this is likely to cause more problems than it solves: it would make it impossible to list any sockets not found in "socket-dir" once this option is used. And that's bad, so I will probably just leave it as it is.
Please close if this works for you.
comment:2 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I afraid socket-dir-only.patch is too forceful. DotExpra
is seemed to be used not only for sockets, but for logs too.
I've tried to set bind option in /etc/xpra/xpra.conf file to auto, and it satisfies all practical needs. So the ticket itself not a bug, but explanation for how to use xpra features properly. There is no need to exclude .xpra sessions from listing explicitly. So all works, fine, it was just a misunderstanding after upgrading from 0.16.x version.
comment:4 Changed 4 years ago by
I'm facing this bug again in xpra v1.0.3-r15051. Maybe I misunderstand something.
I checked the config files, bind
ist set to auto
. I also tried --bind=auto
on command line, but the socket does not appear in the folder I specified with --socket-dir
.
If I use --socket-dir
along with --bind=/path/to/socketdir
, the socket appears, but if I try to connect to it (with xpra client v0.17.6) I get this error:
2017-03-12 14:23:07,850 New unix-domain connection received on /x11docker/socket/f89aa1c31337-522 2017-03-12 14:23:07,864 Handshake complete; enabling connection 2017-03-12 14:23:08,070 Warning: xxhash python bindings not found 2017-03-12 14:23:08,071 no scrolling detection 2017-03-12 14:23:08,094 server error processing new connection from Protocol(unix-domain socket:/x11docker/socket/f89aa1c31337-522): No module named dbus Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/xpra/server/server_core.py", line 893, in _process_hello self.hello_oked(proto, packet, c, auth_caps) File "/usr/lib/python2.7/dist-packages/xpra/server/server_base.py", line 1115, in hello_oked self.default_speed, self.default_min_speed) File "/usr/lib/python2.7/dist-packages/xpra/server/source.py", line 357, in __init__ self.dbus_server = dbus_exception_wrap(make_dbus_server, "setting up client dbus instance") File "/usr/lib/python2.7/dist-packages/xpra/server/dbus/dbus_common.py", line 12, in dbus_exception_wrap v = fn() File "/usr/lib/python2.7/dist-packages/xpra/server/source.py", line 355, in make_dbus_server from xpra.server.dbus.dbus_source import DBUS_Source File "/usr/lib/python2.7/dist-packages/xpra/server/dbus/dbus_source.py", line 7, in <module> from xpra.dbus.helper import dbus_to_native File "/usr/lib/python2.7/dist-packages/xpra/dbus/helper.py", line 7, in <module> import dbus ImportError: No module named dbus 2017-03-12 14:23:08,097 Disconnecting client /x11docker/socket/f89aa1c31337-522: 2017-03-12 14:23:08,097 server error (error accepting new connection)
I have set --no-notifications
on both server and client. xpra server is within a docker container, xpra client is on host.
As newer xpra versions can handle multiple sockets, can't just be created one more in the directory specified by --socket-dir
? That would preserve backwards compatibility.
comment:5 Changed 4 years ago by
That's a completely different bug (you don't have python dbus installed), which is fixed in 1.0.4
comment:6 Changed 4 years ago by
ok, thanks, installing python-dbus fixes that error.
But the core point persists: in xpra 1.03 --socket-dir
only works with setting --bind=/path/to/socketdir
. Setting --bind=auto
does not work, no socket is created in the specified path.
Older versions of xpra does not accept --bind=/path/to/socketdir
. I get:
cannot start server: failed to setup sockets: TCP port must be specified as [HOST]:PORT
I know, you don't like it people using older versions ;-). But as I provide a tool for everyone, I try to be compatible with every xpra version that may be installed. I can (and do) recommend to install from your repo, but don't want my tool to fail if there is an older version on other systems.
I can make a workaround, checking xpra version and using different commands to run xpra depending on its version number.
It would be more nice if xpra is backwards compatible with -- socket-dir
if the config file contains bind = auto
. That was the way I understood your comment above.
comment:7 Changed 4 years ago by
@mviereck: try r15287, it does what you want - I guess it can be argued that this fixes command line backwards compatibility so this may get applied at some point to the 1.0.x branch - but it will need further testing first, 2.0 is likely to be released before the next 1.0 update anyway so this should happen.
As for "not liking people using older versions": what people do is their own business, but:
- some distributions (Debian / Ubuntu in particular) ship outdated versions full of serious bugs (crashes or critical security issues) and I want no responsibility with the serious risks involved
- dealing with bug reports on those versions is usually a waste of time (fixed already)
comment:8 Changed 4 years ago by
Thank you, I've tested with xpra v2.0-r15319, now --socket-dir works on its own again without using --bind.
comment:9 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1244
fix for xpra list - with just too many disadvantages