Results 1 to 4 of 4
Discuss daemons and launchctl at the iPhone Developer Exchange - Hackint0sh.org; Just wondering how/if possible to run launchctl as the mobile user? I'm working on an ...
  1. #1
    Rookie Array

    Join Date
    Aug 2008
    Posts
    12
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default daemons and launchctl

    Just wondering how/if possible to run launchctl as the mobile user? I'm working on an application where I have a setting to turn on/off a daemon. When the user flicks the switch I use execve to run launchctl. However, since this runs it as the "mobile" user I'm getting errors. If run as the root (from commanline) it's fine. Any ideas?



  2. #2
    Senior Professional Array

    Join Date
    Mar 2007
    Posts
    147
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    i'd like to know this too

  3. #3
    Rookie Array

    Join Date
    Aug 2008
    Posts
    12
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    well for those that care, here's what I've found. As your application will run as the mobile user, you cannot call launchctl from your app to add/remove a daemon. This can only be done as root. Thus, your only possibility for launchctl is to add to it during your install process, which is done as root.

    This unfortunately doesn't meet with what I need. However, I think I can accomplish my tasks by the use of a simple background process. I'm just testing a few things out.

  4. #4
    Senior Professional Array

    Join Date
    Mar 2007
    Posts
    147
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Cydia and BossPrefs do it by having springboard launch a script which in turn runs the main executable with execute permissions (chmod 4755).

 

 

Similar Threads

  1. Bug: launchctl.c:2325
    By alyshehata in forum Installation
    Replies: 1
    Last Post: 09-10-2010, 01:40 PM
  2. 2.1 and UIApplication daemons
    By TheBrew in forum iPhone Developer Exchange
    Replies: 3
    Last Post: 09-19-2008, 04:28 PM
  3. [1.1.2 OTB] Terminal launchctl error
    By mitchellmoxo in forum Tools
    Replies: 8
    Last Post: 02-02-2008, 07:10 AM
  4. [1.1.2 OTB] Terminal launchctl error
    By mitchellmoxo in forum General
    Replies: 1
    Last Post: 02-02-2008, 04:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 05:36 PM.
twitter, follow us!