[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: changing gconf settings



On Thu, Aug 09, 2012 at 10:07:39PM +0300, cavit.vural@adak.com.tr wrote:
> Hi,
> 
> live-xxxx lets to use /etc/skel/xyz to change setting. So it may be
> used.
> 
> If you use ,
> 
> gconftool-2 --direct  --config-source
> xml:readwrite:/etc/gconf/gconf.xml.defaults --set -t bool
> /apps/gksu/sudo-mode true
> 
> it will also be able to change settings.
> 
> So , what is the difference ?
> 
> "/etc/skel/xyz" method will effect created new users until another
> /etc/skel/xyz created.
> "gconftool-2 --direct" method will effect created new users until
> another "gconftool-2 ---direct" command in any package loaded /
> upgraded.
> 
> I think the best method is an override schema in
> /usr/share/glib-2.0/schemas/

I think "gconftool-2 --direct --config-source 
xml:readwrite:/etc/gconf/gconf.xml.defaults" would override any 
installed schema installed, if it reads gconf setings in /etc as it's 
supposed to.

Until the system admin changes the system settings it does not 
(shouldn't) get overwriten by package installs/upgrades. Changing files 
in /usr/share/ changes will get overwritten by packages upgrades for 
sure, even in live persistent mode.

Besides this, setting things in /etc/skel is also interesting in many 
cases. It leaves to the user, without admin powers, the possibility to 
change the setting. This is relevant in the case the admin wants to 
delegate to the user how it manages that specific setting - and the live 
system is not to be installed with a not formated $HOME partition (not 
my case).

I've posted the readwrite:/etc/gconf/gconf.xml.defaults because 
it's another option - a system wide option - and worked for me.

> 
> Regards
> 
> 
> 09.08.2012 21:32, Rui Bernardo yazmış:
> >On Thu, Aug 09, 2012 at 06:42:48PM +0100, Liam O'Reilly wrote:
> >>Hi.
> >>
> >>Thanks for your help. I think I understand it now.
> >>
> >>So the file etc/skel/.gconf/xxx after setting it up would be an
> >>'initial' gconf 'database' where the only entries would be the
> >>ones I set.
> >>
> >>Thanks again
> >>Liam
> >>
> >>On 9 Aug 2012, at 18:00, Ben Armstrong
> >><synrg@sanctuary.nslug.ns.ca> wrote:
> >>
> >>> On 08/09/2012 11:45 AM, Liam O'Reilly wrote:
> >>>> #!/bin/sh
> >>>> gconftool --type bool --set
> >>/apps/gnome-power-manager/backlight/enable false
> >>>> gconftool --type bool --set
> >>/apps/gnome-power-manager/backlight/idle_dim_battery false
> >>>> gconftool --type bool --set
> >>/apps/gnome-power-manager/backlight/idle_dim_ac false
> >>>> gconftool --type bool --set
> >>/apps/gnome-power-manager/backlight/battery_reduce false
> >>>
> >>> I guess you would:
> >>>
> >>> 1. create an etc/skel/.gconf/ in your includes which will be
> >>picked up by adduser when live-config
> >>> calls it.
> >>>
> >>> 2. use gconftool --direct to write to it (requires that you
> >>set a config source)
> >>>
> >>> I can't give you a step by step, as I have not done this
> >>myself, and only just figured this much out
> >>> by poking around with it a bit.
> >>>
> >>> Ben
> >>
> >>
> >>--
> >>To UNSUBSCRIBE, email to debian-live-request@lists.debian.org
> >>with a subject of "unsubscribe". Trouble? Contact
> >>listmaster@lists.debian.org
> >>Archive: AFB5E43E-4136-43CC-891D-83497D69AC28@swansea.ac.uk">http://lists.debian.org/AFB5E43E-4136-43CC-891D-83497D69AC28@swansea.ac.uk
> >>
> >
> >I had a similar issue, I wanted to add a system setting and
> >/etc/skel/ seemed the way, but
> >in my case, and using live-installer to install to disk, that
> >/etc/skel setting would not
> >be included in the files of an existing installed user if $HOME
> >partition was not formated
> >upon install. That is, I had my files in a not formated $HOME
> >partition and the /etc/skel/
> >file was not added to $HOME upon install because $HOME existed when
> >the $USER was created,
> >so skel files were not added to $USER $HOME files.
> >
> >So, the following solution is not live specific but system specific
> >that applied to both
> >live $USER and system wide to work with install even if the user
> >$HOME was not (re)created.
> >I post it here as an alternative to skel solution.
> >
> >What I did to get both live and system wide gconf setting was, in
> >a hook:
> >
> >	gconftool-2 --direct  --config-source
> >xml:readwrite:/etc/gconf/gconf.xml.defaults --set -t bool
> >/apps/gksu/sudo-mode true
> >
> >This way the setting is system wide and independent from the user
> >creation.
> >
> >Hope it helps.
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-live-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: f236d5b1ab00509b5b6ea5d97342ab54@adak.com.tr">http://lists.debian.org/f236d5b1ab00509b5b6ea5d97342ab54@adak.com.tr
> 


Reply to: