From 2c015cc24d4e3c5c575bb24361cb4120e7721076 Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Wed, 15 Jun 2016 15:30:21 +0200 Subject: [PATCH] fixes #80 --- Pyxis/bin/pyxis | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Pyxis/bin/pyxis b/Pyxis/bin/pyxis index c0b83f7..888576c 100755 --- a/Pyxis/bin/pyxis +++ b/Pyxis/bin/pyxis @@ -270,10 +270,15 @@ if __name__ == "__main__": args.append("-d"); if SPAWN_SCREEN_LOG: args.append("-L"); - args += sys.argv; - args.append("--running-in-screen"); - if PAUSE_ON_EXIT and "--pause-on-exit" not in args: - args.append("--pause-on-exit"); + args += [ "bash", "-ci" ] + pyxis_args = sys.argv + pyxis_args.append("--running-in-screen"); + if PAUSE_ON_EXIT and "--pause-on-exit" not in pyxis_args: + pyxis_args.append("--pause-on-exit"); + # now turn the pyxis args list into a something that bash -c will process + # quote the single quotes in arguments + pyxis_args = [ re.sub(r'(["\'$` ])',r'\\\1',x) for x in pyxis_args ] + args.append(' '.join(pyxis_args)) os.execv(screenpath,args); Pyxis.Internals.saveconf();