[launchd-dev] launchd/osascript kiosk behaviour
Christopher Hunt
huntc at internode.on.net
Wed Feb 28 03:29:41 PST 2007
Hi there,
Please forgive me if this is an inappropriate place to post an
observation of launchd that I'm finding hard to understand. Please
also feel free to direct me elsewhere as necessary.
I'm trying to execute osascript -e <command> via launchd and it
reports an error (an abort) in the system.log file. More specifically:
launchd[4108]: com.classactionpl.restartvision: exited abnormally:
Abort trap
Others item of interest:
- the user I'm logged in under has not launched the Finder - it is a
kiosk style of user where a custom application is launched in place
of the Finder.
- my plist is under the ~/Library/LaunchAgents i.e. the user's launch
agent's directory
- all is well if I perform the same osascript command from within the
same user's crontab
- all is well if I perform the same osascript command from the
command line
One particular item of interest is: if I "launchd bash", load the
plists and the start the job, the osascript command works! So why
shouldn't the command work outside of this?
Here's the plist I'm using:
<?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>Debug</key>
<true/>
<key>Label</key>
<string>com.classactionpl.restartvision</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>-e</string>
<string>tell application "World" to quit</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>0</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</dict>
</plist>
Debug etc. doesn't yield more info.
'hoping that someone can help.
Kind regards,
Christopher
More information about the launchd-dev
mailing list