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 07-30-2008, 06:24 PM
Livin the iPhone Life
 
Join Date: Dec 2007
Posts: 1,444
Thanks: 15
Thanked 183 Times in 174 Posts
Autostart / launchd

hi there,
I'm currently facing a problem with my iPhone I just can't solve myself ....

It's actually pretty simple: I wanted Insomnia to autostart when my iPhone boots, so I don't have to manually switch it on (which I forget most times ). So I read it up and found out that on Mac OSX "launchd" is responsible for autostarting programs.
So what I did:
I put a file called com.imalc.insomnia.plist in /System/Library/LaunchDaemons/. The content of the file is:

Quote:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.imalc.insomnia</string>
<key>Program</key>
<string>/private/var/stash/Applications.xAdcpH/Insomnia.app/Insomnia</string>
<key>UserName</key>
<string>mobile</string>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>OnDemand</key>
<false/>
</dict>
</plist>
(I also tried some variations of the above)

and then I executed
launchctl load /System/Library/LaunchDaemons/com.imalc.insomnia.plist
which seems to have worked, because when I execute it again it says "already loaded".

Problem: It just doesn't work. Insomnia does not get executed at startup.
Any ideas why or how to do this?

thanks

Last edited by BlackWolf; 07-31-2008 at 05:16 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to BlackWolf For This Useful Post:
jakecigar (07-30-2008)
  #2  
Old 07-30-2008, 08:17 PM
jakecigar's Avatar
iPhoneaholic
 
Join Date: Aug 2007
Device + Firmware: 2 x 3G iPhone 2.2, pwned
Operating System: OS X 10.5.6
Location: San Francisco, CA
Posts: 475
Thanks: 24
Thanked 108 Times in 93 Posts
Send a message via AIM to jakecigar Send a message via Yahoo to jakecigar Send a message via Skype™ to jakecigar

thanks! I haven't needed to know this (YET)... but it's good to know.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 07-31-2008, 05:17 AM
Livin the iPhone Life
 
Join Date: Dec 2007
Posts: 1,444
Thanks: 15
Thanked 183 Times in 174 Posts

well ... seems I was wrong. I worked once yesterday but doesn't work anymore now (or I imagined it yesterday, I have no idea).
this is really driving me nuts ... my .plist file seems to work perfectly and when I type
launchctl start com.imalc.insomnia
insomnia starts fine. It just doesn't autostart when the iphone boots and I have no idea why.

So I'm still open to suggestions and stuff ^^ I really want this to work

Last edited by BlackWolf; 07-31-2008 at 05:47 AM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 08-16-2008, 10:07 AM
What's Jailbreak?
 
Join Date: Dec 2007
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post

Hi BlackWolf

Did you get it to work?
I need the same as you. :-)
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5  
Old 08-16-2008, 10:44 AM
Livin the iPhone Life
 
Join Date: Dec 2007
Posts: 1,444
Thanks: 15
Thanked 183 Times in 174 Posts

not really. I got the wiki2touch server to autostart which worked fine, so I guess the problem is that insomnia does not qualify as a "daemon" and therefore cannot be autostarted (wiki2touch server was a daemon and autostarted fine). But I didn't really find any solution on how to autostart normal apps ... still hoping someone will help me, because I would really like to kick insomnia from my homescreen and just have it run in the background all the time.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6  
Old 11-09-2008, 02:50 AM
What's Jailbreak?
 
Join Date: Aug 2007
Location: Southfield, MI
Posts: 23
Thanks: 2
Thanked 0 Times in 0 Posts

Any resolution on this? I am trying to do the same with NemusSync
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #7  
Old 07-09-2009, 10:39 AM
What's Jailbreak?
 
Join Date: Jul 2009
Posts: 29
Thanks: 8
Thanked 2 Times in 2 Posts

resolved? I have a basic mobileterminal.app command that I want to add to the startup of the iphone, does anyone know if I have to do this through the terminal or can it be added like "do shell script" to this file?

Please see my post "Control Your iPhone from Anywhere via SSH/VNC", it should change everything you think about 3G network firewalls:

http://www.modmyi.com/forums/iphone-...ml#post4787221
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 05:54 PM. 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 / / Top