The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone Modding > File Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-24-2008, 10:19 AM
What's Jailbreak?
 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Startup Script

Hey all,
I am not all that familiar with the launch process of OS X, and namely the iPhone. I am trying to get a script, or alternatively a command, executed ONLY at startup. Here is the problem I am solving:

SpringBoard crashes on me after boot where the touchpad I/O stops working inside any application. The solution to my problem is to SSH in, run a `ps -A`, and kill -9 <process of SpringBoard> So I wrote a script to do the same thing (or a simple `killall SpringBoard` that runs *once* at boot is also sufficient). Cron jobs are not sufficent because if I need to restart my phone at any time of day, well cron jobs are useless and I don't want springboard restarting every 2 min, for example.

So, I am trying to figure out how to use launchd or launchctl to do this (I'm assuming this is my best bet). Any ideas?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 07-19-2008, 04:38 AM
What's Jailbreak?
 
Join Date: Jul 2008
Device + Firmware: iPhone 3g 3.0 Jailbroken
Operating System: Mac OS X
Posts: 5
Thanks: 0
Thanked 3 Times in 3 Posts

Bump
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 07-24-2008, 12:28 PM
What's Jailbreak?
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
touch boot

One thing I found interesting was that the boot scripts of the iPhone and Touch are identical, and thus when starting a Touch in verbose you notice several iPhone-only processes starting and subsequently failing because they require iPhone-only software. :-) sorry I couldnt be of more help!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 07-24-2008, 12:48 PM
Livin the iPhone Life
 
Join Date: Dec 2007
Posts: 1,440
Thanks: 15
Thanked 182 Times in 173 Posts

well, I looked it up once and the startup scripts are in some way related to /System/Library/LaunchDaemon/ ... the .plist files in there represent an application to be executed at startup. I tried adding an application by myself once but although I thought I did everything right it never worked. But you have to look there ...
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5  
Old 12-31-2008, 12:43 PM
What's Jailbreak?
 
Join Date: Jul 2008
Device + Firmware: iPhone 3g 3.0 Jailbroken
Operating System: Mac OS X
Posts: 5
Thanks: 0
Thanked 3 Times in 3 Posts

Quote:
Originally Posted by BlackWolf View Post
well, I looked it up once and the startup scripts are in some way related to /System/Library/LaunchDaemon/ ... the .plist files in there represent an application to be executed at startup. I tried adding an application by myself once but although I thought I did everything right it never worked. But you have to look there ...
There is a solution to this - take a look at this article.

So basically, you write the script, create a launchd plist config file, add the file to /Library/LaunchDaemons and then load the file using

Code:
launchctl load /Library/LaunchDaemons/tld.domain.subdomain.plist
I have an example of a DynDNS updater script on my website that uses this method.

-Egeste
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6  
Old 07-23-2009, 12:16 PM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 29
Thanks: 8
Thanked 2 Times in 2 Posts
i need help!!

i just need to add a command/script to iphone's startup, please, i have read through your links, and they all seem to be too in-depth for me implement such a simple command (terminal or not)...

HELP!!! here are the links describing how to control your iPhone no matter where it goes.. all i need is to add it to startup!!!

http://www.modmyi.com/forums/iphone-...ml#post4787221

Control your iPhone from ANYWHERE it goes - Mac... Control your iPhone from ANYWHERE it goes - Mac...
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #7  
Old 07-23-2009, 01:15 PM
What's Jailbreak?
 
Join Date: Jul 2008
Device + Firmware: iPhone 3g 3.0 Jailbroken
Operating System: Mac OS X
Posts: 5
Thanks: 0
Thanked 3 Times in 3 Posts

Quote:
Originally Posted by michaelwithe21 View Post
i just need to add a command/script to iphone's startup, please, i have read through your links, and they all seem to be too in-depth for me implement such a simple command (terminal or not)...

HELP!!! here are the links describing how to control your iPhone no matter where it goes.. all i need is to add it to startup!!!

http://www.modmyi.com/forums/iphone-...ml#post4787221

Control your iPhone from ANYWHERE it goes - Mac Forums
michaelwithe21,
launchd is well documented on the net as it is an open source project developed by Apple, and you can find a plethora of information by google-ing launchd tutorial or similar.

That being said, i think you will find this link particularly useful.

Also, check out the manpage for launchd and launchctl

-Egeste
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to Egeste For This Useful Post:
michaelwithe21 (07-23-2009)
  #8  
Old 07-23-2009, 01:24 PM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 29
Thanks: 8
Thanked 2 Times in 2 Posts

thanks man, the only reason I dont want to read-through all of this junk is because Im sure that someone els has already added a terminal command to launchd... im sure its really easy to figure out.. but I really dont have the know-how to figure it out...

so any help for a lazy guy with a GREAT idea to be able to control your iphone no matter what network it goes onto... this could be made into an app if stable... so please, if you know of any specific tutorials that would show me what script to edit and where to add the command, i would greatly appreciate it!

Update:

hey, just found this junk:

http://ask.metafilter.com/78590/How-...art-up-in-OS-X

which led me to this app which can create deamon/launchd files... still have no clue how to use it.. im not familiar enough with it... im stupid

http://tuppis.com/lingon/

above is where u can download it, its called Lingon

im gunna keep going through it and post a snapshot

Last edited by michaelwithe21; 07-23-2009 at 01:33 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #9  
Old 07-23-2009, 01:37 PM
What's Jailbreak?
 
Join Date: Jul 2008
Device + Firmware: iPhone 3g 3.0 Jailbroken
Operating System: Mac OS X
Posts: 5
Thanks: 0
Thanked 3 Times in 3 Posts

Quote:
Originally Posted by michaelwithe21 View Post
thanks man, the only reason I dont want to read-through all of this junk is because Im sure that someone els has already added a terminal command to launchd... im sure its really easy to figure out.. but I really dont have the know-how to figure it out...

so any help for a lazy guy with a GREAT idea to be able to control your iphone no matter what network it goes onto... this could be made into an app if stable... so please, if you know of any specific tutorials that would show me what script to edit and where to add the command, i would greatly appreciate it!

Update:

hey, just found this junk:

How do I execute this command at start up in OS X? | Ask Metafilter

which led me to this app which can create deamon/launchd files... still have no clue how to use it.. im not familiar enough with it... im stupid

Tuppis - Lingon by Peter Borg

above is where u can download it, its called Lingon

im gunna keep going through it and post a snapshot
You're not stupid, you're just inexperienced. Once you figure out how launchd works you'll find yourself answering questions from people just like you who are simply inexperienced

Don't be lazy though, and don't be afraid to RTFManpage. The developers wrote those for you.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to Egeste For This Useful Post:
michaelwithe21 (07-23-2009)
  #10  
Old 07-23-2009, 01:40 PM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 29
Thanks: 8
Thanked 2 Times in 2 Posts

Click the image to open in full size.

Click the image to open in full size.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #11  
Old 07-23-2009, 01:47 PM
What's Jailbreak?
 
Join Date: Jul 2008
Device + Firmware: iPhone 3g 3.0 Jailbroken
Operating System: Mac OS X
Posts: 5
Thanks: 0
Thanked 3 Times in 3 Posts

Apple supplies a plist editor as part of their xcode suite (not sure if it's included in macos by default) but it is located at "/Developer/Applications/Utilities/Property List Editor.app"
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to Egeste For This Useful Post:
michaelwithe21 (07-23-2009)
  #12  
Old 07-23-2009, 01:54 PM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 29
Thanks: 8
Thanked 2 Times in 2 Posts

lol, your words do not comfort me =P... i know very little about scripts in general... the most ive ever used is "do shell script" as can be seen on my "virus" or vulnerability that i wrote here:

Just an Idea - TSF - Mac Security Forums

but, hopefully your right, and i will do some digging within property list editor.app and launchd... but please, if you have any quick jump methods for me to just implicate a simple SSH/CLI/Terminal command, point me there =P
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone Modding > File Mods

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 11:28 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top