objective-cmacossfauthorizationpluginview

Add button to OSX lock screen


Is it possible to alter the existing OSX lock screen ? For example if I wanted to add a button above the users profile image that says "Hello World" on click.. is this possible?

The goal is to run an AppleScript when the button is clicked.

EDIT -

/System/Library/PrivateFrameworks/LoginUIKit.framework

Inside here you have the ability to change the login screen images and such, but also it contains several compiled nib files abbreviated with 'LUI' which I am assuming stands for 'Locked User Interface'. I'm about to set up parallels and try to open them in Snow Leopard with xcode 3.2.6, and see if I can edit the nibs. If I'm able to accomplish this, would editing such files be in violation of their TOS?

Another possibility was running a window above it. On screen lock I can get the window above the screensaver simply by saying

[window setLevel:NSScreenSaverLevel]

but still, that doesn't overlay the login screen.

I feel like this shouldn't even be possible, but I seen something similar on the Knock to Unlock app.


Solution

  • Did you try to use the following line?

    [window setLevel:CGShieldingWindowLevel()+1];
    

    I'm using it to do the same as KnockToUnlock and it works like a charm. I see my window above the login screen either if I come on the login screen from the sleep mode or the screensaver.

    Hope this helps.