(zettel (meta (back "00001003300000") (backward "00001003300000") (box-number "1") (created "20220114181521") (forward "00001003310104 00001003310106 00001003310108 00001003310110 00001004010000") (modified "20220119124635") (published "20220119124635") (role "manual") (syntax "zmk") (tags "#installation #manual #zettelstore") (title "Enable Zettelstore to start automatically on macOS")) (rights 4) (encoding "") (content "There are several ways to automatically start Zettelstore.\n\n* [[Login Items|#login-items]]\n* [[Launch Agent|#launch-agent]]\n\n=== Login Items\n\nVia macOS's system preferences, everybody is able to specify executables that are started when a user is logged in.\nTo do this, start system preferences and select \"\"Users & Groups\"\".\n\n{{00001003310104}}\n\nIn the next screen, select the current user and then click on \"\"Login Items\"\".\n\n{{00001003310106}}\n\nClick on the plus sign at the bottom and select the Zettelstore executable.\n\n{{00001003310108}}\n\nOptionally select the \"\"Hide\"\" check box.\n\n{{00001003310110}}\n\nThe next time you log into your macOS computer, Zettelstore will be started automatically.\n\nUnfortunately, hiding the Zettelstore windows does not always work.\nTherefore, this method is just a way to automate navigating to the directory where the Zettelstore executable is placed and to click on that icon.\n\nIf you don't want the Zettelstore window, you should try the next method.\n\n=== Launch Agent\n\nIf 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 [[Launchd system|https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html]].\n\nFirst, you have to create a description for \"\"Launchd\"\".\nThis is a text file named ''zettelstore.plist'' with the following content.\nIt assumes that you have copied the Zettelstore executable in a local folder called ''~/bin'' and have created a file for [[startup configuration|00001004010000]] called ''zettelstore.cfg'', which is placed in the same folder[^If you are not using a configuration file, just remove the lines ``-c`` and ``/Users/USERNAME/bin/zettelstore.cfg``.]:\n\n```\n\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\n```\n\nYou must substitute all occurrences of ''USERNAME'' with your user name.\n\nPlace this file into the user specific folder ''~/Library/LaunchAgents''.\n\nLog out and in again, or execute the command ``launchctl load ~/Library/LaunchAgents/zettelstore.plist``."))