Digimer
2015-Nov-10 06:00 UTC
[libvirt-users] Telling virt-manager to re-read ~/.gconf in RHEL 6
Hi all, I've written a tool that configured Virtual Machine Manager, but I've got a condition that I am now sure how to handle... If the user isn't logged in and I configure their ~/.gconf/apps/virt-manager/*, and then they log in, everything works great. However, if they've already logged in and there was no prior virt-manager configuration, the custom config is overwritten and lost when the user logs out. Similarly, if VMM is closed, I write the config and then they open VMM (again, having logged into gnome where there was no ~/.gconf/apps/virt-manager), it acts like there is no configuration (it tries to auto-connect to localhost and doesn't show the remote machines). I am guessing this behaviour is a because VMM doesn't check it's configuration file after logging into gnome (either at all, or at least when there was no config at gnome login). Is there a way I can tell virt-manager to re-check the config? Thanks! -- Digimer Papers and Projects: https://alteeve.ca/w/ What if the cure for cancer is trapped in the mind of a person without access to education?
Martin Kletzander
2015-Nov-10 07:10 UTC
Re: [libvirt-users] Telling virt-manager to re-read ~/.gconf in RHEL 6
[adding virt-tools-list to Cc] On Tue, Nov 10, 2015 at 01:00:01AM -0500, Digimer wrote:>Hi all, > > I've written a tool that configured Virtual Machine Manager, but I've >got a condition that I am now sure how to handle... > > If the user isn't logged in and I configure their >~/.gconf/apps/virt-manager/*, and then they log in, everything works >great. However, if they've already logged in and there was no prior >virt-manager configuration, the custom config is overwritten and lost >when the user logs out. > > Similarly, if VMM is closed, I write the config and then they open VMM >(again, having logged into gnome where there was no >~/.gconf/apps/virt-manager), it acts like there is no configuration (it >tries to auto-connect to localhost and doesn't show the remote machines). >I have no idea how these gconf things work. But I remember there were two pieces of configuration that needed to be changed, I've done that through some gconftool GUI, though. Have you tried using gconftool-2 CLI (or anythign similar) for setting up the configuration instead of overwriting the config files? It looks like there needs to be something else done in order for the config to be read and not overridden by virt-manager, but it doesn't sound like virt-manager specific thing, but more like as Gtk or GConf specific.> I am guessing this behaviour is a because VMM doesn't check it's >configuration file after logging into gnome (either at all, or at least >when there was no config at gnome login). > > Is there a way I can tell virt-manager to re-check the config? > >Thanks! > >-- >Digimer >Papers and Projects: https://alteeve.ca/w/ >What if the cure for cancer is trapped in the mind of a person without >access to education? > >_______________________________________________ >libvirt-users mailing list >libvirt-users@redhat.com >https://www.redhat.com/mailman/listinfo/libvirt-users
Christophe Fergeau
2015-Nov-16 08:39 UTC
Re: [libvirt-users] [virt-tools-list] Telling virt-manager to re-read ~/.gconf in RHEL 6
On Tue, Nov 10, 2015 at 08:10:43AM +0100, Martin Kletzander wrote:> [adding virt-tools-list to Cc] > > On Tue, Nov 10, 2015 at 01:00:01AM -0500, Digimer wrote: > >Hi all, > > > > I've written a tool that configured Virtual Machine Manager, but I've > >got a condition that I am now sure how to handle... > > > > If the user isn't logged in and I configure their > >~/.gconf/apps/virt-manager/*, and then they log in, everything works > >great. However, if they've already logged in and there was no prior > >virt-manager configuration, the custom config is overwritten and lost > >when the user logs out. > > > > Similarly, if VMM is closed, I write the config and then they open VMM > >(again, having logged into gnome where there was no > >~/.gconf/apps/virt-manager), it acts like there is no configuration (it > >tries to auto-connect to localhost and doesn't show the remote machines). > > > > I have no idea how these gconf things work. But I remember there were > two pieces of configuration that needed to be changed, I've done that > through some gconftool GUI, though. Have you tried using gconftool-2 > CLI (or anythign similar) for setting up the configuration instead of > overwriting the config files? It looks like there needs to be > something else done in order for the config to be read and not > overridden by virt-manager, but it doesn't sound like virt-manager > specific thing, but more like as Gtk or GConf specific.~/.gconf is managed by a daemon which sends config change notifications/... to other processes using GConf when needed, and I highly doubt manual edition of ~/.gconf is supported. So I second Martin that you should first try using gconftool-2 and see if you can still reproduce. GConf has been obsoleted by gsettings/dconf years ago, but that's a different matter ;) Christophe