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 + (GS4 for work)
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 68020
 
Comeagain?'s Avatar
 
Join Date: Feb 2011
Location: Spokane, WA
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!
Current iOS 8 "All the little things!"
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 + (GS4 for work)
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

Similar Threads
thread Thread Starter Forum Replies Last Post
iMac mid 2011 - script for HDD shutdown at startup? drtome iMac 0 Dec 22, 2013 07:19 AM
MBPr13" Shutdown Problem nightlong MacBook Pro 1 Dec 21, 2013 11:11 PM
Exhaust Fan Sensor Broken / Bypass Script hadbav MacBook Pro 1 Sep 5, 2013 12:16 AM
Problem with shutdown hmadacompaq MacBook Pro 4 Apr 27, 2013 07:45 PM

Forum Jump

All times are GMT -5. The time now is 06:42 AM.

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

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