Is it possible to replace the Mac OS X login window, /System/Library/CoreServices/loginwindow.app, with a custom login window application? (See my rational for doing so.)
I'm afraid my Cocoa programming skills are rudimentary. I do find it interesting that, when I run probe CGSession (which is a undocumented utility that performs fast user switching) to see what functions it uses, by doing
nm -mg /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession
that one of the linked function is:
(undefined [lazy bound]) external _CGSCreateLoginSession (from ApplicationServices)
I haven't found documentation on the ApplicationServices framework. I suspect I'm getting deep into Service Provider Interfaces instead of Application Programmer Interfaces.
I did find this really interesting snippet: (google cache) (direct link to down page; it appears the site is undergoing re-organization) from an application that claims to switch to the login window even if fast user switching is disabled.
#include "CGSInternal.h"
int main (int argc, const char * argv[]) {
// switch to the login window
CGSCreateLoginSession(NULL);
return 0;
}
I take CG to mean CoreGraphics, and don't understand what that has to do with logging in (except with perhaps putting a login dialog up over the current user's work).
Even if it is not possible to achieve a replacement for the login window, I'd be interested to know what can be done along these lines (by people who don't work for Apple).