Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ri-dog

macrumors newbie
Original poster
Jan 17, 2013
7
0
Healy, AK
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
 

r0k

macrumors 68040
Mar 3, 2008
3,611
75
Detroit
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


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.
 

Comeagain?

macrumors 68020
Feb 17, 2011
2,190
46
Spokane, WA
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.

Yes, there still is Safe Boot in ML.
 

aarond12

macrumors 65816
May 20, 2002
1,145
107
Dallas, TX USA
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.
 

Ri-dog

macrumors newbie
Original poster
Jan 17, 2013
7
0
Healy, AK
Thanks

Thanks for all your quick replies!

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

Thanks again!!

- Ridog
 

r0k

macrumors 68040
Mar 3, 2008
3,611
75
Detroit
Thanks for all your quick replies!

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

Thanks again!!

- Ridog

Glad to hear you got it sorted.

Note to self: Never put any development software or script in my login items. :eek:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.