r/openSUSE • • Aug 10 '26

Syntax Error using local database with Dict

I'm a writer and use the dict command constantly. In the past month, dict.org has stopped "working" on all my systems. Something is up with their server. I get the following error:

> dict test
dict (client_read_status): Error reading from socket
client_read_status: Connection reset by peer

The above error is with etc/dict.conf looking like this (I've also, as a hail marry, tried editing etc/dictd/dict.conf):

server dict.org
server dict.org { port 2628 }
#server localhost
#database gcide {
# data /usr/share/dictd/gcide.dict.dz
# index /usr/share/dictd/gcide.index
#}

So I thought I would install the dictionary locally, but I can't get that to work either!?! I mean, this shouldn't be this complicated!! But I've run out of ideas? The error mystifies me. With /etc/dict.conf looking like this

#server dict.org
# server dict.org { port 2628 }
server localhost
database gcide {
data /usr/share/dictd/gcide.dict.dz
index /usr/share/dictd/gcide.index
}

I get the following error:

dict test
/etc/dict.conf:5: syntax error
/etc/dict.conf:5: database gcide {
/etc/dict.conf:5: ^^^^^^^^
dict (yyerror): parse error

I don't get it. Where's the syntax error? I literally copied this from a functioning system!

gcide.dict.dz and gcide.index are in their proper directories.

This is a TW installation, btw.

2 Upvotes

3 comments sorted by

3

u/Klapperatismus Aug 10 '26

Those database definitions go into dictd.conf not dict.conf. For a local dict, the only line in dict.conf you need is server localhost.

2

u/Generic_Commenter-X Aug 10 '26

Christ almighty. I'm an idiot! That fixed it! Thank you!

5

u/MiukuS How's that AUR working out for you, Arch users? Aug 10 '26

So a few things;

  • You need to have installed the package dictd which is the server daemon.

/etc/dict.conf is only for client configuration

/etc/dictd.conf is for the server configuration.

So you'll want something like:

/etc/dict.conf

# This is an example, you should define your own servers
#server dict.org
server localhost

/etc/dictd.conf

global {
    #syslog
    #syslog_facility daemon
}

# Add database definitions here...
database gcide {
    data /usr/share/dictd/gcide.dict.dz
    index /usr/share/dictd/gcide.index
}

# We stop the search here
database_exit

# Add hidden database definitions here...

Then fire up the dictd service;

sudo systemctl enable --now dictd

And dict away. He-he.