[launchd-dev] Book on using launchd?
J.B. Nicholson-Owens
jbn at illinois.edu
Fri May 1 12:45:16 PDT 2009
Is there a good book or article on using launchd and its future for replacing
other program-launching programs? Preferably something with examples to
illustrate running launchd in the context of a program?
Specifically, I manage multiple labs of Macs all running MacOS X 10.5.6 and I'd
like to kick off some processes, some as root, some as the user:
- add a link icon to the dock so the user has one-click access to a shared SMB
volume. I have been using a Python script to add this dock icon but knowing
when to run the Python script is tricky; on some machines this works perfectly
every time, on other machines running MacOS X 10.5.6, the dock icon script
doesn't run. I'm guessing I want to run this Python script in the dock context
but I'm not sure if that's correct.
- will launchd replace login/logout scripts run as root? I'd like to clear the
print queues on the machine (using CUPS' "cancel -a" run as root) when the user
logs out. I'd like to do this without prompting the user for admin credentials
(which our users don't have); print jobs left at logout time should simply be
cancelled/deleted.
- some programs don't take preference settings via MCX (Adobe CS3's Acrobat, for
instance) and I'll need to set certain preferences for the user every time they
login via a script (turning off Adobe Acrobat's Javascript, for example).
I'm trying to limit running scripts as the user to functions our users would
like to have done for them, rather than enforcing policy or attempting any
security setting by running scripts as the user. It's my hope that by doing
this the user won't have any incentive to want to disable running those scripts.
Thanks for your help.
More information about the launchd-dev
mailing list