[lug] making gnome re-read config

Zan Lynx zlynx at acm.org
Wed Jan 11 18:09:29 MST 2006


On Wed, 2006-01-11 at 17:27 -0700, D. Stimits wrote:
[snip]
> Thanks, this one did the trick! I might still be trying to figure out 
> how to make it act on particular users when multiple users are running 
> remote X sessions, via root. Right now an individual user can use 
> gconftool-2 and create their own process to reconfigure based on changes 
> or triggers in a SQL db, the next step is to figure out how to have a 
> root (or special user) account run a daemon that can do this with 
> multiple users on different displays (probably via triggers on a 
> database table of preferences). Looks like the --owner might work for this.

If you want to have a root daemon change user settings, the best and
safest way to do this is to fork and in the child, before exec, setuid
to the user, set your environment (especially HOME) appropriately, and
then exec gconftool-2 with the right parameters.

I suppose if you want to keep it simple, use a shell command like:
su lynx -c 'gconftool-2 -s -t string /desktop/gnome/background/picture_filename /home/lynx/Pictures/Desktops/coincidence1920.jpg'

If you're changing a system or network-wide mandatory gconf parameter,
gconf is supposed to have support for that, but I'm not sure how it
works.

Ah, Google uncovers that there's no support for signaling every gconfd
about the change, so root has to run the list of users and update each
running gconfd if he wants an on-the-fly change to a mandatory setting.

You did know that GConf supports system-wide default and mandatory
settings, right?  It sounds like you might be building your own
application to do the same thing.  That's great, if the existing stuff
doesn't work for you, but not so great if you're duplicating work that's
already done for you. :)
-- 
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20060111/8b73b867/attachment.pgp>


More information about the LUG mailing list