Results 1 to 5 of 5

Thread: Mac startup script

  1. #1
    Foot Soldier
    Pikmin's Avatar

    Join Date
    Dec 2009
    Location
    Australia
    Posts
    312

    Mac startup script

    Hi everyone,
    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.

    Using LoginHook:
    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.

  2. #2
    Keyboard Error: Press F1 to Continue
    Tribuni Angusticlavii
    Bad_Ad84's Avatar

    Join Date
    May 2011
    Location
    Burton on Trent, UK
    Posts
    4,061
    Google launchd and write a plist for it.
    Last edited by Bad_Ad84; 01-26-2012 at 09:51 AM.
    Quote Originally Posted by APE View Post
    Legend has it he can ninja a chip into a PS2 while you're playing it and you'll never notice until you reboot.
    Feedback: Here eBay
    My Modding parts for sale thread can be found here: CLICK ME

  3. #3
    Foot Soldier
    Pikmin's Avatar

    Join Date
    Dec 2009
    Location
    Australia
    Posts
    312
    That's what I've been trying to do for the last two days. Finally got it today
    Thank you! :)

  4. #4
    Model 3 compatible ASSEMbler Soldier
    la-li-lu-le-lo's Avatar

    Join Date
    Feb 2006
    Location
    US
    Posts
    3,735
    You are aware of the "Open at Login" option, right?

  5. #5
    Foot Soldier
    Pikmin's Avatar

    Join Date
    Dec 2009
    Location
    Australia
    Posts
    312
    Yes I am, thank you, but that only works for accounts already created on the machine if I'm not mistaken

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •