How to completely disable suspend?

Xandros Pilosa folivora.pilosa at gmail.com
Sun Jan 17 18:09:23 UTC 2010


Dne 17.01.2010 (ned) ob 14:10 +0100 je Josef Wolf zapisal(a):
[snip]
> 
> Well, this sounds somewhat contradictory: gconf-editor seems to be able to
> change mandatory/default values without shutting down gconfd. After all,
> gconf-editor requires the user to be logged in since it needs the GUI.

Not, if you look at documentation more closely (as I should do before
posting and be more verbose about this).
Actually in gconf-editor we are not editing source directly. If you
start the program with root privileges and go to file-->new mandatory
window, you will find an empty tree (just /) and you can't add new key
directly. We have to do this from Settings window by selecting existing
key (right click) and setting it as mandatory. AFAIK actual writing in
the source location, e.g. /etc/gconf/gconf.xml.mandatory, is done
through gconfd (from [1]).
Furthermore:
from man gconftool-2:
<quote>
 The  GConf  preference keys are stored and managed by the
 GConf daemon (gconfd-2).  These keys are cached in memory, and saved to
 disk in XML format when appropriate.
</quote>
and from [3] (a little bit old):
<quote>
In Gnome <= 2.8 gconf settings were immediately written to disk. In 2.10
gconf settings are written on logout or when gconftool-2 --shutdown is
run.
</quote>
> 
> Since I configure my systems automatically, shutting down or logging out
> users is not an option for me.
> 
> Is it really necessary to shut down gconfd? What would happen if it is not
> shut down? I guess the only drawback would be that the changes would be
> available only after the user logs out and logs in again. But that would
> be perfectly OK for my use case. Are any other drawbacks to be expected?

I don't know from experience, I just quoted what documentation [2] (I
should post this link earlier) says about 
--direct option.
and from[2]:
<quote>
NOTE: Technically, you shouldn't modify any settings directly if the
gconf daemon is running (it is always running when someone is logged
into GNOME)! Since it caches settings, they may be overwritten or could
even corrupt the xml files!
</quote>
And in [4] are multiple warnings about it.

> Maybe gconfd can be signaled to re-read the databases?

>From [5]:
<quote>
Since the daemon caches values it may not notice when new schemas are
installed from "make install" or an RPM/deb package. However, it is
possible to notify the daemon to re-load its caches by sending it a
SIGHUP signal.
</quote>
But due to relative complex gconf mechanism I assume there is no safe
way to force gconfd just to "reread" config. backends other then
gconftool-2 --shutdown and restarting it.
But I would be glad, if someone could review this statement and post
more insight.


[1] http://developer.gnome.org/feature/archive/gconf/impl.html
[2]http://library.gnome.org/admin/system-admin-guide/2.28/gconf-0.html.en
[3] http://www.gentoo-wiki.info/Customizing_GNOME
[4]http://library.gnome.org/admin/system-admin-guide/2.28/gconf-7.html.en
[5] http://projects.gnome.org/gconf/

Regards





More information about the ubuntu-users mailing list