mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ensure DISPLAY is in environ
This commit is contained in:
parent
28b5ef8723
commit
857c2355bc
@ -56,10 +56,14 @@ class Stage2(Command):
|
|||||||
session.append('title ' + x)
|
session.append('title ' + x)
|
||||||
session.append('launch ' + cmd)
|
session.append('launch ' + cmd)
|
||||||
|
|
||||||
|
env = os.environ.copy()
|
||||||
|
if 'DISPLAY' not in env:
|
||||||
|
env['DISPLAY'] = ':0'
|
||||||
|
|
||||||
p = subprocess.Popen([
|
p = subprocess.Popen([
|
||||||
'kitty', '-o', 'enabled_layouts=vertical,stack', '-o', 'scrollback_lines=20000',
|
'kitty', '-o', 'enabled_layouts=vertical,stack', '-o', 'scrollback_lines=20000',
|
||||||
'-o', 'close_on_child_death=y', '--session=-'
|
'-o', 'close_on_child_death=y', '--session=-'
|
||||||
], stdin=subprocess.PIPE)
|
], stdin=subprocess.PIPE, env=env)
|
||||||
|
|
||||||
p.communicate('\n'.join(session).encode('utf-8'))
|
p.communicate('\n'.join(session).encode('utf-8'))
|
||||||
p.wait()
|
p.wait()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user