Evolution auto user setup

David Malcolm dmalcolm at redhat.com
Tue Apr 12 18:34:15 UTC 2005

On Mon, 2005-04-11 at 14:27 -0700, Sean Bruno wrote:
> Was curious if anyone has seen/used any kind of auto-setup scripts for
> large amounts of users.  I have a couple of hundred pine/mutt users that
> I intend to move over to evolution sooner rather than later.
> I would like to create their email accounts automatically, and not have
> to setup each one seperately as they login.
> Sean

I've written some Python scripts to make it easier to work with
Evolution's configuration information, in the hope of automating mass
deployments of Evolution.

A source RPM is available here:

There's perhaps some overlap here with Sabayon [1]; however these take a
simpler approach and don't involve a nested X session.

Here's a HOWTO-style guide:

How to get this working:
You should set up a prototype/test user on one machine, and get
Evolution working well for that user with whatever server(s) are needed.

You then grab the configuration information for Evolution from GConf as
an XML file thus:
gconftool-2 --dump /apps/evolution > some-file.xml

If you look at one of these XML files in a regular file viewer it will
be almost unreadable (it contains further XML data in an "escaped form"

I wrote evolution-gconf-log to present this data in a more readable way:
cat some-file.xml | evolution-gconf-log | less

This should show you the various accounts and data sources in a somewhat
more human-readable form (it shows you some of this inner XML).  You
can't do anything more with the output except read it; this is a
debugging tool.

This takes one of these XML GConf dump files and filters out everything
apart from the accounts on an Exchange server.
cat some-file.xml | evolution-gconf-filter-exchange >

You can use the evolution-gconf-log tool on the result as desired.

This takes one of the XML GConf dump files and remaps all user
information based on the values of environment variables set when the
script is run.  For example: 

cat some-file.xml | evolution-gconf-personalize > result.xml

As before, you can use the evolution-gconf-log tool on the result to
check that things have been mapped correctly for the new user.

Putting the data back in GConf
Once you've manipulated the data as needed (and verified results using
the log tool as needed), you can put it back in GConf for another thus:

gconftool-2 --load my-finished-file.xml

The above command assumes you're logged in as the user; it will start
the GConf daemon for that user if needed.

If this is to run from a script where the user's session isn't running,
you can bypass the daemon thus: 

gconftool-2 --shutdown gconftool-2 --direct
--config-source=xml:readwrite:$HOME/.gconf --load result.xml

I've tested this, and had it working for an Evolution 2.0 deployment.  I
suspect the approach will break under some circumstances, and with
different versions of Evolution.  Comments and patches welcome.

[1]: http://www.gnome.org/projects/sabayon/

More information about the desktop mailing list