Skip to content

Instantly share code, notes, and snippets.

@rmcdongit
Last active December 11, 2024 08:03
Show Gist options
  • Save rmcdongit/f66ff91e0dad78d4d6346a75ded4b751 to your computer and use it in GitHub Desktop.
Save rmcdongit/f66ff91e0dad78d4d6346a75ded4b751 to your computer and use it in GitHub Desktop.
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
	get the name of every anchor of current pane
end tell

Opening with URL Schemes

If the preference pane supports it, you can open them with a URL in terminal using the following syntax (replace <PaneID> with the desired pane ID):

open "x-apple.systempreferences:<PaneID>"

Open with System Preferences Bundle Identifier and Pane Path

You can also access the main preference panes using the file path to each pane from /System/Library/PreferencePanes/ using the open command with slightly different syntax (replace /Path/To/Pane with your desired pane):

open -b com.apple.systempreferences /Path/To/Pane

Preference Panes

Below are all the panes that display on most Macs running 10.15 Catalina but there are a few that are ommitted that are available on later versions of Apple hardware or installed plugins. If the pane supports being opened with URL then it is listed, otherwise you can use the path.

Apple ID Pane

/System/Library/PreferencePanes/AppleIDPrefPane.prefPane

Family Sharing Pane

/System/Library/PreferencePanes/FamilySharingPrefPane.prefPane

General Pane

/System/Library/PreferencePanes/Appearance.prefPane

Desktop & Screen Saver Pane

/System/Library/PreferencePanes/DesktopScreenEffectsPref.prefPane

Dock Pane

/System/Library/PreferencePanes/Dock.prefPane

Mission Control Pane

/System/Library/PreferencePanes/Expose.prefPane

Siri Pane

com.apple.preference.speech
/System/Library/PreferencePanes/Speech.prefPane

Spotlight Pane

/System/Library/PreferencePanes/Spotlight.prefPane

Language & Region Pane

/System/Library/PreferencePanes/Localization.prefPane

Notifications Pane

com.apple.preference.notifications
open -b com.apple.systempreferences /System/Library/PreferencePanes/Notifications.prefPane

Internet Accounts Pane

/System/Library/PreferencePanes/InternetAccounts.prefPane

Users & Groups Pane

/System/Library/PreferencePanes/Accounts.prefPane

Accessibility Pane

com.apple.preference.universalaccess
/System/Library/PreferencePanes/UniversalAccessPref.prefPane
  • Display com.apple.preference.universalaccess?Seeing_Display

  • Zoom com.apple.preference.universalaccess?Seeing_Zoom

  • VoiceOver com.apple.preference.universalaccess?Seeing_VoiceOver

  • Descriptions com.apple.preference.universalaccess?Media_Descriptions

  • Captions com.apple.preference.universalaccess?Captioning

  • Audio com.apple.preference.universalaccess?Hearing

  • Keyboard com.apple.preference.universalaccess?Keyboard

  • Mouse & Trackpad com.apple.preference.universalaccess?Mouse

  • Switch Control com.apple.preference.universalaccess?Switch

  • Dictation com.apple.preference.universalaccess?SpeakableItems

Screen Time

com.apple.preference.screentime
/System/Library/PreferencePanes/ScreenTime.prefPane

Extensions Pane

/System/Library/PreferencePanes/Extensions.prefPane

Security & Privacy Pane

Tip: The "Advanced" anchor will initially open S&P pane to your last used tab (General, FileValut, Firewall, Privacy)but if the pane is already open it triggers a the panel unlock wherever the user may be at in the Security and Privacy pane. So, if you want them to enable a specific Privacy setting, open the desired Privacy anchor first (e.g. ?Privacy_Contacts) and then open the Advanced anchor (?Advanced) to prompt the user password to unlock the preference pane.

Main Tabs

com.apple.preference.security
/System/Library/PreferencePanes/Security.prefPane
  • General com.apple.preference.security?General

  • Advanced com.apple.preference.security?Advanced

  • FileVault com.apple.preference.security?FDE

  • Firewall com.apple.preference.security?Firewall

  • Privacy Main com.apple.preference.security?Privacy

Privacy Anchors

  • Location Services com.apple.preference.security?Privacy_LocationServices

  • Contacts com.apple.preference.security?Privacy_Contacts

  • Calendars com.apple.preference.security?Privacy_Calendars

  • Reminders com.apple.preference.security?Privacy_Reminders

  • Photos com.apple.preference.security?Privacy_Photos

  • Camera com.apple.preference.security?Privacy_Camera

  • Microphone com.apple.preference.security?Privacy_Microphone

  • Speech Recognition com.apple.preference.security?Privacy_SpeechRecognition

  • Accessibility com.apple.preference.security?Privacy_Accessibility

  • Input Monitoring Not Available

  • Full Disk Access com.apple.preference.security?Privacy_AllFiles

  • Files and Folders Not Available

  • Screen Recording Not Available

  • Automation com.apple.preference.security?Privacy_Automation

  • Analytics and Improvements com.apple.preference.security?Privacy_Diagnostics

  • Advertising com.apple.preference.security?Privacy_Advertising

Software Update Pane

/System/Library/PreferencePanes/SoftwareUpdate.prefPane

Network Pane

/System/Library/PreferencePanes/Network.prefPane

Bluetooth Pane

/System/Library/PreferencePanes/Bluetooth.prefPane

Sound Pane

/System/Library/PreferencePanes/Sound.prefPane

Printers & Scanners Pane

/System/Library/PreferencePanes/PrintAndFax.prefPane
/System/Library/PreferencePanes/PrintAndScan.prefPane

Keyboard Pane

/System/Library/PreferencePanes/Keyboard.prefPane

  • Dictation com.apple.preference.speech?Dictation

Trackpad Pane

/System/Library/PreferencePanes/Trackpad.prefPane

Mouse Pane

/System/Library/PreferencePanes/Mouse.prefPane

Displays Pane

/System/Library/PreferencePanes/Displays.prefPane

Energy Saver Pane

/System/Library/PreferencePanes/EnergySaver.prefPane

Date & Time Pane

/System/Library/PreferencePanes/DateAndTime.prefPane

Sharing Preference Pane

com.apple.preferences.sharing
/System/Library/PreferencePanes/SharingPref.prefPane
  • Screen Sharing com.apple.preferences.sharing?Services_ScreenSharing

  • File Sharing com.apple.preferences.sharing?Services_PersonalFileSharing

  • Printer Sharing com.apple.preferences.sharing?Services_PrinterSharing

  • Remote Login com.apple.preferences.sharing?Services_RemoteLogin

  • Remote Management com.apple.preferences.sharing?Services_ARDService

  • Remote Apple Events com.apple.preferences.sharing?Services_RemoteAppleEvent

  • Internet Sharing com.apple.preferences.sharing?Internet

  • Bluetooth Sharing com.apple.preferences.sharing?Services_BluetoothSharing

Time Machine Pane

/System/Library/PreferencePanes/TimeMachine.prefPane

Startup Disk Pane

/System/Library/PreferencePanes/StartupDisk.prefPane

Profiles Pane

/System/Library/PreferencePanes/Profiles.prefPane

@ianhferguson
Copy link

Anyone know the URI for "Printer Options" within System Settings? I see the two options about PrintAndFax and PrintAndScan, but when you open a printer and click Options & Supplies... it appears to open a window that has a different URI than these preference panes. Anyone know the URI for this window?

@ianhferguson
Copy link

Anyone know the URI for "Printer Options" within System Settings? I see the two options about PrintAndFax and PrintAndScan, but when you open a printer and click Options & Supplies... it appears to open a window that has a different URI than these preference panes. Anyone know the URI for this window?

Actually, it looks like these two options might not work at all for the Printers and Scanners pref pane. I think it's a new URI entirely.

@luckman212
Copy link

Not sure if it helps anyone, but I found some deeplink URLs e.g. Passkey Access using the method below (requires jq)

TCC_SVC_PLIST='/System/Library/ExtensionKit/Extensions/SecurityPrivacyExtension.appex/Contents/Resources/TCCServiceList.plist'
plutil -convert json -o - -- $TCC_SVC_PLIST |
jq '"x-apple.systempreferences:com.apple.preference.security?" as $p |
  map(select(.revealElementKeyName) | {
    tcc: .tcc,
    serviceName: .serviceName,
    url: ($p + .revealElementKeyName)
  })'

Example output on my 15.0.1 system:

