Opening with -P -datadir profile on macos
Under Linux, I could add command line options to zotero to the desktop file, but how do I make zotero store data in the profile by default and always start up with the profile picker under macos when I click on the icon?
#!/bin/bash
open -a /Applications/Zotero.app --args -p Foo
(If you don't have multiple Zotero apps in Applications, just "-a Zotero" would suffice.)
Then assign the Zotero icon to it and double-click that to run it. A terminal window will pop up briefly when you double-click it, but then it will close (though Terminal itself will stay open — there might be a way around that with osascript but I don't know off-hand).
Of course, if you're developing something, you'd want a terminal window open anyway, in which case you would want to start from the command line (or use a shell script that called /Applications/Zotero.app/Contents/MacOS/zotero directly, which would keep it open until Zotero closed).
I don't generally want the terminal window open, when I'm debugging I have output redirected and zotero is indeed launched from a script. In the end, this did it for me, ran once after install, and probably after upgrades: I've also created a plain-text file with a note to myself in
~/Zotero
to prevent accidental creation of a data directory in the default location (which I might accidentally clobber); it will also alert me that I have to re-run the plist patcher after upgrades.