Ever wondered how to share your already-installed OpenOffice.org spelling dictionaries with Mozilla Thunderbird and Firefox without downloading/installing a second set of dictionaries, thus saving megabytes of space?

Then read on!

I wrote a script which creates or updates symlinks from all the installed OpenOffice.org spelling dictionaries in such a way that those dictionaries are accessible from the builtin FF/TB dictionary selection dialogs.

That is, no more downloading and installing of separate extensions for that purpose.

To be more precise, OOo uses the myspell-ebuilds such as app-dicts/myspell-en as its spelling dictionaries, so my script locates all installed myspell-dictionaries and creates/updates any required symlinks. And after you uninstalled some of the dictionaries, my script will remove the dead leftover symlinks.

Anyway, usage is easy and straightforward:

The following commands must be run as root, so do a

Code:

su -

if necessary.

Save the script under some name (I suggest "/usr/local/sbin/myspell-sync")

Make it executable:

Code:

# chmod +x /usr/local/sbin/myspell-sync

Run it!

Code:

myspell-sync

That's all. Except that re-installing FF/TB will delete the symlinks my script has created, and so you will have to re-run it after each update of FF/TB.

Anyway, it's safe to run the script at any time, so it won't hurt if you run it each time you suspect that the list of dictionaries provided by the FF/TB selection dialogs might be incomplete or outdated.

Note that the script makes the installed OOo/myspell dictionaries available to all the users of the local machine, that is it no longer necessary to install the dictionaries on a per-user basis (which helps avoiding to waste space). Note that this will not stop your users from installing additional dictionaries on their own if they absolutely want. But it will make it unnecessary in most cases.

However, here is an important DISCLAIMER: This script has only been tested for the normal sourcecode-builds of OOo, TB and FF. That is, not for the -bin ebuilds. I do not use any -bin ebuilds on my machines. The -bin versions might therefore be installed into different directories, and thus you might have to change the "/usr/lib/mozilla-firefox/dictionaries" and "/usr/lib/mozilla-thunderbird/dictionaries"-paths in the script. But there is no danger - my script checks all the paths to exist before it uses them.

And finally - here is the script:

Code:

#! /bin/sh
# Symlinks installed myspell dictionaries
# for use with Mozilla Firefox and Thunderbird.
# Can also be used to update existing symlinks.
# Will also detect and remove outdated symlinks.
#
# Written in 2008 by Guenther Brunthaler

# Where to find the installed myspell dictionaries.
MYSPELLDICTS=/usr/share/myspell