You are not logged in.
Pages: 1
Hello,
I am trying to get dictd to work on my local dictionaries.
Here's what I have
$ ls -lah /etc/dict/
total 36K
drwxr-xr-x 2 root 4.0K Nov 1 13:39 .
drwxr-xr-x 103 root 12K Oct 8 14:43 ..
-rw-r--r-- 1 root 841 Dec 13 2024 colorit.conf
-rw-r--r-- 1 root 34 Nov 1 17:46 dict.conf
-rw-r--r-- 1 root 358 Mar 11 2025 dict.conf.old
-rw-r--r-- 1 root 1.2K Nov 1 17:48 dictd.conf
-rw-r--r-- 1 root 235 Dec 13 2024 site.infoIf I leave only the online dictionary, all is fine
$ cat /etc/dict/dict.conf
server dict.org
$ cat /etc/dict/dictd.conf
# dictd configuration file.
# whipped up by michael conrad tilstra <michael@gentoo.org>
# Informational message
global {
site site.info
}
# who's allowed. You might want to change this.
access {
allow *
}
# Dictionaries are listed below.
# The initrc script scans /usr/lib/dict and adds all of the dictionaries
# it finds here.
#
# The initrc script will delete everything after the the last line and
# replace it with what it finds. So add all of your things above.
#
# If this is a problem for people, contact me and
# we can work out a different method.
#
database fr-fr {
data fr-fr-file.dict.dz
index fr-fr-file.idx.gz
}
#LASTLINE
$ sudo systemctl restart dictd
$ sudo systemctl status dictd
○ dictd.service - Dictd Dictionary Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dictd.service; enabled; preset: disabled)
Active: inactive (dead) since Sat 2025-11-01 17:56:58 CET; 4s ago
Duration: 1ms
Invocation: bff38163f6a1472289e1158373059029
Process: 2383761 ExecStart=/usr/bin/dictd $DICTD_ARGS -- $DICTD_EARGS (code=exited, status=0/SUCCESS)
Mem peak: 1.7M
CPU: 8ms
Nov 01 17:56:58 loch systemd[1]: Starting Dictd Dictionary Server Daemon...
Nov 01 17:56:58 loch systemd[1]: dictd.service: Deactivated successfully.
Nov 01 17:56:58 loch systemd[1]: Started Dictd Dictionary Server Daemon.
$ dict pain
5 definitions found [. . .]But when I try to force only a local dictionary
$ cat /etc/dict/dict.conf
server localhost
$ sudo systemctl restart dictd
$ sudo systemctl status dictd
× dictd.service - Dictd Dictionary Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dictd.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Sat 2025-11-01 18:03:11 CET; 3s ago
Duration: 1ms
Invocation: 5e00e7276a784bad952e8a74b762aa49
Process: 2384807 ExecStart=/usr/bin/dictd $DICTD_ARGS -- $DICTD_EARGS (code=exited, status=0/SUCCESS)
Main PID: 2384808 (code=exited, status=1/FAILURE)
Mem peak: 1.7M
CPU: 10ms
Nov 01 18:03:10 loch systemd[1]: Starting Dictd Dictionary Server Daemon...
Nov 01 18:03:11 loch systemd[1]: Started Dictd Dictionary Server Daemon.
Nov 01 18:03:11 loch systemd[1]: dictd.service: Main process exited, code=exited, status=1/FAILURE
Nov 01 18:03:11 loch systemd[1]: dictd.service: Failed with result 'exit-code'.My guess (from reading the wiki and a few blog posts) is that somehow access to localhost is being blocked). I am not very knowledgeable in this area, but running
$ sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPTI get the impression that ports are not blocked, so it might be something else...? What am I missing?
Last edited by tassio (2025-11-01 17:14:43)
Offline
skip the service, run dictd interactively and https://man.archlinux.org/man/dictd.8#v
Offline
Thank you for the answer!
But I'm not sure what you mean by running dictd interactively.
Here's another attempt
$ sudo dictd
$ dict blave
Cannot connect to any servers (use -v to see why)
$ dict blave -v
Configuration file:
server localhost
Cannot connect to any serversIn case it's useful:
$ sudo cat /etc/dict/dictd.conf
# dictd configuration file.
# whipped up by michael conrad tilstra <michael@gentoo.org>
# Informational message
global {
site site.info
}
# who's allowed. You might want to change this.
access {
allow *
}
# Dictionaries are listed below.
# The initrc script scans /usr/lib/dict and adds all of the dictionaries
# it finds here.
#
# The initrc script will delete everything after the the last line and
# replace it with what it finds. So add all of your things above.
#
# If this is a problem for people, contact me and
# we can work out a different method.
#
database fr-fr-petitrobert {
data fr-fr_lepetitrobert_an_1_2.dict.dz
index fr-fr_lepetitrobert_an_1_2.idx.gz
}
database fr-fr {
data /usr/share/dictd/fr-fr_lepetitrobert_an_1_2.dict.dz
index /usr/share/dictd/fr-fr_lepetitrobert_an_1_2.idx.gz
}
database eng {
data /home/tassio/data/dic/stardict-Cambridge_Advanced_Learners_Dictionary_3th_Ed-2.4.2/Cambridge_Advanced_Learners_Dictionary_3th_Ed.dict.dz
index /home/tassio/data/dic/stardict-Cambridge_Advanced_Learners_Dictionary_3th_Ed-2.4.2/Cambridge_Advanced_Learners_Dictionary_3th_Ed.dict.idx
}
#LASTLINEand
$ sudo cat /etc/dict/dict.conf
server localhostOffline
sudo dictd -vps aux | grep dict
ss -tulpen | grep -E 'dict|2628'
nmap localhostOffline
Thank you for helping!
The first couple of commands below I typed is just in case it might be causing interference...
$ sudo systemctl reset-failed
> 09:58 ~
$ systemctl status dictd
○ dictd.service - Dictd Dictionary Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dictd.service; enabled; preset: disabled)
Active: inactive (dead) since Sat 2025-11-01 18:03:11 CET; 1 day 15h ago
Duration: 1ms
Invocation: 5e00e7276a784bad952e8a74b762aa49
Process: 2384807 ExecStart=/usr/bin/dictd $DICTD_ARGS -- $DICTD_EARGS (code=exited, status=0/SUCCESS)
Main PID: 2384808 (code=exited, status=1/FAILURE)
Mem peak: 1.7M
CPU: 10ms
$ dictd -v
:E: cannot open pid file '/var/run/dictd.pid'
:E: err msg: Permission denied
dictd (pid_file_create): :E: terminating due to errors. See log file
:E: terminating due to errors. See log file
> 09:58 ~
$ sudo dictd -v
$ ps aux | grep dict
tassio 2512517 0.0 0.0 6472 2244 pts/18 S+ 09:58 0:00 grep dict
$ ss -tulpen | grep -E 'dict|2628'
$ nmap localhost
Starting Nmap 7.97 ( https://nmap.org ) at 2025-11-03 09:59 +0100
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000086s latency).
Other addresses for localhost (not scanned): ::1
All 1000 scanned ports on localhost (127.0.0.1) are in ignored states.
Not shown: 1000 closed tcp ports (conn-refused)
Nmap done: 1 IP address (1 host up) scanned in 0.07 secondsOffline
$ sudo dictd -v
$ ps aux | grep dict
tassio 2512517 0.0 0.0 6472 2244 pts/18 S+ 09:58 0:00 grep dictdictd terminates w/o any error message?
sudo -i # you cannot sudo strace
strace -o /tmp/dictd.strace -f -tt dictd
chmod ugo+rw /tmp/dictd.strace
exit
cat /tmp/dictd.strace | curl -F 'file=@-' 0x0.stOffline
Should I DM you the 0x0 link, or is it safe to share here?
Offline
Thank you very much seth!
Reading the strace I found some permission problems, which I addressed.
Here's the current state of affairs.
$ sudo cat /etc/dict/dictd.conf
[sudo] password for tassio:
# dictd configuration file.
# whipped up by michael conrad tilstra <michael@gentoo.org>
# Informational message
global {
site site.info
}
# who's allowed. You might want to change this.
access {
allow *
}
# Dictionaries are listed below.
# The initrc script scans /usr/lib/dict and adds all of the dictionaries
# it finds here.
#
# The initrc script will delete everything after the the last line and
# replace it with what it finds. So add all of your things above.
#
# If this is a problem for people, contact me and
# we can work out a different method.
#
database fr-fr {
data /usr/share/dictd/fr-fr_lr.dict.dz
index /usr/share/dictd/fr-fr_lr.idx
}
database eng {
data /usr/share/dictd/CALD.dict.dz
index /usr/share/dictd/CALD.idx
}
#LASTLINE$ \ls -lah /usr/share/dictd/
total 99M
drwxr-xr-x 3 root root 4.0K Nov 3 10:32 .
drwxr-xr-x 326 root root 12K Nov 1 13:42 ..
-rw-r--r-- 1 root root 19M Nov 3 10:28 CALD.dict.dz
-rw-r--r-- 1 root root 1.4M Nov 3 10:28 CALD.idx
-rw-r--r-- 1 root root 12M Nov 3 10:32 fr-fr_lr.dict.dz
-rw-r--r-- 1 root root 999K Nov 3 10:32 fr-fr_lr.idx$ sudo dictd -v
$ ps aux | grep dict
nobody 2518670 0.0 0.1 24696 21804 ? Ss 10:30 0:00 dictd 1.13.3: 1/7
tassio 2521722 0.0 0.0 6472 2244 pts/22 S+ 10:45 0:00 grep dictAnd, finally
$ dict door
No definitions found for "door"This seems really promising!
I'm puzzled as to why no definition is found though.
Also, I still get
$ sudo systemctl reset-failed
$ systemctl status dictd
○ dictd.service - Dictd Dictionary Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dictd.service; enabled; preset: disabled)
Active: inactive (dead) since Sat 2025-11-01 18:03:11 CET; 1 day 16h ago
Duration: 1ms
Invocation: 5e00e7276a784bad952e8a74b762aa49
Process: 2384807 ExecStart=/usr/bin/dictd $DICTD_ARGS -- $DICTD_EARGS (code=exited, status=0/SUCCESS)
Main PID: 2384808 (code=exited, status=1/FAILURE)
Mem peak: 1.7M
CPU: 10msOffline
dict par
dict -d eng doorOffline
Pages: 1