It’s time for an adventure in identifying macOS System Preferences Panes!
In my previous post I talked about the different ways that admins can deep-link to specific System Preference Panes, but how do you identify those panes and how do you even know if the pane itself supports url scheme linking?
Note: This post is relevant to macOS Monterey and earlier. If you're looking for more information on macOS Ventura's System Settings, check out that blog post here.
Identifying Pane Name & Anchors
How did I discover the url schemes for those panes and how can you do it as well?I’m glad you asked!
You can find the pane and associated deeplink anchors with just a little bit of applescript.
- Paste the code below into
Script Editor.app(located in /Applications/Utilities)
- Open System Preferences to the exact pane that you want to identify, and run the script.
- It will output the name of the current pane and any associated anchors.
-- Open System Preferences.app and click into desired pane/setting. Then, run this script to find out name (Pane ID) and any anchors. tell application "System Preferences" set AppleScript's text item delimiters to ", " set CurrentPane to the id of the current pane get the name of every anchor of pane id CurrentPane set CurrentAnchors to get the name of every anchor of pane id CurrentPane set the clipboard to CurrentPane display dialog "Current Pane ID: " & CurrentPane & return & return & "Pane ID has been copied to the clipboard." & return & return & "Current Anchors: " & return & (CurrentAnchors as string) end tell
You’ll get an output like this and the pane id will be copied to your clipboard:
Now unfortunately, sometimes this doesn’t capture ALL anchors that you can deeplink to (really I’ve only found it problematic with the Security & Privacy pane).
If you find some anchors/sections missing, you may want to dig into the preference pane itself and see if there’s any bits of code that reference available options. For example, the script above when run against the Security & Privacy Pane doesn’t return any options for the
Input Monitoring section. However, I can open
/System/Library/PreferencePanes/Security.prefPane/Contents/Resources/PrivacyTCCServices.plistand see the key value I’m looking for (and what that section is actually called) is
Identifying if the pane supports URLScheme.
Not all Preference Panes support URLScheme. For those that don’t, you can accomplish the same action of opening the pane with Applescript in most instances. But how do you know if a specific pane supports a URLScheme? Let’s explore.
Most of the preference panes themselves are located within
Here’s how to find if the pane supports url schemes:
- Open Finder and Go To
- Right click on the pane you want to inspect choose Inspect Package Contents
- Open the Contents >
Info.plist. If it supports url scheme you’ll see a
If the pane DOES support a url scheme, then you can use the
open command + URLschemes listed here. If it does not, and you still want to open the pane via script, you could do so using Applescript.
Hope this was helpful! Happy scripting!
3 thoughts on “Identifying System Preferences Panes”
Comments are closed.