On Thu, Nov 19, 2009 at 6:23 PM, Scott Granneman <[email protected]> wrote:
> Plist files are just XML files. I can read or edit or script them with the 
> normal bash tools; in fact, I've done just that before. No biggie.

Apparently, that's what gconf uses by default, too.  It's a collection
of XML files in a filesystem hierarchy[1]:

"The GConf database by default uses a system of directories and XML
files, stored in a directory called ~/.gconf. GConf can also use other
backends, such as a database server, but XML file storage is the most
common configuration."

> Also, the plist files are yes, stored in ~/Library, but that's hardly the 
> same thing as Gconf or the Registry.

Here's a sample session for trying to change the action when my laptop
lid is closed.

By default, the screen is set to blank when I close the lid:

$ gconftool-2 --get /apps/gnome-power-manager/buttons/lid_battery
blank

$ grep -A 2 lid_battery ~/.gconf/apps/gnome-power-manager/buttons/%gconf.xml
        <entry name="lid_battery" mtime="1258718176" type="string">
                <stringvalue>blank</stringvalue>
        </entry>

I can change the action to do nothing via the gconftool-2 command:

$ gconftool-2 --set /apps/gnome-power-manager/buttons/lid_battery
--type=string nothing

$ gconftool-2 --get /apps/gnome-power-manager/buttons/lid_battery
nothing

$ grep -A 2 lid_battery ~/.gconf/apps/gnome-power-manager/buttons/%gconf.xml
        <entry name="lid_battery" mtime="1258719934" type="string">
                <stringvalue>nothing</stringvalue>
        </entry>

I can also change it by using vi, although the gconf server doesn't
seem to be aware of the change:

$ vi ~/.gconf/apps/gnome-power-manager/buttons/%gconf.xml

$ grep -A 2 lid_battery ~/.gconf/apps/gnome-power-manager/buttons/%gconf.xml
        <entry name="lid_battery" mtime="1258719934" type="string">
                <stringvalue>blank</stringvalue>
        </entry>

$ gconftool-2 --get /apps/gnome-power-manager/buttons/lid_battery
nothing

I'm guessing the gconf server keeps some kind of cache, reading in the
XML files once at startup and writing them whenever it makes a change.
 When I log out and log back in the change takes effect:

$ gconftool-2 --get /apps/gnome-power-manager/buttons/lid_battery
blank

$ grep -A 2 lid_battery ~/.gconf/apps/gnome-power-manager/buttons/%gconf.xml
        <entry name="lid_battery" mtime="1258719934" type="string">
                <stringvalue>blank</stringvalue>
        </entry>

>From my searching so far there does not seem to be a way to have the
server re-read the XML files without logging out and back in.

[1] http://en.wikipedia.org/wiki/GConf

Regards,
- Robert

-- 
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug

Reply via email to