d08c00befd
virt-manager-3.1.0.tar.bz2 - Drop patches contained in new tarball ba08f84b-addstorage-Return-to-using-qcow2-sparse-by-default.patch a010c49b-cli-Fix-os-variant-help-introspection.patch 79ebcbcb-viewers-Fix-spice-audio.patch e5a51f63-details-Change-Close-accelerator-to-ctrl+shift+w.patch 9c13d2f8-Remove-use-of-problematic-terminology.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=513
21 lines
887 B
Diff
21 lines
887 B
Diff
References: bnc#907958
|
|
Sanity check for those who forget '-X' on ssh and try to start virt-manager
|
|
Index: virt-manager-3.1.0/virtManager/virtmanager.py
|
|
===================================================================
|
|
--- virt-manager-3.1.0.orig/virtManager/virtmanager.py
|
|
+++ virt-manager-3.1.0/virtManager/virtmanager.py
|
|
@@ -62,8 +62,11 @@ def _import_gtk(leftovers):
|
|
print("gtk3 3.22.0 or later is required.")
|
|
sys.exit(1)
|
|
|
|
- # This will error if Gtk wasn't correctly initialized
|
|
- Gtk.init()
|
|
+ if 'DISPLAY' in os.environ 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
|
|
|
|
# This ensures we can init gsettings correctly
|