In server.py::run_server() the shell script ~/.xpra/run_server is unconditionally newly written during every start. As PATH, LD_LIBRARY_PATH, and PYTHONPATH are written as
PATH="curValue":$PATH"; export PATH
these definitions get longer after every start. During every start one set of default values is added to these definitions.
The same is true for all string escaping. E.g. after some few server restarts:
SSH_CONNECTION="192.168.2.152\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 33114\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 192.168.2.115\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 22"; export SSH_CONNECTION
This obviously only occurs when starting the server via the run-xpra script, ie: when starting over ssh.
r13040 fixes the paths accumulating duplicates. (will backport)
The other one is more tricky. This is not what I expected to see (with tcsh or bash without the "set"):
$ set SSH_CONNECTION="127.0.0.1\ 52958\ 127.0.0.1\ 22" $ echo $SSH_CONNECTION 127.0.0.1\ 52958\ 127.0.0.1\ 22
Or more simply:
$ x="\ " $ echo $x \
Despite what I am reading here: Which characters need to be escaped in Bash? How do we know it?, it looks like the space character does not need escaping? Escaping it leads to the backslash ending up in the string... causing more trouble every time as it too gets escaped.
def sh_quotemeta(s): return "'" + s.replace("'", "'\\''") + "'"
or something similar (untested)?
Applied in r13057. Seems to work, but I won't be backporting this to older branches (seems too risky), at least not for now.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1259