Posted on 12-20-2018 08:27 AM
Is there a way to create a Shortcut or Web Clip to a site and place it in the users docks on their MacBooks?
Posted on 12-20-2018 08:42 AM
First off your going to want to have a look at dockutil - https://github.com/kcrawford/dockutil
We then have a script which does this:
#!/bin/sh
# Generate a help and support url file.
HelpURL="/Library/MacSD/Help & Support.url"
echo '[InternetShortcut]' > "$HelpURL"
echo -n 'URL=' >> "$HelpURL"
echo https://www.ed.ac.uk/is/it-help >> "$HelpURL"
# Set a custom icon if you need to
python -c 'import Cocoa; Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(Cocoa.NSImage.alloc().initWithContentsOfFile_("/Applications/Support.app/Contents/Resources/appIcon.icns"), "/Library/MacSD/Help & Support.url", 0)'
# Add to the dock
$DOCK_UTIL --add "$HelpURL" --section others --no-restart $DOCK_PREF
Posted on 12-20-2018 08:48 AM
You can use ProfileCreator to set the entire dock, or just target a web clip like you're looking to do. A nice advantage of making a profile in ProfileCreator is you can specify which keys you want set, and just ignore the rest (unlink the Jamf config profile interface)
The screenshot says "cannot be removed from the dock" but that doesn't actually get enforced unless "Prevent modifying items in Dock" is set to TRUE
Posted on 12-20-2018 10:31 AM
@sshort so when I select the type as URL it will automatically detect the WebClip as the URL?
Posted on 12-20-2018 11:06 AM
@bmichael You have to paste the actual URL the webclip is pointing to under the URL field. You'll also need to paste in the file location of the webclip, so that can live in something like /Shared /private/tmp.
Posted on 12-20-2018 11:15 AM
Here are a couple screenshots. Im not seeing where I can set the file location of the webclip. I can put /shared/private/tmp in the dock path or home directory but nothing under the webclip part.
Posted on 12-20-2018 11:19 AM
@bmichael your first screenshot is for a config profile that will only work for iOS devices.
Posted on 12-20-2018 11:26 AM
We use Fake