Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add a text message to the login window System
I attended a seminar today at Apple on integrating Mac OS X into a Windows network environment, and although much of the information was not new to me, one little snippet caught my attention, as we have been wanting to do this at work for a while.

To add a banner text message to the login window, edit the file /Library -> Preferences -> com.apple.loginwindow.plist as a superuser, and add the following just after the first <dict> tag:
<key>LoginwindowText</key>
<string>Your text goes here...</string>
When you log out, the text inside the section will be displayed under the Mac OS X logo, in a box the width of the login window. This is good for adding a standard notice about workplace or campus rules for computer usage.

[Editor's note: This works as described ... very cool!]


Panther proven!

    •    
  • Currently 2.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[80,083 views]  

Add a text message to the login window | 30 comments | Create New Account
Click here to return to the 'Add a text message to the login window' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Two Words
Authored by: zdweeb on Sep 21, '02 11:27:06AM
Butt Ugly!

[ Reply to This | # ]
but functional...
Authored by: robg on Sep 21, '02 11:37:43AM

A warning message about system usage prior to login was required at one of my previous employers; without the ugly text box, I'm not sure how I would have been able to use OS X at that office. So I consider the text box a BUBU feature .... Bloody Ugly But Useful!

-rob.



[ Reply to This | # ]
but functional...
Authored by: kaboom on Sep 21, '02 11:40:13AM

It really is ugly! Wow!
The least they could do is make the text centered.



[ Reply to This | # ]
Formating?
Authored by: Chummer- on Sep 22, '02 02:42:43AM

Does anyone know how to format this? Id love to have a startup message containing owner contact information but as stated rather eloquently in other posts, it is an eye-sore.

Does anyone know how to format the text?

Thanks



[ Reply to This | # ]
but functional...
Authored by: Chiwo on May 11, '05 12:47:03AM
It is centered on Mac OS X 10.4 (Tiger).

[ Reply to This | # ]
Where's the . . . How did you . . . &c.
Authored by: VassilyDolgoruki on Aug 30, '05 12:06:49PM
In OS 10.4.2, the contents of the file /Library/Preferences/com.apple.loginwindow.plist are very few: a string of about 100 characters without tags. In particular, there is no key after which to insert:
<key>LoginwindowText</key>
<string>Your text goes here...</string>
Have I missed some symbolic links, or what?

[ Reply to This | # ]
Where's the . . . How did you . . . &c.
Authored by: VassilyDolgoruki on Aug 30, '05 12:14:20PM
That should have read "no
 <dict> 
key" Sorry.

---
VassilyDolgoruki


[ Reply to This | # ]

Replace the Login Screen
Authored by: mr5m on Sep 22, '02 07:17:49AM

If the text is really ugly, why not just break out Photoshop and replace the login screen altogether?

http://www.resexcellence.com/hack_html_00/10-02-00.shtml



[ Reply to This | # ]
Not ugly
Authored by: Chris Haynes on Sep 22, '02 07:52:27AM

I don't think it's ugly. The text is antialiased (which is more than you get on Windows) and you don't have to click an OK button to dismiss it (like Windows). Okay, it could maybe be centered, but I just put a few spaces at the beginning of the string and it balanced it out okay.

I like it. Of course, it would be better if your computer name remained on the panel... They shouldn't be mutually-exclusive!



[ Reply to This | # ]
Not ugly
Authored by: Code Masseur on Apr 18, '05 12:32:59PM

Does anyone know how to get the text to center? Trying to embed HTML tags disables the text message from displaying.

BTW, this customizable text area is helpful for putting a REWARD IF FOUND notice.



[ Reply to This | # ]
Adding Text Message
Authored by: Ezra Balaraj on Sep 22, '02 01:22:14PM

It most certainly works! I wish I knew how long the string should be. In my case I put in the msg."Imac G4 Superdrive". It appeared on the left most part of the login window.



[ Reply to This | # ]
Adding Text Message
Authored by: mccartyg on Feb 20, '03 01:32:18PM

I tried this several times while running OS X 10.2.4 and could not get
the changes in the .plist document to save. I ended up booting into Mac
OS 9.2.1 and typing the text into a Simpletext document, saving the file
as the prescribed filename which needed to be edited
(com.apple.loginwindow.plist). I then copied the new file into the
Library/Preference folder, replacing the old file. When I rebooted, I saw
the text added to the Login Window.
I added a long disclaimer which even required the system to include a
scroll bar on the screen, so lenght of the text does not seem to matter
very much.
Jerry



[ Reply to This | # ]
Adding Text Message
Authored by: dontlikehippies on Aug 21, '04 02:32:25AM

the problems you had saving may have been caused by insufficient permissions. try using terminal and sudo your way in with your favorite editor. (if anyone's lost, type "sudo pico " and drag the plist onto the terminal window)



[ Reply to This | # ]
Didn't work
Authored by: pdxguy on Sep 25, '02 05:01:23AM

Is this 10.2 specific? I tried it with 10.1.5 and didn't see a thing. Did several login/logout, even restarts just to make sure.



[ Reply to This | # ]
Alternative Method
Authored by: keaka on Sep 25, '02 06:43:47AM

This hint didn't work for me (running 10.2.1). However, if you are familiar with Apple's free Interface Builder, you can get a similar result by modifying the loginwindow nib directly.
Login as root and open the following nib file in Interface Builder:
/System/Library/CoreServices/SecurityAgentPlugins/loginwindow.bundle/Contents/Resources/English.lproj/login.nib
Now put a text field below the hostname field, and add any message you desire. With this method, you can easily center the text using Interface Builder's alignment features, and the hostname and your text message don't need to be mutually exclusive!

If English isn't your primary language on your Mac, you will need to look in your language specific directory instead of 'English.lproj' as indicated above. Also, if you have selected to have your login window display a list of users instead of the name and password fields, you will need to edit MultipleUsers.nib instead of login.nib as indicated above. As always, BACKUP the original nib file before making any modifications. Note that you can mess with other pieces of the login panel too (such as the images), although the program Visage makes that a lot easier (blatant plug by developer).

-Keaka



[ Reply to This | # ]
Correction -- it does work!
Authored by: keaka on Sep 25, '02 07:34:51AM

I was wrong in my earlier post, this hint does work for me. I hadn't read the hint carefully enough, and I edited loginwindow.plist instead of com.apple.loginwindow.plist in the same directory. If anybody else is having problems, you might want to see if you made the same mistake!



[ Reply to This | # ]
Add a text message to the login window
Authored by: mlenny on Mar 13, '03 05:00:51AM

This foxed me for about 30 minutes - wouldn't work at all.

Then inspiration struck and I tried the <key> entry with an uppercase 'L' (i.e. "LoginwindowText" as opposed to "loginwindowText" as appears in the hint) and it works!

Just in case you're scratching your head - try this.



[ Reply to This | # ]
Add a text message to the login window
Authored by: FlashBIOS on Oct 27, '03 04:26:40PM

I just tested this out in Panther, works like a charm.



[ Reply to This | # ]
Add a text message to the login window
Authored by: encro on Nov 14, '03 09:40:43AM
I can't seem to get this to work on Panther but was able to using Jaguar. Now I can't remember how I did it back in the day... was it:

sudo pico /Library/Preferences/com.apple.loginwindow.plist 
and then editing the contents to:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple$
<plist version="1.0">
<dict>
        <key>noPasswordKey</key>
        <false/>
        LoginwindowText
        This computer was brought to you by the letter A and the number 1
</dict>
</plist>
hmm no, all it does is 10.3 resets the file to the original when I switch to the login panel with FUS. Even adding it in using and tags doesn't seem to work either... What am I doing wrong?

[ Reply to This | # ]
Add a text message to the login window
Authored by: jakacmar on Dec 09, '03 05:07:57PM
To clarify how this works (in Panther anyway, but I'm assuming this is true for Jaguar as well). Open the file (you'll most likely need to use sudo if you're planning on saving your changes) using your favorite command-line text editor. Then you need to add the lines:
<key>LoginwindowText</key>
<string>Whatever Text You Want Displayed</string>
right below the
<dict>
toward the top of the file. Then just save it and it should work. Hope this helps some people out.

[ Reply to This | # ]
Add a text message to the login window
Authored by: jiclark on Sep 20, '06 12:32:25PM

This does indeed work very well in Tiger. My only question:

Is there a way to insert returns into the text string? I have almost no experience with this sort of psuedo-programming stuff, but I assume there might even be a character that causes a return in the formatting. My goal is, like many others I assume, to have a bit of text offering a reward for return of my laptop if found, and I'd love for the name and address to have standard formatting:

name
address
city, state, zip
phone

I'll play around with it while waiting for a response, but please, chime in if you have any thoughts.

Thanks,
John



[ Reply to This | # ]
Add a text message to the login window
Authored by: jiclark on Sep 20, '06 10:18:23PM

Sorry, I don't know how this comment got posted three times! The site was pretty wonky this afternoon...

If only there were a way to delete posts ourselves! Rob??

;-}



[ Reply to This | # ]
Add a text message to the login window
Authored by: p0pper on Jul 09, '10 02:39:51PM
this is very old, but i just found out how to put in line breaks after unintentionally corrupting my plist in snow leopard. here's what you have to do:

open the plist file with Property List Editor as root (either use Pseudo.app or launch it with
 sudo /Developer/Applications/Utilities/Property\ List\ Editor.app/Contents/MacOS/Property\ List\ Editor 
) and re-save the plist as either text or xml (it's binary by default since leopard or tiger). then enter your string as documented in the hint without line breaks.

then, using a hex editor such as HexEdit (as root, the same way as above), open your now non-binary plist and insert, into the hex code of the file, the sequence "0A" wherever you want a line break (without the quotes, obviously). that's a zero, not an "o".

you may have to resave your plist as a binary (i did) to make it work, but i'm not sure.
---
::::::::::::::::::::::::::::::::::::::
Decay heat is not ordered information.
-Patrick Lui (SLAC)
::::::::::::::::::::::::::::::::::::::


[ Reply to This | # ]
Add a text message to the login window
Authored by: jiclark on Sep 20, '06 12:34:23PM

This does indeed work very well in Tiger. My only question:

Is there a way to insert returns into the text string? I have almost no experience with this sort of psuedo-programming stuff, but I assume there might even be a character that causes a return in the formatting. My goal is, like many others I assume, to have a bit of text offering a reward for return of my laptop if found, and I'd love for the name and address to have standard formatting:

name
address
city, state, zip
phone

I'll play around with it while waiting for a response, but please, chime in if you have any thoughts.

Thanks,
John



[ Reply to This | # ]
Add a text message to the login window
Authored by: jiclark on Sep 20, '06 12:34:24PM

This does indeed work very well in Tiger. My only question:

Is there a way to insert returns into the text string? I have almost no experience with this sort of psuedo-programming stuff, but I assume there might even be a character that causes a return in the formatting. My goal is, like many others I assume, to have a bit of text offering a reward for return of my laptop if found, and I'd love for the name and address to have standard formatting:

name
address
city, state, zip
phone

I'll play around with it while waiting for a response, but please, chime in if you have any thoughts.

Thanks,
John



[ Reply to This | # ]
Add a text message to the login window
Authored by: dhanson on Nov 01, '06 04:56:10PM

I used Interface Builder to put my info directly the Sleep, Restart, Shutdown buttons. I couldn't figure out how to input a return, so I used 5 seperate text fields to input the info. Took a bit pf playing around to get it the way I wanted, but it's done now. First, I made a new textfield, went to tools to show inspector. Under title, I input the info. Then, drag into position. Did copy, paste to get the next line, changed the info in title and so on.



[ Reply to This | # ]
Add a text message to the login window
Authored by: paulpro on Apr 07, '07 11:01:30AM

Working in 10.4.8.

Still haven't figured out a way to add line breaks.

My text:
"♬♪♩♫ This is a computer. You must authenticate if you wish to proceed. All actions will be logged. Do not drool, vomit, or otherwise expectorate on the computer. Do not submerge the computer in water. You will fail. Do not eat. Do not want. ♬♪♩♫"

Short enough to not require a scrolling text box.



[ Reply to This | # ]
Add a text message to the login window
Authored by: mynous on Aug 15, '07 06:35:58PM

I may be dense but using 10.4.10 when i pico /Library/Preferences/com.apple.loginwindow.plist all that is in the file is
"bplist00?^A^B^C^D^E^F^G^H]showInputMenu\lastUserName_^P^PRetriesUntilHintXlastU$"



[ Reply to This | # ]
Add a text message to the login window
Authored by: bstone on Aug 22, '07 07:08:07AM

Agreed. This simply doesn't work on 10.4.10. I get the same sort of text above. When I went to a machine that does have the custom login screen and copied the plist onto a 10.4.10 machine, it not only didn't give a custom message but it forced log in from entering username and password to showing you a list of users.

I don't know if it has anything to do with the fact that my Macs here are on both OD and AD. WOuld sure be nice if this worked.



[ Reply to This | # ]
Add a text message to the login window
Authored by: syzygies on Jan 18, '08 08:23:01AM
The best way to edit system property lists is using the 'defaults' command. This is scriptable. I want a message in case my MacBook gets separated from me at airport security, and a per-system identifier to diagnose restart issues, so I use the script

#!/bin/bash

plist="Library/Preferences/com.apple.loginwindow"
key="LoginwindowText"
text="(me, me@dot.org, +1 xxx-xxx-xxxx)"

defaults write /$plist $key "'OSX $text'"
defaults write /Volumes/OSX2/$plist $key "'OSX2 $text'"
defaults write /Volumes/OSX3/$plist $key "'OSX3 $text'"
defaults write /Volumes/iOSX/$plist $key "'iOSX $text'"

defaults read /$plist
defaults read /Volumes/OSX2/$plist
defaults read /Volumes/OSX3/$plist
defaults read /Volumes/iOSX/$plist
One must run this script using the 'sudo' command. The quoting is subtle here; don't mess with it unless you understand it.

[ Reply to This | # ]