From ArchWiki
(Redirected from Dict)

The official website describes dictd as:

Client/server software, human language dictionary databases, and tools supporting the DICT protocol (RFC:2229).


Install the dictd package.

Graphical front ends

There are various graphical applications that can access dictd through the DICT protocol:

  • GoldenDict — Feature-rich dictionary lookup program supporting multiple dictionary formats.
http://goldendict.org || goldendict-gitAUR
  • gnome-dictionary — A GNOME application to look up definitions.
https://wiki.gnome.org/Apps/Dictionary || gnome-dictionary
  • xfce4-dict — A dictionary plugin for the Xfce panel.
https://docs.xfce.org/apps/xfce4-dict/start || xfce4-dict
  • dictionary.el — Emacs interface to dictd dictionary servers.
https://www.myrkr.in-berlin.de/dictionary || dictionaryAUR


Dictionaries can be queried by:

$ dict word

To query a specific dictionary database, you can use the -d flag. To query the English-Spanish database, for example, you can use:

$ dict -d eng-spa word

Without further configuration, it is likely that dictd will query online databases. See below to set up offline dictionaries.


By default, dictd tries to query offline databases first, then online databases. However, offline databases will not be available unless dictd.service is enabled, with locale properly set up and offline dictionaries installed (see below).

The online mode can be disabled by commenting server dict.org out in /etc/dict/dict.conf. Conversely, the offline mode can be disabled by commenting server localhost out.


By default, dictd comes configured to use the en_US.UTF-8 locale. If your system does not have this locale compiled, dictd.service will fail to start without a helpful error message.

It is likely that you want to configure it to use another locale:

DICTD_ARGS="--locale your locale"

Hosting Offline Dictionaries

Dictd can be configured to host offline dictionaries using localhost as the server by enabling dictd.service.

First, offline dictionaries need to be installed. Dictionaries are available through the Arch User Repository with the search term dictd. Some popular English dictionaries include:

The FreeDict project also provides many bilingual dictionaries compatible with dictd, which are usually available on AUR.

After installation, restart dictd.service if needed to access the newly available dictionary. Afterwards, dictionaries can be queried as described above.

Tip: A list of all the available dictionaries can be queried by executing:
$ dict -I


Parse Error

The following error:

/etc/dict/dictd.conf:25: syntax error, unexpected $end
/etc/dict/dictd.conf:25: #LASTLINE
/etc/dict/dictd.conf:25:          ^
dictd (yyerror): parse error
parse error

Means that dictd cannot find a dictionary database. These can be added manually to /etc/dict/dictd.conf. For example:

database eng-spa {
	data /usr/share/dictd/eng-spa.dict.dz
	index /usr/share/dictd/eng-spa.index

Adds the English-Spanish dictionary installed by dict-freedict-eng-spaAUR. For other dictionaries, copy and paste the above database declaration but make sure to change the database name, i.e. eng-spa, and also change the data and index paths above to specify the right files.