Run at startup¶
The macOS and Linux setups use make targets in a clone of the
source repository.
LaunchAgent¶
| Command | Action |
|---|---|
make mac-agent-install |
build dictshelf, generate the LaunchAgent plist, and register it; runs dictshelf serve --no-browser (AGENT_BIN=<path> for another binary) |
make mac-agent-start |
load and start the agent |
make mac-agent-stop |
stop and unload the agent |
make mac-agent-restart |
rebuild, then restart the agent |
make mac-agent-status |
show the agent's state and process id |
make mac-agent-uninstall |
stop the agent and delete the plist |
Check with make mac-agent-status, then open
localhost:6888.
DictShelf.app is the alternative that starts when you open it and shows a menu-bar icon. Use one of the two.
systemd user unit¶
The unit runs as your user. Only installing the binary to
/usr/local/bin needs sudo.
| Command | Action |
|---|---|
make linux-service-install |
install the binary (sudo), then create the user unit |
make linux-service-start |
enable and start the unit |
make linux-service-stop |
stop the unit |
make linux-service-restart |
rebuild, reinstall the binary, restart |
make linux-service-status |
show the unit's state |
make linux-service-uninstall |
disable and remove the unit; the binary stays |
The unit runs /usr/local/bin/dictshelf. make linux-install installs only
the binary; PREFIX=/opt/dictshelf changes the location.
A user unit is managed with systemctl --user, e.g.
systemctl --user status dictshelf. To keep it running after logout:
Logs: journalctl --user -u dictshelf -f.
Installer¶
The installer's Start DictShelf at sign-in task puts a shortcut to
DictShelf.exe --no-browser in the Startup folder. See
Windows installer.
By hand¶
- Put
DictShelf.exein a folder, e.g.C:\tools\dictshelf\. - Win+R, enter
shell:startup. - Create a shortcut to
DictShelf.exein that folder, and add--no-browserto its target.
Started this way, DictShelf.exe shows a tray icon and logs to
%USERPROFILE%\.dmshlabs\dictshelf\db.logs\dictshelf.log. Sign out and in, then open
localhost:6888.
Settings for a background server¶
| Setting | Effect |
|---|---|
NO_BROWSER |
no browser tab at startup |
TRAY |
tray or menu-bar icon on or off |
VERBOSE |
log requests, dictionary opens, indexing and audio conversion |