Monthly Archives: December 2007

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 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 .

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
# 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

Some Debian Howtos

Below are the list of Howtos for Debian GNU/Linux which I found out on the Internet. They can also be useful to people migrating from Windows to GNU/Linux systems like Debian and Ubuntu.

How to Convert CHM files to HTML and PDF

Microsoft Compiled HTML Help (CHM) is a proprietary format for online help files, developed by Microsoft and first released in 1997 as a successor to the Microsoft WinHelp format. To Convert it to HTML:

  •  sudo apt-get install libchm-bin   (Installs libchm-bin)
  •  extract_chmLib book.chm outdir  (Converts book.chm to html files which will be written in the “outdir” folder

To Convert to PDF:

  •  sudo apt-get install htmldoc  (installs htmldoc)
  • htmldoc    (starts the htmldoc UI to start converting the above html files to PDF)

How to combine multiple pdf files into one pdf file

Install required software:

  •  sudo apt-get install gs pdftk

Combine pdf files:

  •  gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf    (combines 1.pdf, 2.pdf and 3.pdf into one single pdf file named combined.pdf

Note : More will be added Later