Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 17, 2013, 12:10 PM   #1
Ri-dog
macrumors newbie
 
Join Date: Jan 2013
Location: Healy, AK
A little problem: Need to bypass shutdown script

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
Ri-dog is offline   1 Reply With Quote
Old Jan 17, 2013, 12:40 PM   #2
r0k
macrumors 68040
 
r0k's Avatar
 
Join Date: Mar 2008
Location: Detroit
Quote:
Originally Posted by Ri-dog View Post
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.
__________________
-r0k
Macbook Pro (late 2011) iPad mini iPhone5
Got a scan to ftp scanner? Enable ftpd in Mavericks!
r0k is offline   2 Reply With Quote
Old Jan 17, 2013, 12:43 PM   #3
Comeagain?
macrumors Demi-God
 
Comeagain?'s Avatar
 
Join Date: Feb 2011
Location: Spokane, WA
Send a message via Skype™ to Comeagain?
Quote:
Originally Posted by r0k View Post
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.
__________________
Questions? MRoogle it!
I support the MacRumors Blood Drive!
MR Scavenger Score: 1
Comeagain? is offline   0 Reply With Quote
Old Jan 17, 2013, 12:58 PM   #4
aarond12
macrumors 6502a
 
aarond12's Avatar
 
Join Date: May 2002
Location: 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.
__________________
Voted "Most likely to start his own cult" by my high school class.
aarond12 is offline   1 Reply With Quote
Old Jan 17, 2013, 08:40 PM   #5
Ri-dog
Thread Starter
macrumors newbie
 
Join Date: Jan 2013
Location: 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
Ri-dog is offline   0 Reply With Quote
Old Jan 18, 2013, 08:21 AM   #6
r0k
macrumors 68040
 
r0k's Avatar
 
Join Date: Mar 2008
Location: Detroit
Quote:
Originally Posted by Ri-dog View Post
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.
__________________
-r0k
Macbook Pro (late 2011) iPad mini iPhone5
Got a scan to ftp scanner? Enable ftpd in Mavericks!
r0k is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:27 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC