terminal.py (c342db356d4f451821781eb24eb9f3d39d6c0c5e) terminal.py (f3f93bb878a10643895ece0c3926547b853dff7b)
1#
2# SPDX-License-Identifier: GPL-2.0-only
3#
4import logging
5import oe.classutils
6import shlex
7from bb.process import Popen, ExecutionError
8from distutils.version import LooseVersion

--- 41 unchanged lines hidden (view full) ---

50
51class XTerminal(Terminal):
52 def __init__(self, sh_cmd, title=None, env=None, d=None):
53 Terminal.__init__(self, sh_cmd, title, env, d)
54 if not os.environ.get('DISPLAY'):
55 raise UnsupportedTerminal(self.name)
56
57class Gnome(XTerminal):
1#
2# SPDX-License-Identifier: GPL-2.0-only
3#
4import logging
5import oe.classutils
6import shlex
7from bb.process import Popen, ExecutionError
8from distutils.version import LooseVersion

--- 41 unchanged lines hidden (view full) ---

50
51class XTerminal(Terminal):
52 def __init__(self, sh_cmd, title=None, env=None, d=None):
53 Terminal.__init__(self, sh_cmd, title, env, d)
54 if not os.environ.get('DISPLAY'):
55 raise UnsupportedTerminal(self.name)
56
57class Gnome(XTerminal):
58 command = 'gnome-terminal -t "{title}" -x {command}'
58 command = 'gnome-terminal -t "{title}" -- {command}'
59 priority = 2
60
61 def __init__(self, sh_cmd, title=None, env=None, d=None):
62 # Recent versions of gnome-terminal does not support non-UTF8 charset:
63 # https://bugzilla.gnome.org/show_bug.cgi?id=732127; as a workaround,
64 # clearing the LC_ALL environment variable so it uses the locale.
65 # Once fixed on the gnome-terminal project, this should be removed.
66 if os.getenv('LC_ALL'): os.putenv('LC_ALL','')

--- 247 unchanged lines hidden ---
59 priority = 2
60
61 def __init__(self, sh_cmd, title=None, env=None, d=None):
62 # Recent versions of gnome-terminal does not support non-UTF8 charset:
63 # https://bugzilla.gnome.org/show_bug.cgi?id=732127; as a workaround,
64 # clearing the LC_ALL environment variable so it uses the locale.
65 # Once fixed on the gnome-terminal project, this should be removed.
66 if os.getenv('LC_ALL'): os.putenv('LC_ALL','')

--- 247 unchanged lines hidden ---