Can't create Composer webloc desktop item

bootrec
Contributor

I'm going nuts with this. In 2020 I created desktop shortcuts for my Apple computer fleet just fine, and now I'm trying to create a new one and can't figure out how I did this. I've read, and re-read, this post from which I learned initially how to do this a couple years ago. Today, when I open Composer and drag the desktop webloc file in the sidebar, it creates the entry, but doesn't show the item under Desktop (it should show right under Desktop, like the picture in this post): 

bootrec_2-1655168749482.png

  1. I have confirmed that Composer has full disk access. 
  2. I have tested on a Mac with macOS 12.1 and another with macOS 12.4.
  3. macOS account has admin rights.
  4. I have tried with chown/chmod/chgflags terminal commands from the original post, and without.
  5. Current file info:
  6. bootrec_3-1655168784884.png

I'm stumped. I even tried an older Jamf Tools version, didn't make a difference. Any ideas? I know that some of you use scripts for desktop shortcuts but I really wanted to use this method.

4 REPLIES 4

sdagley
Esteemed Contributor II

@bootrec In 2020 you weren't running macOS Monterey, or probably even Big Sur. If you've still got a Catalina system available try your old process there, and if it works you'll know you're fighting a macOS change and perhaps it's time to look at using a script as a .webloc is simply a .plist file with a  different extension, and all you'd need to do is write the contents of the plist. Here's an example script that writes a .webloc for this Jamf Nation thread:

#!/bin/sh

# Write Test Webloc.webloc to current user's Desktop folder

currentUser=$(/bin/echo 'show State:/Users/ConsoleUser' | /usr/sbin/scutil | /usr/bin/awk '/Name / { print $3 }')
weblocPath="/Users/$currentUser/Desktop/Test Webloc.webloc"

/bin/cat << 'ENDOFWEBLOC' > "$weblocPath"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>URL</key>
	<string>https://community.jamf.com/t5/jamf-pro/can-t-create-composer-webloc-desktop-item/td-p/267841</string>
</dict>
</plist>
ENDOFWEBLOC

/usr/sbin/chown $currentUser "$weblocPath"
/bin/chmod 444 "$weblocPath"

exit 0

Anonymous
Not applicable

works fine here with MacOS 12.5

obi-k
Valued Contributor II

Instead of using a webloc, have you tried AppleScript? You can create an App, change the icon, and push the app to the dock. Users would click this and the website would open. The example attached opens portal.office.com to their default browser.

 

Screen Shot 2022-06-17 at 10.26.44 AM.png

Thanks for your input. I had not tried this format for AppleScript, had found another article that had the script open safari to a specific URL, which doesn't work for us because I want the URL to open into the current default browser, whatever that might be. Your script might do this though, but then the problem is with the dock. We don't want to push URL shortcuts on user's docks, we customize them during setup but after that, they get very convoluted and pushing them after the facts would result in a mutiny. We want to push them to desktops, inline with our Windows systems. Composer did this so easily, and if it's no longer working because of the latest macOS versions, Jamf should really fix it. I've opened a support ticket, will see what happens.