A little problem: Need to bypass shutdown script

Discussion in 'Mac Basics and Help' started by Ri-dog, Jan 17, 2013.

  1. macrumors newbie

    Joined:
    Jan 17, 2013
    Location:
    Healy, AK
    #1
    Hi,

    I've been experimenting with creating an executable file on my mac that can instantly shutdown my computer, the code is as follows:

    Code:
    #!/bin/sh
    osascript -e 'tell application "System Events" to shut down'
    
    So, I made the file, and through an unfortunate series of events, this new shutdown file got put in my login items (the apps that launch when you login to your computer). So, as soon as I login, my computer will shutdown.

    Is there anyway to disable the app so I can use my laptop again? Thanks!

    - Ridog
     
  2. r0k
    macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #2

    I believe there is a way to start OS X in a safe mode that bypasses your login items. You can then delete the offending file. Starting with 10.4 it involved holding shift while you boot. I don't know whether this still works in ML but I assume it still works.
     
  3. macrumors 68020

    Comeagain?

    Joined:
    Feb 17, 2011
    Location:
    Spokane, WA
    #3
    Yes, there still is Safe Boot in ML.
     
  4. macrumors 65816

    aarond12

    Joined:
    May 20, 2002
    Location:
    Dallas, TX USA
    #4
    If that doesn't work, start up with COMMAND-S held down. This goes into Single User mode. Use this ONLY if you're familiar with command-line UNIX. Seriously.
     
  5. thread starter macrumors newbie

    Joined:
    Jan 17, 2013
    Location:
    Healy, AK
    #5
    Thanks

    Thanks for all your quick replies!

    Safe Boot worked great!!! I was able to get rid of the offending file.:)

    Thanks again!!

    - Ridog
     
  6. r0k
    macrumors 68040

    r0k

    Joined:
    Mar 3, 2008
    Location:
    Detroit
    #6
    Glad to hear you got it sorted.

    Note to self: Never put any development software or script in my login items. :eek:
     

Share This Page