Hack the Login Window

by Chris Seibold Apr 13, 2006

If you download the latest copy of Cocktail you’ll note that it allows you to change the text of the login window. A nifty feature to be sure (in the olden days you had to invoke the command line, summon pico and muck about to get everything just right) but just not enough for those who want a truly customized login Window (and who wouldn’t). With that in mind I thought it would be nifty to run through a method to change the picture the login window displays. One caveat: I’m sure there are easier/better ways to do this, but this is the way I came up with. Ready? Let’s go! Well, not just yet. If you want to play along you’ll have to install Xcode. It came with your Mac, so no out of pocket expense.

First use Cocktail to change the login window text (I used “Do not seek the treasure”) and decide if you’te satisfied. Somehow, a custom banner just doesn’t seem like enough to me. You’re using a Mac so you probably appreciate the visual aspect of Mac OS X. So let’s take the login window to the next level and add some visual customization. For this, you’ll need to modify the LoginWindowUI.nib file. Before you get around to modifying the file that tells Mac OS X what images to display at login you’ll want a custom image for that file to actually use. A little pre-hack homework is in order. Create a 90 × 90 image (.tif format naturally) that you would like displayed in the Login Window and store it on the Desktop. The file you just created needs to be stored in a specific folder for the file you are going to modify to make use of said image so it is off to the Terminal. Type the following:

cd Users/cks/Desktop/
cp newfile.tif /System/Library/CoreServices/SecurityAgentPlugins/loginwindow.bundle/Contents/Resources/English.lproj

Where newfile.tif is the file you just created and everything that follows is the destination for your newly created image. Now back to the hack. First, you need to locate the necessary file. The path is as follows:

MacHD/System/Library/CoreServices/SecurityAgentPlugins

If you’ve followed that path correctly you won’t see the file we are looking for. You will see some .bundle files that resemble little Lego blocks. Don’t worry, everything is as expected. Control-click on loginwindow.bundle and choose “Show Package Contents.” From this point adhere to the following path:

Contents/Resources/English.lproj/LoginWindowUI.nib

Now make a backup copy of this file and place it somewhere it can remain untouched by hacking hands. (*Not strictly necessary because when you save changes to a .nib file the original file is preserved as

~.nib. Still it is a good precaution.) Create another copy to work on (Mac OS X won’t allow you work directly on the file when it resides in the English.lproj folder). Now double-click on the working copy of LoginWindowUI.nib and Interface Builder will open the file (hope you’ve installed Xcode). You’ll see a three windows, as shown in below:

image

The many windowed Interface Builder

In Interface Builder, select Tools → Show Inspector.

image

Your pal the inspector

Click on the spot where the Apple logo resides; you should see the Inspector window shown above (if not make sure Inspector is set to “Attributes”). The small bit of text that says “applelogo” is all you need to change.


Note the text box next to the “Image” title it is currently set to “applelogo.” If you change “applelogo” to some other name of a .tif file in the Resources folder, the Login Window will display that image instead. For example, if you changed it to contH.tiff, you would see a continue button instead of the Apple Logo.

Type in a name for the image file you want to use, in this exercise the filename is “newfile.” Go to File → Save to save the file, and then quit Interface Builder. Now drag your hacked copy of LoginWindowUI.nib back to the English.lproj folder and replace the now outdated file. When you do, you’re told you are not allowed to do that, but remember that this is your computer, so all you need to do is hit the Authenticate button and type in your password. The system bows to your will and saves the nib file to the English.lproj folder, just as you wanted (er, demanded!).


Now log out of your account and (payoff time) when you log back in you’ll see this:

image

No other Mac in the world has a Login Window like this!

The dirtier way to do this is by simply replacing the applelogo.tif file with a .tif of your own. Sure, that method works just fine, but you wouldn’t have learned anything about Interface Builder and you will likely find the hacked file showing up at unexpected times.


As you have guessed by now you can use this methodology to completely revamp the Login Window. I think I’ll leave mine with just the additional text and cousin Pete looking on, but you can use Interface Builder to change just about any visual element that is displayed when the Login Window is shown.

