Disable / cancel sleep command on macOSX

It seems impossible to completely disable the Sleep option on MacOSX so that the user cannot manually put the system into sleep mode.

Is there a way in Leopard (or even Snow Leopard) for AppleScript to catch the "Sleep" event and cancel it?

+3
source share
3 answers

You cannot do this from user mode because the power manager prevents it, so you will need to use a kernel extension like InsomniaX .

+3
source

Apple-osx-Terminal, OSX:

$ pmset noidle
Preventing idle sleep (^C to exit)...

reset - "Control-C".
. man pmset.

$ caffeinate -i

. , , , 4 , - , , :

$ caffeinate -t 144000 &

+6

Source: https://habr.com/ru/post/1714133/


All Articles