2

I have a work computer, and every time I turn it on and log in, hot corners are enabled where when I move my mouse to a corner inadvertently, it locks my screen. This happens all the time in the middle of my work.

Every time, this annoys me, and I go into System Preferences and set all the hot corners options to none. But, the next day or whenever I restart my computer, they come back! I am wondering if anyone knows how to permanently disable them so I don't need to manually disable them every time I restart my work MacBook.

Is there a terminal command or something I can set to stop Hot Corners settings from resetting back on constantly? I'm guessing my company has defaults that they apply that override the settings on restart.

  • Are you referring to the hot corner option for your screen saver? – jmh Jun 14 at 1:23
  • This setting is most likely enforced at every login by policies the Mac admins at your workplace have set on your Mac to provide an easy way for you to lock your computer. – IconDaemon Jun 14 at 1:38
  • You may try changing your screen saver and then set all four corners to none. – jmh Jun 14 at 1:39
1

Yes, there are some terminal commands to set your default setting to "none".

Disable top left hot corner:

defaults write com.apple.dock wvous-tl-corner -int 0

Disable top right hot corner:

defaults write com.apple.dock wvous-tr-corner -int 0

Disable bottom left hot corner:

defaults write com.apple.dock wvous-bl-corner -int 0

Disable bottom right hot corner:

defaults write com.apple.dock wvous-br-corner -int 0

In the “wvous-XX-corner", for the XX, tl is top left, tr is top right, bl is the bottom left, and br is the bottom right.

For the numbers at the end, “0” is nothing, “1” is disabled, “5” is start screen saver, “2” is Mission Control, “3” is Notifications”, “4” shows the desktop, and so on.

  • I tried running defaults write and setting the value to 1 but it did not have any effect. I can confirm that manually setting the hot corners to "nothing" does appear to make the value equal to 1 but setting it by defaults write does not seem to be enough to do it. I believe Apple has been making it more difficult to change values this way. IIRC it has something to do with cfprefsd caching the values, but I might be mis-remembering. – TJ Luoma Jun 14 at 3:40
1

Unfortunately the defaults write method does not seem to be reliable anymore.

The most reliable way I've found to do this is with AppleScript.

The downside is that it can take 15-30 seconds to run, during which time you should not do anything else with your keyboard or mouse.

The good news is that you should be able to save the AppleScript below as an app (call it something like "Disable HotCorners.app") and then go to System Preferences » Users & Groups » Login Items and then click the "+" and set "Disable HotCorners.app" to run at login.

Note: the AppleScript below is merely my modification of the answer given here.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

tell application "System Preferences"
    activate
    set current pane to pane id "com.apple.preference.expose"
    tell application "System Events"
        tell window "Mission Control" of process "System Preferences"
            click button "Hot Corners…"
            tell sheet 1
                tell group 1
                    set theCurrentValues to value of pop up buttons
                    if theCurrentValues is {"-", "-", "-", "-"} then
                        quit
                    else
                        repeat with i from 1 to 4
                            tell pop up button i
                                click
                                click last menu item of menu 1
                            end tell
                        end repeat
                    end if
                end tell
                click button "OK"
            end tell
        end tell
    end tell
    quit
end tell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .