How can I get a popup message to appear whenever someone logs in?

Discussion in 'Mac Apps and Mac App Store' started by Shrike, Mar 26, 2004.

  1. Shrike macrumors newbie

    Mar 26, 2004
    I work in a computer lab on a college campus, and I need the computer to show a popup window with a message of my choice whenever any user logs on. Nothing fancy, simple text would be fine. I'm running OS X on a G5. Also, I'm not really experienced on Macs (sorry!), so if you could keep the explanations as simple as possible, I would really appreciate it.
    Thanks in advance!
  2. wrldwzrd89 macrumors G5


    Jun 6, 2003
    Solon, OH
    I found this PDF that may be of use. However, I couldn't find a login message capability for Mac OS X users, only Mac OS 9 via Macintosh Manager. If you don't use Mac OS X Server in your lab, then disregard the PDF link (it will be of no use to you in that case).
  3. Shrike thread starter macrumors newbie

    Mar 26, 2004
    Unfortunately we aren't running Mac OS X Server, but thanks for the reply!
  4. SpaceMagic macrumors 68000


    Oct 26, 2003
    Cardiff, Wales
    Interesting... here is a way I've just made up so if it doesn't work then sorry:

    1) Open Script Editor in your Applications/AppleScript Folder
    2) You are faced with an empty two-text-box-window...
    3) Write in the TOP text box (the bigger box), I say this because mine reverts to the bottom one, where script cannot be entered.

    4) type display dialog "hello" replacing the "hello" with what you want to be said, for example "you smell"

    5) Run program, see if it works
    6) File -> Save AS
    7) Save whereever you like, just as in Word or any other program, remember where you've saved it. Change file format to Application and click RUN ONLY not startup screen.

    8) Your done...
    9) Open System Prefs (Apple Menu or your dock)
    10) Click Accounts
    11) Click on the account which you want the message to pop up on
    12) Click "Startup Items" tab
    13) DRAG the script file you made into that window
    14) Make sure "hide" isn't checked

    15) Your done :)

    Hope this has helped
  5. Shrike thread starter macrumors newbie

    Mar 26, 2004
    Works like a charm, and I am using your solution right now, but I am wondering if there is a way to make this apply to all users? That would be very helpful in the future.
    Thanks again!
  6. SpaceMagic macrumors 68000


    Oct 26, 2003
    Cardiff, Wales
    You could manually drag this script into everyone's "startup" items. But yes, that's time consuming. There is a folder in the Main hard disk's Library called 'startup' items. This way, I think it'll run everytime and for everyone. However, I haven't tried this but there is nothing stopping you. If your computer doesn't start up hold down "shift" when booting (and it'll disable the startup things then you can delete it).
  7. HexMonkey Administrator


    Staff Member

    Feb 5, 2004
    New Zealand
    I don't have that folder in any of my Libraries, and creating it didn't work (EDIT: Found it now, but it's in System which should generally never be modified). The file that contains each user's startup items is located at ~/Library/Preferences/loginwindow.plist. The only other thing in this file is version information, so it's safe to copy. I tried putting it in the root Library but it wasn't recognized. So the only way to get it working (that I know of) is to copy the file to every user's preferences folder. Unfortunately permissions prevent this from being done quickly. Maybe some Terminal commands would speed up the process.
  8. Sayer macrumors 6502a


    Jan 4, 2002
    Austin, TX
    Don't put things in StartupItems, that is for housekeeping and system configuration scripts needed by Mac OS X that only run during the boot process.

    Also since only Admin users can set startup items, if you make an AppleScript application that is editable as a startup item you may create a security hole.

    Save the AppleScript application as Run-only always.

    If you wanted to show the user's account name as part of the AppleScript without having to make separate apps for each user try using the "MacPack Toolbox" Scripting Addition (free):

    It is a bit more involved, you have to place the Scripting Addition component into a folder that probably hasn't been created yet (in /Library/ScriptingAdditions so all user's AppleScript app can access it) in Mac OS X. There are instructions with the file.

    Then simply make the line in the script similar to:

    display dialog "Welcome " & MP Long User Name & " to the lab." as string

    Obviously make it however you want, there are other options as part of "MacPack Toolbox" including getting the computer's network/Rendezvous name, custom date formatting and simply text find/replace.

    This will work on OS X 10.1, 10.2, 10.3 (I just tried it on 10.3.3).

Share This Page