Category filter

Script to set Safari homepage on Mac

Configuring the homepage allows you to control what will be displayed when a user launches the browser. Here is a custom script that will help you set the homepage for macOS devices. Remotely execute it using the Execute Custom Script action from the Hexnode console.

Disclaimer:

The sample scripts provided below are adapted from third-party open source sites.

Configure default Safari homepage

Use the script below to set the default homepage for the currently logged-in user on a macOS device:

Replace the URL mentioned in the script with your desired homepage URL. The homepage URL in the script becomes the default homepage in the com.apple.Safari.plist file. The homepage URL is launched automatically when a new tab or window is opened on the browser.

Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository