Professional Web Applications Themes

application run on startup on Mac OS X - Mac Programming

Hi, I'm quite new to mac programming. I want our application to add themself as run on startup, but the function has to be in a library. All I seem to find are thing like "copy those file to this folder" or "run system preferences and...". Anyone has some code that adds/removes an application from run at startup using only the application path/name? Any help is greatly appreciated. Thanks, Jean-Philippe Leconte...

  1. #1

    Default application run on startup on Mac OS X

    Hi, I'm quite new to mac programming. I want our application to add
    themself as run on startup, but the function has to be in a library.

    All I seem to find are thing like "copy those file to this folder" or
    "run system preferences and...".

    Anyone has some code that adds/removes an application from run at
    startup using only the application path/name?


    Any help is greatly appreciated.

    Thanks,

    Jean-Philippe Leconte
    ins0mniaque Guest

  2. #2

    Default Re: application run on startup on Mac OS X

    In article <google.com>,
    com (ins0mniaque) wrote:
     

    Do you really mean on startup, or do you mean when the user logs in?

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: application run on startup on Mac OS X

    Miro Jurisic <org> wrote in message news:<mit.edu>... 
    >
    > Do you really mean on startup, or do you mean when the user logs in?
    >
    > meeroh[/ref]

    When a user logs in... sorry for not being specific enough.


    Jean-Philippe Leconte
    ins0mniaque Guest

  4. #4

    Default Re: application run on startup on Mac OS X

    In article <google.com>,
    com (ins0mniaque) wrote:
     
    > >
    > > Do you really mean on startup, or do you mean when the user logs in?
    > >
    > > meeroh[/ref]
    >
    > When a user logs in... sorry for not being specific enough.[/ref]

    Then you might want to check out the System Configuration framework,
    since Login Items are parts of a user's options in System Preferences.
    You might be able to write a setting to do what you want, I don't know.

    There are also loginhooks in the /etc/ttys file which can run a script
    at log in. It can be very hard and a bit dangerous to programmatically
    add a line to a text file in the /etc directory though.

    This page has some tips on customising the start up process.
    <http://developer.apple.com/doentation/MacOSX/Conceptual/SystemOvervie
    w/BootingLogin/chapter_4_section_4.html#//apple_ref/doc/uid/20000981/CJBB
    AIAB>

    I've also tried to go down the route of installing a folder in
    /Library/StartupItems (which are started during boot, before log in).
    That turned out to be a bad idea - mixing a /Library/StartupItem with
    essentially a user application is bad. Permission troubles too. All
    sorts of hidden gotchas - the /Library/StartupItems should be limited to
    completely faceless daemons I think.

    In the end, I think the best way to get your app to startup
    automatically, is to ask the user to add it to their log in items. In
    general, Mac users don't like the behind the scenes "user-obnoxious"
    features often present in the Windows world. Best not to go messing with
    a user's settings, let them have the power. Helps conserve one of the
    great feelings in using a Mac - the feeling of control of the processes.

    --
    Heath
    __________________________________________________ ______
    | *Nothing is foolproof to a sufficiently talented fool* |
    | _\|/_ |
    |________________________________________m(. .)m_________|
    Heath Guest

  5. #5

    Default Re: application run on startup on Mac OS X

    Heath Raftery <com> wrote in message news:<newcastle.edu.au>... 
    > >
    > > When a user logs in... sorry for not being specific enough.[/ref]
    >
    > Then you might want to check out the System Configuration framework,
    > since Login Items are parts of a user's options in System Preferences.
    > You might be able to write a setting to do what you want, I don't know.
    >
    > There are also loginhooks in the /etc/ttys file which can run a script
    > at log in. It can be very hard and a bit dangerous to programmatically
    > add a line to a text file in the /etc directory though.
    >
    > This page has some tips on customising the start up process.
    > <http://developer.apple.com/doentation/MacOSX/Conceptual/SystemOvervie
    > w/BootingLogin/chapter_4_section_4.html#//apple_ref/doc/uid/20000981/CJBB
    > AIAB>
    >
    > I've also tried to go down the route of installing a folder in
    > /Library/StartupItems (which are started during boot, before log in).
    > That turned out to be a bad idea - mixing a /Library/StartupItem with
    > essentially a user application is bad. Permission troubles too. All
    > sorts of hidden gotchas - the /Library/StartupItems should be limited to
    > completely faceless daemons I think.
    >
    > In the end, I think the best way to get your app to startup
    > automatically, is to ask the user to add it to their log in items. In
    > general, Mac users don't like the behind the scenes "user-obnoxious"
    > features often present in the Windows world. Best not to go messing with
    > a user's settings, let them have the power. Helps conserve one of the
    > great feelings in using a Mac - the feeling of control of the processes.[/ref]


    In fact, it was an option in the interface (because windows users tend
    not to know how to add a startup item (either the registry or startup
    in start menu).

    Thanks for answering, I will choose the "let the user do it" route.
    ins0mniaque Guest

Similar Threads

  1. Replies: 3
    Last Post: January 17th, 02:43 PM
  2. Replies: 0
    Last Post: August 9th, 11:33 AM
  3. Replies: 2
    Last Post: August 7th, 07:13 AM
  4. Replies: 0
    Last Post: August 4th, 09:08 PM
  5. Replies: 0
    Last Post: July 3rd, 08:58 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139