If you want to create a bookmark for a webpage using a script (which, for example, you can run at user login), just create a script with this code:
/usr/libexec/PlistBuddy -c “add :URL string ‘http://YOURWEBSITE.COM‘” ~/Desktop/BOOKMARK.webloc
Just substitute in the actual website you want for YOURWEBSITE.COM and the actual name of the desktop short for BOOKMARK.
If you’d prefer not to use the deprecated login hook, you can use Outset to run your login scripts.
Leave a Reply