+ Reply
Results 1 to 8 of 8

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Autostart / launchd

is a discussion within the

File Mods

forums, a part of the

iPhone Modding

section;
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
...
  1. #1
    Livin the iPhone Life
    Join Date
    Dec 2007
    Posts
    1,458
    Thanks
    15
    Thanked 197 Times in 184 Posts

    Default 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:

    <?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 04:16 AM. Reason: Automerged Doublepost

  2. The Following User Says Thank You to BlackWolf For This Useful Post:

    jakecigar (07-30-2008)

  3. #2
    iPhoneaholic jakecigar's Avatar
    Join Date
    Aug 2007
    Location
    San Francisco, CA
    Posts
    476
    Thanks
    24
    Thanked 112 Times in 94 Posts

    thanks! I haven't needed to know this (YET)... but it's good to know.
    http://jpassoc.com/x -- with free itunes under the puppy!
    If I help you out, please press THANKS!

    3g QuickPWN'ed with 2.1

  4. #3
    Livin the iPhone Life
    Join Date
    Dec 2007
    Posts
    1,458
    Thanks
    15
    Thanked 197 Times in 184 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 04:47 AM.

  5. #4
    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. :-)

  6. #5
    Livin the iPhone Life
    Join Date
    Dec 2007
    Posts
    1,458
    Thanks
    15
    Thanked 197 Times in 184 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.

  7. #6
    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
    Check out Media Database for the iPhone!
    http://www.djkev.com/apps/iPhone.php

  8. #7
    Green Apple
    Join Date
    Jul 2009
    Posts
    30
    Thanks
    8
    Thanked 3 Times in 3 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

  9. #8
    What's Jailbreak?
    Join Date
    May 2010
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default auto launch apps
    i know this thread is old.
    but it seems to me that there is still no well documented way to have your own app auto start when the ipod is launched.


    was i personally would like to have is a way to have the ipod noticed when being plugged in and then start an app.
    but it seems there is no way around the slide/tap to unlock screen. or is there?
    but once someone does slider to unlock it would be great to have an app start right away.

    any ideas?

    thanks,
    stephan.

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