d3bd34b891
virtman-check-for-valid-display.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=213
17 lines
676 B
Diff
17 lines
676 B
Diff
--- virt-manager-1.1.0/virt-manager.orig 2014-12-02 12:08:47.000000000 -0700
|
|
+++ virt-manager-1.1.0/virt-manager 2014-12-02 12:09:20.000000000 -0700
|
|
@@ -175,8 +175,11 @@ def main():
|
|
from gi.repository import Gtk
|
|
leftovers = sys.argv[1:]
|
|
|
|
- # This will error if Gtk wasn't correctly initialized
|
|
- Gtk.Window()
|
|
+ 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
|