[schaefer at alphanet.ch: Simple system-wide autoconfiguration for GNOME 3]
Toomas Tamm
tt-fai at kky.ttu.ee
Thu Jun 19 17:58:11 CEST 2014
Hello!
I do not have answers to all the questions raised, but I can tell what I
have done.
First, it seems easier to postpone gnome configuration for the time
after first boot. Then all the necessary daemons are running. There was
a recent thread on this list on how to run a script at first boot.
Still, I have no experience contacting the gsettings daemon when no user
is logged on.
What I have used is a script which loops over the following command:
gconftool-2 --direct --config-source xml::/usr/yki/etc/gconf/defaults --set $1 --type $3 $2
where our own configuration source is at /usr/yki/etc/gconf/defaults and
the parameter values are $1 for name of the variable (eg
"/apps/gnome-terminal/profiles/Default/login_shell"), $2 is the desired
value ("true" in my setup for this variable), and $3 is the type ("bool"
for this particular variable).
Then I additionally enable this source by installing (via cfengine)
/etc/gconf/2/local-mandatory.path
and
/etc/gconf/2/local-defaults.path
containing the single line(s)
xml:readonly:/usr/yki/etc/gconf/mandatory
and
xml:readonly:/usr/yki/etc/gconf/defaults
respectively.
This way our own configuration source is separated from any system-wide
one(s), and I can set both default (user overridable) and mandatory (not
overridable) keys.
If my understanding is correct, the "gconftool-2" configuration
mechanism is now deprecated and may be removed in future versions. Thus
my advice will probably have little long-term value... I think that the
"gsettings" mechanism is the newer one, but as I said before, I have not
used it for system-wide setting yet.
If you cannot figure out a way to achieve your goals system-wide, you
may try to implement a hook in /etc/profile or some equivalent script
which is run when users have already logged in. Therein, you can check
if the user is running X, and then issue the necessary commands on
per-user basis, possibly also recording a flag in order not to repeat
this every time. I admit this is a terrible kludge, but with the world
around us becoming more and more "interactive" and "user-friendly", we
may soon have no other options left.
Perhaps others here have better solutions...
Toomas
On Thu, 2014-06-19 at 16:39 +0200, Marc SCHAEFER wrote:
> Hi,
>
> I just wrote this to debian-user, but maybe there is a standard FAI
> way to preconfigure system-wide GNOME3 ?
>
More information about the linux-fai
mailing list