[launchd-dev] Having issue with launchAgents

Arjun SM arjun.sm at gmail.com
Tue Jan 27 00:22:07 PST 2009


I ran man on launchd.plist and found that *RunAtLoad* key had the following
description :
This optional key is used to control whether your job is launched once at
the time the job is loaded.

Now i am confused, is it that my job will be loaded only once when i load it
with "launchtl load com.mycompany.meunlet.plist" command ???
if so then what ever problem i am reporting below is valid since the job
will not be loaded once i logout and login again.

Any help is much appreciated
~Arjun

On Thu, Jan 22, 2009 at 6:04 PM, Arjun SM <arjun.sm at gmail.com> wrote:

> I tried with the recommended plist format having only the "RunAtLoad" key
> .. but no success
>  i got the following message at Console.log when i loggedout and logged in
> again.
>
> *22/01/09 5:50:11 PM com.apple.launchctl.Aqua[2893] com.myself.menulet:
> Already loaded *
>
> then i checked if the job is listed in launchd with *launchctl list*command. It was present.
> then i also tried the "KeepAlive" key and set it to true. That also failed.
>
> ~Arjun
>
>
> On Thu, Jan 22, 2009 at 4:25 PM, Arjun SM <arjun.sm at gmail.com> wrote:
>
>> Thanks a heap for your reply and  my apologies  i didn't mentioned the
>> version. I am running on 10.5.5
>> I will take your advice and reply back with my findings.
>>
>> ~Arjun
>>
>>
>> On Thu, Jan 22, 2009 at 3:51 PM, Quinn <eskimo1 at apple.com> wrote:
>>
>>> At 12:13 +0530 22/1/09, Arjun SM wrote:
>>>
>>>>  I have created a custom Menulet  which i have made it as a launchAgent
>>>> . The problem i am facing is after installation if i logout and login again
>>>> my Menulet doesn't come up at all.
>>>>
>>>
>>> You're running on 10.5.x, right?  The symptoms you describe almost make
>>> it sound like you're testing on 10.4.x (launchd agents don't work in a
>>> useful way prior to 10.5).
>>>
>>> Beyond that, I suggest you start with something simple.  I installed the
>>> following plist on my 10.5.6 machine and it worked just fine. So, start from
>>> that, and mutate it towards what you've got, and see what causes it to stop
>>> working.
>>>
>>> $ cat /Library/LaunchAgents/com.apple.textedit.plist
>>> <?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.apple.textedit</string>
>>>        <key>Program</key>
>>>
>>>  <string>/Applications/TextEdit.app/Contents/MacOS/TextEdit</string>
>>>        <key>RunAtLoad</key>
>>>        <true/>
>>> </dict>
>>> </plist>
>>>
>>> S+E
>>> --
>>> Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
>>> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
>>> _______________________________________________
>>> launchd-dev mailing list
>>> launchd-dev at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20090127/485d69d7/attachment.html>


More information about the launchd-dev mailing list