[
  {
    "tcc": "kTCCServiceAddressBook",
    "serviceName": "CONTACTS",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_Contacts"
  },
  {
    "tcc": "kTCCServiceReminders",
    "serviceName": "REMINDERS",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_Reminders"
  },
  {
    "tcc": "kTCCServiceBluetoothAlways",
    "serviceName": "BLUETOOTH",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_Bluetooth"
  },
  {
    "tcc": "kTCCServiceMotion",
    "serviceName": "MOTION",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_Motion"
  },
  {
    "tcc": "kTCCServiceWillow",
    "serviceName": "HOMEKIT",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_HomeKit"
  },
  {
    "tcc": "kTCCServiceSpeechRecognition",
    "serviceName": "SPEECH_RECOGNITION",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_SpeechRecognition"
  },
  {
    "tcc": "kTCCServiceMediaLibrary",
    "serviceName": "MEDIA",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_Media"
  },
  {
    "tcc": "kTCCServiceSystemPolicyAllFiles",
    "serviceName": "ALL_FILES",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles"
  },
  {
    "tcc": "kTCCServiceFocusStatus",
    "serviceName": "DND",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_Focus"
  },
  {
    "tcc": "kTCCServiceListenEvent",
    "serviceName": "LISTEN_EVENT",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_ListenEvent"
  },
  {
    "tcc": "kTCCServiceRemoteDesktop",
    "serviceName": "REMOTE_DESKTOP",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_RemoteDesktop"
  },
  {
    "tcc": "kTCCServiceWebBrowserPublicKeyCredential",
    "serviceName": "WEB_BROWSER_PASSKEY_ACCESS",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_PasskeyAccess"
  },
  {
    "tcc": "kTCCServiceSystemPolicyAppBundles",
    "serviceName": "APPLICATION_BUNDLES",
    "url": "x-apple.systempreferences:com.apple.preference.security?Privacy_AppBundles"
  }
]

@dilames
Copy link

dilames commented Oct 9, 2024

@buddax2
Hope it is what you were looking for.

x-apple.systempreferences:com.apple.ExtensionsPreferences?extensionPointIdentifier=com.apple.system_extension.endpoint_security.extension-point

@buddax2
Copy link

buddax2 commented Oct 9, 2024

@dilames this is awesome! Thank you! How did you find that?

@dilames
Copy link

dilames commented Oct 9, 2024

@buddax2

Disassembled one of the Security Apps for macOS.

@gingerbeardman
Copy link

@dilames possible for us to do it with other apps?

@dilames
Copy link

dilames commented Oct 9, 2024

@gingerbeardman yes.

If you already have an app on the mac that opens preference pane you are looking for, just use Hopper.app and look for hardcoded strings with prefix "x-apple.systempreferences".

@gingerbeardman
Copy link

Thanks, I'll keep that in mind!

@mmppeegg
Copy link

Thanks @dilames, very helpful information.

@kaiwen-wang
Copy link

here's some more after I ran this command

strings "/System/Library/ExtensionKit/Extensions/SecurityPrivacyExtension.appex/Contents/MacOS/SecurityPrivacyExtension" | grep "Privacy_"

Privacy_AppleIntelligenceReport
Privacy_DevTools
Privacy_Automation
Privacy_NudityDetection
Privacy_Location
Privacy_LocationServices
Privacy_SystemServices
Privacy_ScreenCapture
Privacy_AudioCapture
Privacy_Advertising
Privacy_Analytics
Privacy_FilesAndFolders
Privacy_DesktopFolder
Privacy_DocumentsFolder
Privacy_DownloadsFolder
Privacy_NetworkVolume
Privacy_RemovableVolume
Privacy_Accessibility
Privacy_Microphone
Privacy_Calendars
Privacy_Pasteboard
Privacy_Camera
Privacy_Photos

@July250229
Copy link

I successfully opened the Network Extensions using:

x-apple.systempreferences:com.apple.LoginItems-Settings.extension?ExtensionItems

However, I couldn't open the popup window.

If I click the button in the system alert window, it opens correctly. Does anyone have any ideas?
CleanShot 2024-10-31 at 14 46 12@2x

@ChokWah
Copy link

ChokWah commented Oct 31, 2024

Thx @buddax2 @dilames
Open driver extension link: only work for macos 15.0

x-apple.systempreferences:com.apple.ExtensionsPreferences?extensionPointIdentifier=com.apple.system_extension.driver_extension.extension-point

@buddax2
Copy link

buddax2 commented Oct 31, 2024

I successfully opened the Network Extensions using:

