5

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.

4
  • Are you referring to the hot corner option for your screen saver?
    – Natsfan
    Commented Jun 14, 2019 at 1:23
  • 2
    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
    Commented Jun 14, 2019 at 1:38
  • You may try changing your screen saver and then set all four corners to none.
    – Natsfan
    Commented Jun 14, 2019 at 1:39
  • @IconDaemon is correct here - this setting should be persistent across reboots. I would approach your IT department/staff about it. Let them know that *this is affecting your productivity" and be sure to document (request via email). (IMO) This is a setting that shouldn't be foisted upon users.
    – Allan
    Commented Mar 2, 2020 at 17:05

3 Answers 3

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
4

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.

2
  • 1
    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
    Commented Jun 14, 2019 at 3:40
  • Worked for me. Changes only seem to take effect after killall Dock.
    – Janosh
    Commented Dec 28, 2021 at 18:14
0

It's also possible to set modifier keys for Hot Corners using defaults, normally achieved by pressing a modifier key(s) whilst selecting an action for a Hot Corner.

The relevant domain keys are wvous-tl-modifier, wvous-tr-modifier, wvous-bl-modifier and wvous-br-modifier.

The integer values for these domain keys are 0 (none), 131072 (shift), 1048576 (command), 524288 (option) and 262144 (control). Modifier key combinations can be achieved by adding two or more values together i.e. 1179648 (shift+command).

This will Put Display to Sleep when moving the mouse pointer to the bottom-left corner whilst pressing the command key:

defaults write com.apple.dock wvous-bl-corner -int 10
defaults write com.apple.dock wvous-bl-modifier -int 1048576
kilall Dock

You must log in to answer this question.

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