Why doesn’t my dict command work?
I upgraded to Fedora 41 as soon as it became available about a month ago. Most things worked as expected, but the dict command started responding with messages about not finding a server. The dict command allows me to find definitions, synonyms and more from multiple on-line dictionaries. I depend on this in my writing and much prefer the command line than the graphical version.
Problem Determination
The dict command is installed with the dictd package. I tried reinstalling to no avail. When a program can’t find something it needs — such as a server — I start by looking at the global configuration file.
For dict, that file is specified in the man page as /etc/dict.conf. When I tried to look at that file, I discovered that it didn’t exist. That was strange, because dict obviously worked before I upgraded from Fedora 40 to 41. Some exploration of earlier versions of Fedora indicated that no such file ever existed in any of them. So I concluded that the default configuration was coded into the program, but that presence of /etc/dict.conf would override that.
Note that Ubuntu and related distros keep the configuration file as /etc/dict/dict.conf.
Problem resolution
Before fixing the problem, I needed to know the syntax of the file and the specific content to define the server to be used. I added the dictionary widget to the top panel on my Xfce desktop to see if it worked, and it did. I checked it’s configuration, Figure 1, and it provided me with the data I needed to configure dict.
To get the syntax for the configuration file, I did a search and finally came up with the very simple, one-line configuration in Figure 2, that works fine. The commented lines are samples for using authentication on a remote server and to a local server. The dict.org server is the default.
server dict.org { port 2628 }
# server penguin.cow { user faith sdlkfj }
# server localhost { user faith thisismysharedsecret }
Figure 2: The simple /etc/dict.conf configuration file I created.
This resolution does depend on the availability of the remote server. It is possible to use a local server, but that’s not how I want to do it.
It’s not a difficult fix, but it took a good bit of work to suss out the information needed to resolve this problem.
$ dict "suss out"
1 definition found
From WordNet (r) 3.0 (2006) [wn]:
suss out
v 1: examine so as to determine accuracy, quality, or condition;
"check the brakes"; "Check out the engine" [syn: {check},
{check up on}, {look into}, {check out}, {suss out}, {check
over}, {go over}, {check into}]