Comments

  • Or use Visage, which not only allows you to customise the log-in window as much as you’ve shown here, but also has a few of other options available for ‘hacking’ the GUI, like running screensavers as a background picture.

    (note, it’s $9.95 shareware)

    Marius_Th had this to say on Apr 13, 2006 Posts: 11
  • Chris Seibold says:

    “(in the olden days you had to invoke the command line, summon pico and muck about to get everything just right)”

    Ha! In the olden days you had to fire up ResEdit and muck about hex strings.

    Kids!

    Andrew Craft had this to say on Apr 14, 2006 Posts: 1
  • Ha!  In the oldener days you had to muck around in AppleSoft BASIC until you realized it had no hooks whatsoever and then write an assembler patch to get the functionality you needed.  Later on when the Apple IIGS super high-res mode was introduced it would crash.

    dasil003 had this to say on Apr 14, 2006 Posts: 2
  • Now what would I need to do to have the window show the time, or display a message like “You are logging in at [time]?”  I know that by clicking you can cycle through a few banners in the login window (including, oddly, the serial number), but I’d like to set it to just show the time.

    Andrew Harden had this to say on Apr 15, 2006 Posts: 19
  • I think Onyx or Tinkertool would let you set the time banner as default banner

    Marius_Th had this to say on Apr 15, 2006 Posts: 11
  • For some reason this isn’t working for me. I’ve tried it, and it’s just failing. Do you know why?

    Wes Palmer
    http://www.HackMac.org

    Jamz had this to say on Aug 27, 2007 Posts: 1
  • Nice guide!

    One question.. different order..
    When you lock the screen and you see the message like: ” you must authenticate to unlock the screen. .. ”
    How can you change THAT text?

    ivolution had this to say on Sep 12, 2008 Posts: 1
  • I can’t really get the process but sooner I will know how to do it even if its confusing at first.

    nuru massage

    nuru massage had this to say on Feb 28, 2011 Posts: 1
  • That’s pretty fun to be able to customize your Mac login.  I love it and I’m totally going to try it!  Thanks for the info.
    free dating

    Shea had this to say on Mar 26, 2011 Posts: 1
  • The marketing department would inform the R&D;department to create a prototype of a product based on consumers’ new desires. Thanks.
    Regards,
    california car insurance

    jaffa had this to say on Sep 08, 2011 Posts: 9
  • Many countries are signatories to international treaties concerning intellectual property, and thus companies registered in these countries are subject to national laws bound by these treaties.
    Thanks.
    Regards,
    Carefree Real Estate AZ

    jaffa had this to say on Sep 09, 2011 Posts: 9
  • Youre so awesome, man! I career opportunities cant wait to read what youve got next. I love everything that youre saying E-Commerceand want more, more, MORE! Keep this up, man! Its just too good.I just couldn’t leave your website before saying that I really SEO Specialist like this article. there’s a good chance to receive a perfect concept in your mind. the quality information Agriculture Articles you offer to your visitors . Even it took some time to me read all the opinions arabic girls but I truly enjoyed and also got impressed by these posts.It turned out to be very useful to me and I am sure to all the posters who post jobs in pakistan their comments here

    zoe had this to say on Sep 10, 2011 Posts: 4
  • There are subject to extremely detailed and complicated regulation about their internal governance and when and how information is disclosed to the public and their shareholders. Thanks a lot.
    Regards,
    SEO

    jaffa had this to say on Sep 24, 2011 Posts: 9
  • Primary research can also be broken down into quantitative research and qualitative research, which, as the terms suggest, pertain to numerical and non numerical research methods and techniques, respectively. Thanks.
    Regards,
    irenew

    jaffa had this to say on Sep 28, 2011 Posts: 9
  • Nice Post amazing information and attractive, I like your way of thinking keep on sharing good things to your friends.


    the best seo company

    Muhammad Alaxander had this to say on Oct 05, 2011 Posts: 4
  • Page 1 of 2 pages  1 2 >
You need log in, or register, in order to comment