Mac startup script
I have this script that I'm trying to run at logon every time a user logs in.
So far I've tried LoginHook and launchd and can't seem to get it right.
When I login as an administrator I get it to work every time but once the computer is joined to the OD and AD and use a network account it stops working properly. Can't really put my finger on it...
Either it stops working completely or it only works after a restart/power on.
My understanding is that the login hook executes under root privileges. Because the network accounts take longer to authenticate the script seems to run before the user is logged in completely.
I had to put a sleep 20 command in the script so that the .app runs and mounts the network shares using the logged in user not root and that works fine.
From what I've read online, lauchd is the way to go, but it can only run during startup or on demand.
Still not sure why it doesn't execute properly every time during logon. So intermittent
Any suggestions are welcome :D
EDIT: to make things more clear, i'm trying to run an .app and using a simple script to execute it
Last edited by Pikmin; 01-26-2012 at 08:44 AM.
Google launchd and write a plist for it.
Last edited by Bad_Ad84; 01-26-2012 at 09:51 AM.
Originally Posted by APE
Feedback: Here eBay
My Modding parts for sale thread can be found here: CLICK ME
That's what I've been trying to do for the last two days. Finally got it today
Thank you! :)
You are aware of the "Open at Login" option, right?
Yes I am, thank you, but that only works for accounts already created on the machine if I'm not mistaken