Unlocking the OS X screen saver from the command line
Written 03 Mar 2009
My OS X Desktop system has a problem. When the screensaver activates, there is a small window, one or two seconds in length, wherein if I depress a keyboard key or move the mouse, the screensaver does not fully activate. However, it does not de-activate, leaving me with an unusable desktop.
The system does not respond to the keyboard. The mouse functions but does activate the desktop.
To resolve this, without reboot the system, the following may work if you can login to the system via SSH:
Login via SSH as your normal user account
Execute the following:
ps ax | grep -i screensaver | grep -v grep
- The above returns the entire process as it appears in the process table. The first column contains the Process ID (PID). With the PID known, issue the following command:
kill -HUP pid
Substitute the actual PID for the word pid above.
Once the above is done, the login box should appear ( or you will be returned to the desktop if you don’t have a password protected screen saver ).