Accessing mandatory/defaults settings with Ruby/GConf2?

I’m looking at possibly putting together a Puppet,
http://reductivelabs.com/trac/puppet/ , native type for manipulating
gconf2.

I’ve got the basic idea of Ruby/GConf2 down, but I can’t see an
obvious way to manipulate the mandatory and defaults settings. Am I
missing something obvious?

thanks in advance,

Nigel

On Thu, Feb 11, 2010 at 1:20 PM, Nigel K.
[email protected] wrote:

I’m looking at possibly putting together a Puppet,
http://reductivelabs.com/trac/puppet/ , native type for manipulating
gconf2.

I’ve got the basic idea of Ruby/GConf2 down, but I can’t see an
obvious way to manipulate the mandatory and defaults settings. Am I
missing something obvious?

thanks in advance,

Any ideas?

2010/2/16 Nigel K. [email protected]:

Any ideas?

I’m a newby to GConf, but looking at
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/desktop-guide/ch-intro-gconf-overview.html
it seems you open different database.

In your case /etc/gconf/gconf.xml.mandatory.

Here is a little example :

require ‘gconf2’

mandatory_engine =
GConf::Engine.new(“xml:readonly:/etc/gconf/gconf.xml.mandatory”)
mandatory_client = GConf::Client.get_for_engine(mandatory_engine)
mandatory_client.all_entries("/").each do |entry|
puts entry.key + " : " + entry.value
end

Create a mandatory key before you try the program, and restart gconfd.
Note I’m opening the DB readonly, you would want xml:readwrite if you
want to write to it.

Hope it helps

Simon

By the way slightly off topic, but GConf will be replaced with another
*Conf I think? I wonder how difficult it would be for ruby-gnome to keep
up with that (if what I wrote is true, that is)

2010/2/17 Marc H. [email protected]:

By the way slightly off topic, but GConf will be replaced with another
*Conf I think? I wonder how difficult it would be for ruby-gnome to keep
up with that (if what I wrote is true, that is)

I never heard of a gconf replacement.

And you second question is quite vague :).

simon

2010/2/17 Simon A. [email protected]:

2010/2/17 Marc H. [email protected]:

By the way slightly off topic, but GConf will be replaced with another
*Conf I think? I wonder how difficult it would be for ruby-gnome to keep
up with that (if what I wrote is true, that is)

I never heard of a gconf replacement.

Just for the record, it seems Gnome is indeed switching to a new
settings engine.
It’s still experimental though.

http://gnomejournal.org/article/89/gnome-boston-summit-2009
http://blogs.gnome.org/desrt/2009/06/09/some-nice-gsettings-facts/

Simon

On Wed, Feb 17, 2010 at 1:20 AM, Simon A. [email protected] wrote:

thanks in advance,

Any ideas?

I’m a newby to GConf, but looking at
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/desktop-guide/ch-intro-gconf-overview.html
it seems you open different database.

In your case /etc/gconf/gconf.xml.mandatory.

Here is a little example :

ah! Thanks, I was trying completely the wrong thing.

Much appreciated.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs