Set Hot Corners with Configuration Profile


I'm struggling with Mission Control's hot corners.
I created a Config Profile from a cleaned Everything works, the settings are applied.
The problem is that if the users try to change these hot corners, they get reverted to the ones I set up in the Config Profile.
I used MCXtoProfile with the "--once" option and uploaded the profile but it does the same.
I'd like to avoid the use of a dedicated script and instead use the config profile.
Any tips? Any idea how can set them "once"?
Below the plist file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Contributor III

Do it via script. I'm doing something like this, except allowing users to set whatever they want but never allowing A: adding a disable screensaver/lockscreen hotcorner, and B: removal of the lock/screensaver hotcorner.

# Get user logged into console and put into variable "user"
user=`ls -l /dev/console | cut -d " " -f 4`
    #   Set hotcorner actions.  Disable "Disable Screen Saver" when found.
    ## The following are the values of each option in the GUI
    # Start Screen Saver = 5
    #   Modifier = 0
    # Disable Screen Saver = 6
    #   Modifier = 0
    # Mission Control = 2
    #   Modifier = 0
    # Application Windows = 3
    #   Modifier = 0
    # Desktop = 4
    #   Modifier = 0
    # Dashboard = 7
    #   Modifier = 0
    # Notification Center = 12
    #   Modifier = 0
    # Launchpad = 11 
    #   Modifier = 0
    # Put Display to Sleep = 10
    #   Modifier = 0
    # None = 1
    #   Modifier = 1048576
    a=`defaults read /Users/$user/Library/Preferences/ | grep  "-corner""`
    for corner in $a
     cornerval=`echo $corner | cut -d "=" -f2 | cut -d ";" -f1 | sed 's/ //g'`
     corner=`echo $corner | cut -d """ -f 2 | cut -d "-" -f 1,2`
     if [ "$cornerval" = "6" ];
        echo User:Hotcorner - Disable screensaver found on $corner, fixing...
        # Setting the corner action to 1(None)
        sudo -u $user defaults write /Users/$user/Library/Preferences/ $corner-corner -int 1
        sudo -u $user defaults write /Users/$user/Library/Preferences/ $corner-modifier -int 1048576
    #  Set bottom left corner of the screen "hotcorner" action to immediately invoke the  screensaver
    defaults read /Users/$user/Library/Preferences/| grep bl-corner | grep 5 > /dev/null
    if [ $? != 0 ]; then needsFixed=1;fi
    defaults read /Users/$user/Library/Preferences/ | grep bl-modifier | grep -i "s0;" > /dev/null
    if [ $? != 0 ]; then needsFixed=1;fi
    if [ $needsFixed == 1 ];
        sudo -u $user defaults write /Users/$user/Library/Preferences/ wvous-bl-corner -int 5
        sudo -u $user defaults write /Users/$user/Library/Preferences/ wvous-bl-modifier -int 0

    # If changes were made then the dock needs to be restarted for them to take affect
    if [ "$changesmade" = "yes" ]; then sudo killall -hup cfprefsd; sudo killall -hup Dock; fi

New Contributor

I did something a little different. In the example below it sets the lower left (screen saver start) and right hot corners (screensaver delay). Users can't change the two hot corners I set but can change the other two.

  1. Make a copy of in the user library. This plist has the details we need about the Hot Corners.
  2. Open the copy of the plist in Xcode.
  3. Remove all the lines except the wvous-bl-corner and wvous-br.corner
  4. Save
  5. Export and save the File Format as Property List XML
  6. Create a new Configuration Profile in the JSS
  7. Click Custom Settings
  8. Enter as the Preference Domain
  9. Upload the plist

Contributor III

Sorry, just saw you'd like to avoid using a script. Where is your profile? If it's in the user's Library/Preferences folder and they have write access to it, AND you aren't re-deploying it to the user there shouldn't be any problems with the overwriting it.


Unfortunately not. If I set the config profile at Computer Level, the users' changes keep getting reverted.

Honored Contributor

This isn't specific to the dock, but rather config profiles and the JSS. I would avoid using any SET ONCE custom config profiles through Casper. In my testing a year ago or so, the preference being managed "once" will get reset on reboot. Not a good experience obviously. This may also be the case if you deploy a custom config outside of the JSS's MDM (package up the profile and install using the profiles command), but I never tested that.

I would recommend using dockutil and scripting this out even if that's not what you want to do.