From 72d9dee37a6618739da0f619be0a96038fbdeb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 6 Apr 2020 11:22:16 +0200 Subject: [PATCH] live: keep $PATH and $DISPLAY --- tools/tuhi-live.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/tuhi-live.py b/tools/tuhi-live.py index b3a74c5..ee2d905 100755 --- a/tools/tuhi-live.py +++ b/tools/tuhi-live.py @@ -183,11 +183,15 @@ def drop_privileges(): os.setresuid(uid, uid, uid) pw = pwd.getpwuid(uid) + path = os.environ['PATH'] + display = os.environ['DISPLAY'] # we completely clear the environment and start a new and controlled one os.environ.clear() os.environ['XDG_RUNTIME_DIR'] = f'/run/user/{uid}' os.environ['HOME'] = pw.pw_dir + os.environ['PATH'] = path + os.environ['DISPLAY'] = display def parse(args):