(((meta (@ (content . "Enable Zettelstore to start automatically on macOS") (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 . "00001003310104 00001003310106 00001003310108 00001003310110 00001004010000") (name . "forward"))) (meta (@ (content . "en") (name . "lang"))) (meta (@ (content . "EUPL-1.2-or-later") (name . "license"))) (meta (@ (content . "20220119124635") (name . "modified"))) (meta (@ (content . "20220119124635") (name . "published"))) (meta (@ (content . "public") (name . "visibility")))) (p "There are several ways to automatically start Zettelstore.") (ul (li (a (@ (href . "#login-items")) "Login Items")) (li (a (@ (href . "#launch-agent")) "Launch Agent"))) (h2 (@ (id . "login-items")) "Login Items") (p "Via macOS's system preferences, everybody is able to specify executables that are started when a user is logged in." " " "To do this, start system preferences and select " (@L (@H "“") "Users & Groups" (@H "”")) ".") (p (img (@ (alt . "Zettel without title: 00001003310104") (src . "00001003310104")))) (p "In the next screen, select the current user and then click on " (@L (@H "“") "Login Items" (@H "”")) ".") (p (img (@ (alt . "Zettel without title: 00001003310106") (src . "00001003310106")))) (p "Click on the plus sign at the bottom and select the Zettelstore executable.") (p (img (@ (alt . "Zettel without title: 00001003310108") (src . "00001003310108")))) (p "Optionally select the " (@L (@H "“") "Hide" (@H "”")) " check box.") (p (img (@ (alt . "Zettel without title: 00001003310110") (src . "00001003310110")))) (p "The next time you log into your macOS computer, Zettelstore will be started automatically.") (p "Unfortunately, hiding the Zettelstore windows does not always work." " " "Therefore, this method is just a way to automate navigating to the directory where the Zettelstore executable is placed and to click on that icon.") (p "If you don't want the Zettelstore window, you should try the next method.") (h2 (@ (id . "launch-agent")) "Launch Agent") (p "If you want to execute Zettelstore automatically and less visible, and if you know a little bit about working in the terminal application, then you could try to run Zettelstore under the control of the " (a (@ (href . "https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html") (rel . "external")) "Launchd system") ".") (p "First, you have to create a description for " (@L (@H "“") "Launchd" (@H "”")) "." " " "This is a text file named " (kbd "zettelstore.plist") " with the following content." " " "It assumes that you have copied the Zettelstore executable in a local folder called " (kbd "~/bin") " and have created a file for " (a (@ (href . "00001004010000")) "startup configuration") " called " (kbd "zettelstore.cfg") ", which is placed in the same folder" (sup (@ (id . "fnref:1")) (a (@ (class . "zs-noteref") (href . "#fn:1") (role . "doc-noteref")) "1")) ":") (pre (code "\n\n\n\t\n\t\tLabel\n\t\tde.zettelstore\n\n\t\tProgramArguments\n\t\t\n\t\t\t/Users/USERNAME/bin/zettelstore\n\t\t\trun\n\t\t\t-c\n\t\t\t/Users/USERNAME/bin/zettelstore.cfg\n\t\t\n\n\t\tWorkingDirectory\n\t\t/Users/USERNAME\n\n\t\tEnvironmentVariables\n\t\t\n\t\t\tHOME\n\t\t\t/Users/USERNAME\n\t\t\n\n\t\tKeepAlive\n\t\t\n\n\t\tLowPriorityIO\n\t\t\n\n\t\tProcessType\n\t\tBackground\n\n\t\tStandardOutPath\n\t\t/Users/USERNAME/Library/Logs/Zettelstore.log\n\n\t\tStandardErrorPath\n\t\t/Users/USERNAME/Library/Logs/Zettelstore-Errors.log\n\t\n")) (p "You must substitute all occurrences of " (kbd "USERNAME") " with your user name.") (p "Place this file into the user specific folder " (kbd "~/Library/LaunchAgents") ".") (p "Log out and in again, or execute the command " (code "launchctl load ~/Library/LaunchAgents/zettelstore.plist") "."))