x-apple.systempreferences:com.apple.LoginItems-Settings.extension?ExtensionItems

However, I couldn't open the popup window.

If I click the button in the system alert window, it opens correctly. Does anyone have any ideas? CleanShot 2024-10-31 at 14 46 12@2x

Here is the link you are looking for:

x-apple.systempreferences:com.apple.ExtensionsPreferences?extensionPointIdentifier=com.apple.system_extension.network_extension.extension-point

@ChokWah
Copy link

ChokWah commented Nov 1, 2024

@buddax2 @dilames thank you guys. I found it . Open driver extension link: only work for macos 15.0

x-apple.systempreferences:com.apple.ExtensionsPreferences?extensionPointIdentifier=com.apple.system_extension.driver_extension.extension-point.

But in Macos 14 and other . It's a button name "Details..." . I try this way to found the anchor of it by Apple Script. It‘s not work.
https://www.macosadventures.com/2022/02/10/identifying-system-preferences-panes/

SCR-20241101-khmb

As I know, use x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension, it will locate to the Details button location.
I can't found the parameter to open details window.

Do you have any idea ?

SCR-20241101-kdip

**If you click the Details button , it will request your password. Then it will display the driver extension window. **

SCR-20241101-kfqx SCR-20241101-kdep

@brandon-fryslie
Copy link

Great work everyone. Here is a command to start the install of a configuration profile and open the PrefPane so you can easily install it:

open x-apple.systempreferences:com.apple.Profiles-Settings.extension /path/to/profile.mobileconfig

I don't install a lot of these, but in MacOS 15 one is required to bypass gatekeeper so I assume a lot more people will be running them now.

@drandomuser
Copy link

@brandon-fryslie Is there a way to achieve the same with Text Replacements? Like we open the Text Replacements and import the .plist file via the command line?

image

@July250229
Copy link

I successfully opened the Network Extensions using:
x-apple.systempreferences:com.apple.LoginItems-Settings.extension?ExtensionItems
However, I couldn't open the popup window.
If I click the button in the system alert window, it opens correctly. Does anyone have any ideas? CleanShot 2024-10-31 at 14 46 12@2x

Here is the link you are looking for:

x-apple.systempreferences:com.apple.ExtensionsPreferences?extensionPointIdentifier=com.apple.system_extension.network_extension.extension-point

That's awesome! Thank you. How can you make it?

@aviwad
Copy link

aviwad commented Nov 15, 2024

Is there any URL for the new translation page?
image
image

@brandon-fryslie
Copy link

@brandon-fryslie Is there a way to achieve the same with Text Replacements? Like we open the Text Replacements and import the .plist file via the command line?

image

Yes, there is. I asked ChatGPT. Here is how to do it:

Stored in the file '~/Library/Preferences/.GlobalPreferences.plist', under the key 'NSUserDictionaryReplacementItems'.

However to export and import, don't edit the file directly. Use the defaults command.

  • See existing text replacements (output in json): defaults read -g NSUserDictionaryReplacementItems
  • Import existing plist containing text replacements: defaults import -g /path/to/your-plist-file.plist

This will import a plist in the following format:

<?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">
<array>
    <dict>
        <key>on</key>
        <string>1</string>
        <key>replace</key>
        <string>brb</string>
        <key>with</key>
        <string>be right back</string>
    </dict>
    <dict>
        <key>on</key>
        <string>1</string>
        <key>replace</key>
        <string>omw</string>
        <key>with</key>
        <string>on my way</string>
    </dict>
</array>
</plist>

(Note: you likely need to reboot after importing text replacements)

  • Export current text replacements: defaults export -g ~/Desktop/text_replacements_backup.plist

You don't actually need to open the panel to import or export text replacements. Hope this helps. Here is the prompt I used:

Where are Text Replacements stored in MacOS?  please provide me the specific plist, as well as explain how I can import Text Replacements from a plist from the terminal

@ChokWah
Copy link

ChokWah commented Nov 20, 2024

Is there any URL for the new translation page?
image image

@aviwad I believe this url would be work:
x-apple.systempreferences:com.apple.Localization-Settings.extension?translation

@aviwad
Copy link

aviwad commented Nov 20, 2024

Thank you so much @ChokWah :)

@luckman212
Copy link

luckman212 commented Nov 20, 2024

Anyone know of a URL to get directly to Privacy → Local Network?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment