(((meta ((content . "Enable Zettelstore to start automatically on Linux") (name . "title"))) (meta ((content . "manual") (name . "role"))) (meta ((content . "#installation #manual #zettelstore") (name . "tags"))) (meta ((content . "zmk") (name . "syntax"))) (meta ((content . "00001003300000") (name . "back"))) (meta ((content . "00001003300000") (name . "backward"))) (meta ((content . "1") (name . "box-number"))) (meta ((content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta ((content . "20220114181521") (name . "created"))) (meta ((content . "00001003600000") (name . "forward"))) (meta ((content . "en") (name . "lang"))) (meta ((content . "EUPL-1.2-or-later") (name . "license"))) (meta ((content . "20260707162000") (name . "modified"))) (meta ((content . "20260707162000") (name . "published"))) (meta ((content . "public") (name . "visibility")))) (p "Because there is no single way Linux systems are configured, there are many ways to start Zettelstore automatically.") (ul (li (p "One option is to treat your Linux desktop system as a server and use the " (a ((href . "00001003600000")) "recipe to install Zettelstore on a server") ".") (ul (li "A lightweight alternative is described below."))) (li (p "If you are using the " (a ((href . "https://www.gnome.org/") (rel . "external")) "GNOME Desktop") ", you can use " (a ((href . "https://gitlab.gnome.org/GNOME/gnome-tweaks") (rel . "external")) "GNOME Tweaks") "." " " "It allows you to specify applications that should run automatically when you log in.")) (li (p (a ((href . "https://kde.org/") (rel . "external")) "KDE") " provides a system setting to " (a ((href . "https://docs.kde.org/stable_kf6/en/plasma-workspace/kcontrol/autostart/") (rel . "external")) "autostart") " applications.")) (li (p (a ((href . "https://xfce.org/") (rel . "external")) "Xfce") " lets you specify " (a ((href . "https://docs.xfce.org/xfce/xfce4-session/preferences#application_autostart") (rel . "external")) "autostart applications") "."))) (p "If you're using a different desktop environment, try searching for its name together with the word " (@L (@H "“") "autostart" (@H "”")) ".") (p "Alternatively, if your system uses " (a ((href . "https://systemd.io/") (rel . "external")) "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:") (pre (code "$ mkdir -p \"$HOME/.config/systemd/user\"\n$ cd \"$HOME/.config/systemd/user\"\n$ cat <<__EOF__ > zettelstore.service\n[Unit]\nDescription=Zettelstore\nAfter=network.target home.mount\n\n[Service]\nExecStart=/usr/local/bin/zettelstore run -d zettel\n\n[Install]\nWantedBy=default.target\n__EOF__\n$ systemctl --user daemon-reload\n$ systemctl --user enable zettelstore.service\n$ systemctl --user start zettelstore.service\n$ systemctl --user status zettelstore.service")) (p "The last command should show that the service is active and running."))