(new) Subject: Hacking gconf in 24 quick and easy steps ;)

This method "worked for me" to migrate address books, which is the
only thing I really cared about.  I make no warranty or guarantees
about how well this will work on your system and/or how well it will
eat all of your data.  Make backups...often.

My system is openSuSE 10.2 x86_64 with:
evolution-2.8.2-4
evolution-data-server-1.8.2-5
evolution-data-server-32bit-1.8.2-5
evolution-exchange-2.8.2-4
evolution-pilot-2.8.2-4
evolution-sharp-0.12.0-5
evolution-webcal-2.8.0-26

Assuming your evo is brand spanking new (has no data in it), and
you've copied your old home directory from the other PC to somewhere
(OLDHOMEDIR) on the new PC.

1) Open evo
2) Goto Contacts (whoever said GoTo statements were not useful?)
3) Create a new address book
4) Quit evo
5) run `evolution --force-shutdown`
6) cp -apv \
OLDHOMEDIR/.evolution/addressbook/local/[0-9]* \
$HOME/.evolution/addressbook/local/

7)   Make note of the directory names that are copied, for example:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

8) cd $HOME/.evolution/addressbook/local/ ; rename oldhost hostname *.oldhost
9) open gedit (or your favorite editor)
10) run gconf-editor
11) select /apps /evolution /addressbook
12) double click `sources` (right pane) and a new window opens
13) edit the entry that says "On This Computer"
14) copy (ctrl-c or whatever) the text over to your editor
15) in your editor, hack and slice as follow....

Example XML

<?xml version="1.0"?>
<group uid="[EMAIL PROTECTED]" name="On This Computer"
base_uri="file:///home/username/.evolution/addressbook/local"
readonly="no">
<source uid="[EMAIL PROTECTED]" name="Personal"
uri="file:///home/username/.evolution/addressbook/local/system"
relative_uri="system">
<properties>
<property name="completion" value="true"/>
</properties>
</source>
<source uid="[EMAIL PROTECTED]" name="newab"
relative_uri="[EMAIL PROTECTED]"/>
</group>

Notice the <source> for the new address book you created.  We're going
to play with it.

Copy the newab <source> once for each address book you want to migrate.

<source uid="[EMAIL PROTECTED]" name="newab"
relative_uri="[EMAIL PROTECTED]"/>
<source uid="[EMAIL PROTECTED]" name="newab"
relative_uri="[EMAIL PROTECTED]"/>
<source uid="[EMAIL PROTECTED]" name="newab"
relative_uri="[EMAIL PROTECTED]"/>

16) Replace the uid and relative_uri with our new directory names
17) Change newab to whatever you want to call the folder.

!!! DON'T JUST COPY AND PASTE MY EXAMPLE. !!!  Your system will have
different directory and hostnames.

<source uid="[EMAIL PROTECTED]" name="Work"
relative_uri="[EMAIL PROTECTED]"/>
<source uid="[EMAIL PROTECTED]" name="Friends"
relative_uri="[EMAIL PROTECTED]"/>
<source uid="[EMAIL PROTECTED]" name="Enemies"
relative_uri="[EMAIL PROTECTED]"/>

18) Condense it back into one line. (this is for sanities sake,
because I don't know if it matters or not to gconf and/or evo)

<?xml version="1.0"?><group uid="[EMAIL PROTECTED]"
name="On This Computer"
base_uri="file:///home/username/.evolution/addressbook/local"
readonly="no"><source uid="[EMAIL PROTECTED]"
name="Personal"
uri="file:///home/username/.evolution/addressbook/local/system"
relative_uri="system"><properties><property name="completion"
value="true"/></properties></source><source
uid="[EMAIL PROTECTED]" name="newab"
relative_uri="[EMAIL PROTECTED]"/><source
uid="[EMAIL PROTECTED]" name="Work"
relative_uri="[EMAIL PROTECTED]"/><source
uid="[EMAIL PROTECTED]" name="Friends"
relative_uri="[EMAIL PROTECTED]"/><source
uid="[EMAIL PROTECTED]" name="Enemies"
relative_uri="[EMAIL PROTECTED]"/></group>

Note: The above XML section is one long line!

19) Copy/Paste your new entry back into the "Edit List Entry" you
copied it out of.  Be sure to KEEP the `null` character at the end of
the original entry (it looks like a box with funny characters in it on
my system... again, this is for sanities sake, because I don't know if
it matters or not to gconf and/or evo, but I'd bet it does :) )

20) click OK  (closing Edit List Entry)
21) click OK  (closing Edit Key window)
22) quick gconf-editor
23) Open evo
24) check your handywork.

Note well: The first time I exited evo after doing this, evo crashed.
It was ok after restarting it again.

There are probably some nifty gconf tools to do the same work, but I'm
a gconf lightweight (and generally don't like gconf), so this was my
quick fix.

A similar method may work for migrating other parts of evo, but I have
not attempted anything else.

Peace, Love, Freedom & OpenSource
--Keith
_______________________________________________
Evolution-list mailing list
Evolution-list@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-list

Reply via email to