login script question

Discussion in 'macOS' started by Madvillain, Nov 2, 2011.

  1. Madvillain Guest

    Jan 15, 2008
    I had an applescript on my old MacBook that basically looked to see if my MacBook was plugged into an external display upon startup. It would then open certain apps if it was, and others if it was not (basically a home and an away startup).

    Could something like this be easily done to bypass the login screen? It would be nice to tell the MacBook to start without the login prompt if it's plugged into my Apple Cinema Display, and to ask for the login password if it's not. No, I am not worried about somebody stealing my MacBook and plugging it into a display to bypass this. :)

    Any ideas?
  2. r0k macrumors 68040


    Mar 3, 2008
    I.m not saying this is possible but it is likely only possible if you put your password in the Applescript as plain text. Are you sure you would want to do this? Having your password in a plain text file is not much different than having auto login enabled.

    I have my auto logout set to something like 90 minutes. My screen saver comes on after only 15 minutes and my display turns off after about half an hour. But jiggling the mouse gets me right to my desktop if I've been gone less than 90 minutes. This doesn't help you with your initial login but perhaps this can reduce the number of times you have to log in whether your external monitor is plugged in or not?

    Another thought occurs to me. How about an Applescript that calls system preferences and disables auto login? When you unplug your external monitor, the applescript runs and the next login will not be automatic. When you return to your desktop, the first login will require a password, but you could add a second applescript to clear the login (if external monitor is plugged in) to your login items and subsequent logins would be automatic, until the next time you unplug your external monitor. I'm pretty sure you will have to enter your password for either of these two applescripts to make any changes, so again if you are looking for a way to stop entering your password, though I don't recommend it, auto login is probably best.
  3. Madvillain thread starter Guest

    Jan 15, 2008
    Thanks for the response.
    I think I'll take your advice and take the oh-so-painful two seconds that it takes to log in and not risk it. :)

    Good idea.

Share This Page