Skip to content

Commit

Permalink
the exec-wrapper may have multiple arguments, only resolve the command
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Apr 2, 2021
1 parent a340bac commit 709959f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions xpra/scripts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1442,10 +1442,18 @@ def fixup_clipboard(options):

def abs_paths(options):
ew = options.exec_wrapper
if ew and not os.path.isabs(ew):
ew = which(ew)
if ew:
options.exec_wrapper = ew
if ew:
import shlex
ewp = shlex.split(ew)
if ewp and not os.path.isabs(ewp[0]):
abscmd = which(ewp[0])
if abscmd:
ewp[0] = abscmd
try:
options.exec_wrapper = shlex.join(ewp)
except AttributeError:
#(shlex.join requires Python 3.8)
options.exec_wrapper = " ".join(shlex.quote(x) for x in ewp)
#convert to absolute paths before we daemonize
for k in ("clipboard-filter-file",
"tcp-encryption-keyfile", "encryption-keyfile",
Expand Down

0 comments on commit 709959f

Please sign in to comment.