Run a script at the Login Screen?

Discussion in 'General Mac Discussion' started by yakisoba, Sep 3, 2004.

  1. yakisoba macrumors member

    Joined:
    Jul 1, 2004
    #1
    Hey, all.

    I wrote a script that greets me with the time using Text to Speech when I log in to my Powerbook. I'd like to also have a script that recites the warning/login banner I have on my Login screen using Text to Speech. Is there an equivalent to rc.d, rc.init, rc.local, etc. on OS X that I could use to accomplish that?

    Thanks.
     
  2. stoid macrumors 601

    stoid

    Joined:
    Feb 17, 2002
    Location:
    So long, and thanks for all the fish!
    #2
    Can't you just put the script in Log-in items in the Accounts panel of System Prefs?
     
  3. yakisoba thread starter macrumors member

    Joined:
    Jul 1, 2004
    #3
    No, because those scripts only run *after* you successfully log in (which is why they are under "Accounts," I suppose, since you can customize them for each user's successful login). That's where I put my script for greeting you with the time. I want to run a script at the login screen *before* you login to the machine.
     
  4. stoid macrumors 601

    stoid

    Joined:
    Feb 17, 2002
    Location:
    So long, and thanks for all the fish!
    #4
    That seems like it would require a rewrite to the log-in program. I don't think that it would be possible to run the script at that point any other way. Sorry.
     
  5. yakisoba thread starter macrumors member

    Joined:
    Jul 1, 2004
    #5
    Really? Since OS X is Unix, I tend to think "there must be a way". In other flavors of Unix, I'd hunt down scripts in /etc/rc.d or /etc/rc.init, and so on. On OS X I see /etc/rc, /etc/rc.boot, /etc/rc.common, and so on. I'n new to OS X, so I don't want to start mucking with editing those files until I understand in what order they are executed, and where I need to insert a call to my user script (and for that matter, whether I can call the Text to Speech, or even AppleScript functionality that early in the process before a user has logged into "user space". I imagine I'd have to make the script a SUID or GUID root, etc.....
     

Share This Page