From 857c2355bc8750f9373bb2cda929786fe649c205 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Oct 2019 06:25:14 +0530 Subject: [PATCH] Ensure DISPLAY is in environ --- setup/publish.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/publish.py b/setup/publish.py index 526d2c8b34..1213237d7c 100644 --- a/setup/publish.py +++ b/setup/publish.py @@ -56,10 +56,14 @@ class Stage2(Command): session.append('title ' + x) session.append('launch ' + cmd) + env = os.environ.copy() + if 'DISPLAY' not in env: + env['DISPLAY'] = ':0' + p = subprocess.Popen([ 'kitty', '-o', 'enabled_layouts=vertical,stack', '-o', 'scrollback_lines=20000', '-o', 'close_on_child_death=y', '--session=-' - ], stdin=subprocess.PIPE) + ], stdin=subprocess.PIPE, env=env) p.communicate('\n'.join(session).encode('utf-8')) p.wait()