Update gnome-terminal call
`-e` now warns about deprecation, so use `--` instead (and unquote).
I finally found gnome-terminal's nofork option:
Since it should now work reliably, move it up the list of terminal.
@@ -399,11 +399,12 @@ end tell
return None
elif system == 'linux':
for term, arg_factory in [('konsole', lambda a: ['--nofork', '-e', a]),
+ ('gnome-terminal', lambda a: [
+ '--disable-factory-', '--',
+ '/bin/sh', '-c', a]),
('lxterminal', lambda a: ['--command=' + a]),
('rxvt', lambda a: ['-e', a]),
- ('xterm', lambda a: ['-e', a]),
- # gnome-terminal needs some kind of --nofork
- ('gnome-terminal', lambda a: ['-x', a])]:
+ ('xterm', lambda a: ['-e', a])]:
if find_command(term) is not None:
args = arg_factory(cmd)
subprocess.check_call([term] + args, stdin=subprocess.PIPE)
