Enable Zettelstore to start automatically on Linux

Since there is no such thing as the one Linux, there are too many different ways to automatically start Zettelstore.

If you use a different desktop environment, it often helps to to provide its name and the string “autostart” to google for it with the search engine of your choice.

Yet another way is to make use of the middleware that is provided. Many Linux distributions make use of systemd, which allows to start processes on behalf of an user. On the command line, adapt the following script to your own needs and execute it:

# mkdir -p "$HOME/.config/systemd/user"
# cd "$HOME/.config/systemd/user"
# cat <<__EOF__ > zettelstore.service
After=network.target home.mount

ExecStart=/usr/local/bin/zettelstore run -d zettel

# systemctl --user daemon-reload
# systemctl --user enable zettelstore.service
# systemctl --user start zettelstore.service
# systemctl --user status zettelstore.service

The last command should output some lines to indicate success.