Login Item for All Users

  • Hi All,

            I've an cocoa application which needs to be added to Login
    Items and should be opened at login time for all the users in the
    machine.

            My application is going to be  supported on Tiger as well as
    on Leopard.I heard that global login items is the new feature in
    Leopard.

          How do i acheive this functionality in both versions of Operating system.

          Please help me to solve this issue. Thanks in Advance.

    -JanakiRam.
  • On Tiger SystemStarter runs all jobs it finds in /Library/
    StartupItems/ and  /System/Library/StartupItems/

      /Library/StartupItems/  is where user created tasks are saved
    /System/Library/StartupItems/  is where system tasks are

    I do not know how it is in leopard but it is a good bet that it is
    backwards compatible with the above functionality in tiger

    On Nov 17, 2007, at 11:50 AM, JanakiRam wrote:

    > Hi All,
    >
    > I've an cocoa application which needs to be added to Login
    > Items and should be opened at login time for all the users in the
    > machine.
    >
    > My application is going to be  supported on Tiger as well as
    > on Leopard.I heard that global login items is the new feature in
    > Leopard.
    >
    > How do i acheive this functionality in both versions of
    > Operating system.
    >
    > Please help me to solve this issue. Thanks in Advance.
    >
    > -JanakiRam.
  • Am 17.11.2007 um 11:28 Uhr schrieb Vlad Alexa:

    > but it is a good bet that it is backwards compatible with the above
    > functionality in tiger

    http://developer.apple.com/technotes/tn2005/tn2083.html

    "Deprecated Daemonomicon
    A number of mechanisms used to launch background programs are now
    deprecated or unsupported. This section describes these mechanisms.

    IMPORTANT: You should only use these technologies on older systems. We
    recommend that you update your code to use a supported mechanism on
    current systems, and only resort to a deprecated mechanism when the
    recommended mechanism is not available.

    Startup Item
    [...]

    Starting with Mac OS X 10.4, startup items are deprecated in favor of
    launchd daemons."

    So, yes, it will work. But, no, you shouldn't use it.

    Andreas
  • On 17 Nov 07, at 02:28, Vlad Alexa wrote:
    > On Tiger SystemStarter runs all jobs it finds in /Library/
    > StartupItems/ and  /System/Library/StartupItems/
    >
    > /Library/StartupItems/  is where user created tasks are saved
    > /System/Library/StartupItems/  is where system tasks are
    >
    > I do not know how it is in leopard but it is a good bet that it is
    > backwards compatible with the above functionality in tiger

    In addition to what Andreas Mayer points out, login items are
    completely different from startup items. One runs at login time under
    the current user's privileges, and the other runs at system startup
    time with root privileges. Don't get them confused.
  • I need a Login Item but not the System Startup Item.
    I have tried my app using startup item then ---> my app window is getting
    displated  when the Login window is shown.

    But what i want to achieve is -->  My app should get opened when any user of
    the machine logs in ( after giving proper authentication details in the
    Login window )

    -JanakiRam.

    On Nov 17, 2007 7:21 PM, Andrew Farmer <andfarm...> wrote:

    > On 17 Nov 07, at 02:28, Vlad Alexa wrote:
    >> On Tiger SystemStarter runs all jobs it finds in /Library/
    >> StartupItems/ and  /System/Library/StartupItems/
    >>
    >> /Library/StartupItems/  is where user created tasks are saved
    >> /System/Library/StartupItems/  is where system tasks are
    >>
    >> I do not know how it is in leopard but it is a good bet that it is
    >> backwards compatible with the above functionality in tiger
    >
    > In addition to what Andreas Mayer points out, login items are
    > completely different from startup items. One runs at login time under
    > the current user's privileges, and the other runs at system startup
    > time with root privileges. Don't get them confused.
    >
  • On 17 Nov 2007, at 13:51, Andrew Farmer wrote:

    >> I do not know how it is in leopard but it is a good bet that it is
    >> backwards compatible with the above functionality in tiger
    >
    > In addition to what Andreas Mayer points out, login items are
    > completely different from startup items. One runs at login time
    > under the current user's privileges, and the other runs at system
    > startup time with root privileges. Don't get them confused.

    ...and launchd does support per-user Agents from /Library/
    LaunchAgents, which - if I understand correctly - launch at login time.
    <http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/
    Articles/LaunchOnDemandDaemons.html
    >
  • Am 17.11.2007 um 15:45 Uhr schrieb JanakiRam:

    > But what i want to achieve is -->  My app should get opened when any
    > user of
    > the machine logs in ( after giving proper authentication details in
    > the
    > Login window )

    Did you *read* the document, I pointed to?

    "Global Login Item
    A global login item is a login item that is launched when any user
    logs in. Installing a global login item is roughly equivalent to
    installing that login item for all users on the system: every time a
    user logs in, loginwindow launches that user's login items and all
    global login items.

    In Mac OS X 10.5 and later you can install a global login item using
    the shared file lists interface to Launch Services.

    IMPORTANT: Prior to Mac OS X 10.5 there is no supported way to install
    a global login item. If you need this functionality, please contact
    Developer Technical Support (DTS)."

    Andreas
  • You can do this using the old LoginItemAPI sample that DTS provides
    (or used to anyway--I haven't asked lately). I just verified that it
    still works on 10.5. It allows you to install login items that run
    for any user and work on 10.5 and earlier without handling things
    differently for different versions of the OS.

    Is there some reason not to use that approach, other than making use
    of the latest things available on 10.5?

    Thanks,

    - d

    On Nov 17, 2007, at 10:22 AM, Andreas Mayer wrote:

    >
    > Am 17.11.2007 um 15:45 Uhr schrieb JanakiRam:
    >
    >> But what i want to achieve is -->  My app should get opened when
    >> any user of
    >> the machine logs in ( after giving proper authentication details
    >> in the
    >> Login window )
    >
    > Did you *read* the document, I pointed to?
    >
    > "Global Login Item
    > A global login item is a login item that is launched when any user
    > logs in. Installing a global login item is roughly equivalent to
    > installing that login item for all users on the system: every time
    > a user logs in, loginwindow launches that user's login items and
    > all global login items.
    >
    > In Mac OS X 10.5 and later you can install a global login item
    > using the shared file lists interface to Launch Services.
    >
    > IMPORTANT: Prior to Mac OS X 10.5 there is no supported way to
    > install a global login item. If you need this functionality, please
    > contact Developer Technical Support (DTS)."
    >
    >
    >
    > Andreas
    > _______________________________________________
  • On Nov 17, 2007 3:02 PM, Derek Chesterfield <dez...> wrote:
    > ...and launchd does support per-user Agents from /Library/
    > LaunchAgents, which - if I understand correctly - launch at login time.
    > <http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/LaunchOnDemandDaemons.html

    LaunchAgents do not work as you might expect in Tiger (due to some
    issues in the handling of bootstrap port namespaces IIRC). You will
    probably want to avoid them.

    For Tiger, there is an undocumented system login item plist. I forget
    the details, but I believe DTS has some sample code for manipulating
    it that they will give out on request.

    -- Finlay
previous month november 2007 next month
MTWTFSS
      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    
Go to today