This page shows how to set up a local DICT server and use Dictionary programs that are already included with Ubuntu to access locally stored dictionary.
1. Install DictD:
sudo apt-get install dictd
This installs a DICT server. Now you can install whatever dictionaries you want. Dictionaries are available in the repositories. A simple package search will show many.
So to install a thesaurus, for example, use
sudo apt-get install dict-moby-thesaurus
2. To configure Dictionary, open the Dictionary program
3. Go into Edit -> Preference.
4. Click on "Add" to add a source.
5. Under "Description" give it a name like "Local Dictionaries", under "hostname" type "localhost" [REMINDER: In Jaunty and later you might try putting "127.0.0.1" (without the quotes) instead] and leave the port number the same.
6. Now click "add". And now whenever you're offline you can choose "Local Dictionaries" from "Dictionary Sources" and access your dictionaries offline.
Originally posted in Ubuntu Forums