xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 6 years ago

Closed 6 years ago

Last modified 12 months ago

#1259 closed defect (fixed)

~/.xpra/run-xpra gets bigger and bigger during every start

Reported by: floemker Owned by: floemker
Priority: minor Milestone: 1.0
Component: server Version: trunk
Keywords: Cc:


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="\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 33114\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 22"; export SSH_CONNECTION

Change History (5)

comment:1 Changed 6 years ago by Antoine Martin

Owner: changed from Antoine Martin to floemker

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="\ 52958\\ 22"
$ echo $SSH_CONNECTION\ 52958\\ 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.

Suggestions welcome.

comment:2 Changed 6 years ago by floemker


def sh_quotemeta(s):
    return "'" + s.replace("'", "'\\''") + "'"

or something similar (untested)?

comment:3 Changed 6 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Applied in r13057. Seems to work, but I won't be backporting this to older branches (seems too risky), at least not for now.

comment:4 Changed 5 years ago by Antoine Martin

Backported to v0.17.x branch in r14416 to fix #1357.

comment:5 Changed 12 months ago by migration script

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

Note: See TracTickets for help on using tickets.