4

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.

brdu
  • 284
  • 1
  • 3
  • 17
  • Did you ever find a solution, brdu? – MorganR Jul 30 '14 at 16:08
  • @MorganR .. yes .. kind of. Using NSScreenSaverLevel isn't enough to appear at the lock screen. NSScreenSaverLevel+10, for example would work. User ndominati2 has posted an even better solution :) – brdu Nov 04 '14 at 21:48

1 Answers1

3

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.

ndominati2
  • 136
  • 7
  • You genius! How you get that? I was really impressed, when see how Knock works. And spend a lot of time to find your answer! – skywinder Oct 22 '14 at 12:15
  • Brilliant. I was using NSScreenSaverLevel+10, but this is much cleaner. Thanks! – brdu Nov 04 '14 at 21:49