Setting up a DICT (Dictionary) server on Debian

My work, which is the localization of GNU/Linux for Dzongkha includes lots of coordination work with my translators who do the actual User Interface and other translations from English to Dzonkgha. Our translators has been using a dictionary client to find the meanings of words using the DICT protocol from servers like dict.org. Recently, due to interruptions in the internet connection at our workplace, we started facing lots of problems in accesing the dictionary servers. Thats when I decided to do a little bit of a search on google to see if I can set up a local dictionary server for my translators. In the following paragraphs, I have listed how I set up a local dictionary server for our local network.

DICT is the dictionary network protocol created by the DICT Development Group. It is described by RFC 2229. Its goal is to surpass the Webster protocol and to allow clients to access more dictionaries during use. Dict servers and clients uses the port 2628. More information on DICT Protocal can be found at http://en.wikipedia.org/wiki/DICT .

On a Debian system, one can install the dictd server for the main server application and then add various free dictionaries available on the internet. The Debian repo has various free dictionaries.

Setting up the dictd server

  • sudo aptitude install dictd

This installs the dictd server and also starts it. Here, only the server is installed and no dictionaries are installed. We need to install the dictionaries seperately.

The default installation of dictd will have it configured so that only the clients from the same machine can access it. This is OK if you want to access the dictionaries from the same machine that also runs the server. But if you want your dictionary server to serve queries from the network, you will have to change some settings in the configuration file located at /etc/dictd/dictd.conf. The default access entry in the /etc/dictd/dictd.conf file will be something like this:

access {
allow localhost
allow 127.0.0.1
# this allows access only from local host
}

This allows only access from localhost, which is the same machine that runs the server.

Now to make the dictd server respond to remote queries change the access section to the following:

access {
allow *
# this allows access only from all hosts
}

For a detailed documentation on creating customised access list do a read the man pages for dictd.

Once the configuration file is modified as needed, just restart the dict server : sudo /etc/init.d/dictd restart .

The DICT server is now ready. Now to start serving requests from clients we have to install atleast one dictionary.

Search for the free dictionaries in the Debian repo : aptitude search dict

This will show a list of dictionary softwares as well as a list of free dictionaries. For my local lan dictionary server, I insalled a dictionary named “A comprehensive English Dictionary”. Its found in the package named “dict-gcide”

  • sudo aptitude install dict-gcide

This will install the dictionary, create the necessery listing in /usr/lib/dictd/db/list and then restart the dictd server. You can install as many dictionaries as you like, ex. technical, bibilical, devil’s dictionary and even bi-lingual ones for word translations.

Now, your local dict server is ready to serve the client request.

For the client side, you can use various dict clients like “dictionary” in Gnome and kdict in KDE.

Note: In Debian and Ubuntu, you can install the wordnet dictionary by : sudo apt-get install dict-wn

Advertisements

One response to “Setting up a DICT (Dictionary) server on Debian

  1. I think this would be the right process for those who knew about linux … as i was new to linux/FOSS ..i installed the StarDict and some dictionaries with it. but i really miss the simplicity offered by gnome-dictionary…. i didn’t knew the client-server dictionary concept before !!!!!..anyway thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s