(zettel (meta (back "00001003300000") (backward "00001003300000") (box-number "1") (created "20220114181521") (forward "00001003600000") (modified "20260707162000") (published "20260707162000") (role "manual") (syntax "zmk") (tags "#installation #manual #zettelstore") (title "Enable Zettelstore to start automatically on Linux")) (rights 4) (encoding "") (content "Because there is no single way Linux systems are configured, there are many ways to start Zettelstore automatically.\n\n* One option is to treat your Linux desktop system as a server and use the [[recipe to install Zettelstore on a server|00001003600000]].\n** A lightweight alternative is described below.\n* If you are using the [[GNOME Desktop|https://www.gnome.org/]], you can use [[GNOME Tweaks|https://gitlab.gnome.org/GNOME/gnome-tweaks]].\n It allows you to specify applications that should run automatically when you log in.\n* [[KDE|https://kde.org/]] provides a system setting to [[autostart|https://docs.kde.org/stable_kf6/en/plasma-workspace/kcontrol/autostart/]] applications.\n* [[Xfce|https://xfce.org/]] lets you specify [[autostart applications|https://docs.xfce.org/xfce/xfce4-session/preferences#application_autostart]].\n\nIf you're using a different desktop environment, try searching for its name together with the word \"\"autostart\"\".\n\nAlternatively, if your system uses [[systemd|https://systemd.io/]], you can configure it to start Zettelstore as a user service.\nMany Linux distributions use systemd as their init system and service manager.\nAdapt the following commands to your needs, then run them from a terminal:\n\n```\n$ 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\n```\nThe last command should show that the service is active and running."))