checking if DISPLAY is set before instanciating Terminator
This commit is contained in:
parent
79095bc52b
commit
87228eca79
|
@ -844,7 +844,6 @@ class Terminator:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.conf = config.TerminatorConfig (stores)
|
self.conf = config.TerminatorConfig (stores)
|
||||||
|
|
||||||
self.window = gtk.Window ()
|
self.window = gtk.Window ()
|
||||||
self.window.set_title (APP_NAME.capitalize())
|
self.window.set_title (APP_NAME.capitalize())
|
||||||
|
|
||||||
|
@ -1426,7 +1425,6 @@ class Terminator:
|
||||||
term.reconfigure_vte ()
|
term.reconfigure_vte ()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
def execute_cb (option, opt, value, parser):
|
def execute_cb (option, opt, value, parser):
|
||||||
assert value is None
|
assert value is None
|
||||||
value = []
|
value = []
|
||||||
|
@ -1461,6 +1459,11 @@ if __name__ == '__main__':
|
||||||
if (options.execute):
|
if (options.execute):
|
||||||
command = options.execute
|
command = options.execute
|
||||||
|
|
||||||
|
if gtk.gdk.display_get_default() == None:
|
||||||
|
print >> sys.stderr, _("You need to run terminator in an X environment. " \
|
||||||
|
"Make sure DISPLAY is properly set")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
term = Terminator (options.profile, command, options.fullscreen, options.maximise, options.borderless)
|
term = Terminator (options.profile, command, options.fullscreen, options.maximise, options.borderless)
|
||||||
|
|
||||||
gtk.main ()
|
gtk.main ()
|
||||||
|
|
Loading…
Reference in New Issue