mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-08 04:58:29 +03:00
virt-manager: fix git startup on wayland
Apparently we need to do these env settings much earlier...
This commit is contained in:
parent
483a8de6c1
commit
7ad15769dc
@ -197,6 +197,11 @@ def main():
|
||||
import libvirt
|
||||
virtManager.module_trace.wrap_module(libvirt, regex=None)
|
||||
|
||||
# With F27 gnome+wayland we need to set these before GTK import
|
||||
os.environ["GSETTINGS_SCHEMA_DIR"] = CLIConfig.gsettings_dir
|
||||
if options.test_first_run:
|
||||
os.environ["GSETTINGS_BACKEND"] = "memory"
|
||||
|
||||
# Now we've got basic environment up & running we can fork
|
||||
do_drop_stdio = False
|
||||
if not options.no_fork and not options.debug:
|
||||
|
@ -37,12 +37,8 @@ class _SettingsWrapper(object):
|
||||
we internally convert it to the settings nested hierarchy. Makes
|
||||
client code much smaller.
|
||||
"""
|
||||
def __init__(self, settings_id, schemadir, test_first_run):
|
||||
def __init__(self, settings_id):
|
||||
self._root = settings_id
|
||||
|
||||
os.environ["GSETTINGS_SCHEMA_DIR"] = schemadir
|
||||
if test_first_run:
|
||||
os.environ["GSETTINGS_BACKEND"] = "memory"
|
||||
self._settings = Gio.Settings.new(self._root)
|
||||
|
||||
self._settingsmap = {"": self._settings}
|
||||
@ -185,8 +181,7 @@ class vmmConfig(object):
|
||||
self.test_first_run = bool(test_first_run)
|
||||
self.test_leak_debug = False
|
||||
|
||||
self.conf = _SettingsWrapper("org.virt-manager.virt-manager",
|
||||
CLIConfig.gsettings_dir, self.test_first_run)
|
||||
self.conf = _SettingsWrapper("org.virt-manager.virt-manager")
|
||||
|
||||
# We don't create it straight away, since we don't want
|
||||
# to block the app pending user authorization to access
|
||||
|
Loading…
x
Reference in New Issue
Block a user