2015-05-04 22:15:01 +02:00
|
|
|
References: bnc#907958
|
|
|
|
Sanity check for those who forget '-X' on ssh and try to start virt-manager
|
2016-06-22 00:34:03 +02:00
|
|
|
Index: virt-manager-1.4.0/virt-manager
|
2015-05-04 22:15:01 +02:00
|
|
|
===================================================================
|
2016-06-22 00:34:03 +02:00
|
|
|
--- virt-manager-1.4.0.orig/virt-manager
|
|
|
|
+++ virt-manager-1.4.0/virt-manager
|
|
|
|
@@ -79,8 +79,11 @@ def _import_gtk(leftovers):
|
|
|
|
print "gtk3 3.14.0 or later is required."
|
|
|
|
sys.exit(1)
|
2014-12-02 20:14:30 +01:00
|
|
|
|
|
|
|
- # This will error if Gtk wasn't correctly initialized
|
2016-06-22 00:34:03 +02:00
|
|
|
- Gtk.init()
|
2014-12-02 20:14:30 +01:00
|
|
|
+ if os.environ.has_key('DISPLAY') and os.environ['DISPLAY']:
|
|
|
|
+ # This will error if Gtk wasn't correctly initialized
|
|
|
|
+ Gtk.Window()
|
|
|
|
+ else:
|
|
|
|
+ raise Exception("Error starting virt-manager: No graphical display found")
|
|
|
|
|
|
|
|
globals()["Gtk"] = Gtk
|
|
|
|
import virtManager.config
|