Create a Mac favorite/bookmark desktop shortcut with a script


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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.