Debian/Ubuntu Tips and Tricks

Debuntu

Debian/Ubuntu Tips and Tricks

How To: fixing Evolution after home directory changed (Failed to append to mbox)

Posted by chantra on March 16th, 2008

Lately, I change my main user's username and homedir location. As a result, some application like evolution were kindda broken.

This tutorial will explain how to change some of evolution settings manually in order to fix any issues left from the name change.

Changing a homedir name goes flawlessly for most applications, however, some of them might feel unhappy and stop working properly or even do not work anymore.

Most applications will store their settings in plain text in a config file, so replacing your old username by the new one can be done through:

$ sed -i 's/\/home\/olduser/\/home\/newuser/g' path/to/file

Mind that this can break your session even more. Back up the files you are applying the changes to!

With evolution, I had to issues left:\

  • The signatures were not picked up anymore
  • Anytime I sent a mail, I had this error:

Failed to append to mbox:/home/username/.evolution/mail/local#Sent: Cannot get folder: /home/username/.evolution/mail/local: No such file or directory
Appending to local `Sent' folder instead

Even though it was harmless (the message was sent), it was annoying!!!

The fix was located in gconf. there is 2 ways of fixing it. The fastest is to do it in non-graphical mode (meaning that you are logged in through the virtual console or ssh, but not through a graphical interface (gconf must not to be loaded)).

As always, backupping the file you will modified is best practice ;)

1. Non-graphical way

Once logged in through a console, and type:

$ sed -i 's/\/home\/olduser/\/home\/newuser/g' .gconf/apps/evolution/mail/%gconf.xml

replace olduser and newuser respectively.

Log in, through the graphical interface, open evolution and send an email.
Evolution should not complain anymore.

2. Graphical mode

Through the graphical interface, it is a bit more of a pain as you will have to edit every entries to modify one by one. The more mailboxes, the more pain.

You need to have gconf-editor installed, if it is not installed on your system yet, install it with:

$ sudo apt-get install gconf-editor

the open gconf-editor and go to /apps/evolution/mail, double click the entry accounts and edit one by one the list of values to change /home/olduser by /home/newuser. To the same with the entry signatures.

Copying the values to a file editor such as gedit and using the "replace" functions will help.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>