Enable Zettelstore to start automatically on Linux

Because there is no single way Linux systems are configured, there are many ways to start Zettelstore automatically.

If you're using a different desktop environment, try searching for its name together with the word “autostart”.

Alternatively, if your system uses systemd, you can configure it to start Zettelstore as a user service. Many Linux distributions use systemd as their init system and service manager. Adapt the following commands to your needs, then run them from a terminal:

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

[Service]
ExecStart=/usr/local/bin/zettelstore run -d zettel

[Install]
WantedBy=default.target
__EOF__
$ systemctl --user daemon-reload
$ systemctl --user enable zettelstore.service
$ systemctl --user start zettelstore.service
$ systemctl --user status zettelstore.service

The last command should show that the service is active and running.