I noticed that the socket-dirs defaults never actually get used. This was confusing, because showconfig vs. --help would indicate different "defaults." This patch changes that - the defaults as shown by showconfig will actually be used.
I'm not sure the patch is correct: the idea for some settings stored as lists is to leave them empty before parsing the command line so that if the user overrides them on the command line then we will use those values, otherwise we use the defaults.
How did you figure out that socket-dirs
was not used? What exact commands?
Replying to Antoine Martin:
I'm not sure the patch is correct: the idea for some settings stored as lists is to leave them empty before parsing the command line so that if the user overrides them on the command line then we will use those values, otherwise we use the defaults.
How did you figure out that
socket-dirs
was not used? What exact commands?
xpra start
was working, because do_run_server()
would pull in the defaults itself using get_socket_dirs()
. However, e.g. xpra attach :1
would simply not work - it couldn't find any of the sockets. Also, xpra showconfig
would show both "used" and "default" values for socket-dirs
, even when socket-dirs
wasn't set anywhere - and since the "used" value was just []
, attach
would not work.
Please see the attached replacement patch, which makes slightly more aggressive changes. It changes the optparse
action
to "store"
, instead of "append"
, to achieve the behavior you specified. It also changes fixup_socketdirs()
to not pull in defaults itself (making it a bit more consistent with the other fixup_
* functions). It similarly changes do_run_server()
to not pull in socket_dirs
defaults itself, as they will already be set (and setup_local_sockets()
would raise an exception anyway).
Thanks! Applied in r23762.
(it's nice to be able to remove the "defaults" argument to fixup_options
)
I've ran the full set of unit tests on most platforms without problems.
See also #2411.
Replying to Antoine Martin:
Thanks! Applied in r23762. (it's nice to be able to remove the "defaults" argument to
fixup_options
)I've ran the full set of unit tests on most platforms without problems.
See also #2411.
Thank you! I love Xpra!
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2407