Running a script when faster switching between users...

Discussion in 'Mac Programming' started by bkwendt, Sep 4, 2014.

  1. bkwendt macrumors newbie

    Sep 4, 2014
    I am new to Mac and am looking for a way to run a one line script when fast user switching between accounts.

    In short I need to suspend my Parallels virtual machine so it will properly share between users. This is the purpose of this script.

    I tried to use a logout hook but it didn't work because I assume fast user switching is not considered a logout.

    Any suggestions would be great, I assume this will be easy... I just don't see how to do it.

  2. kryten2, Sep 5, 2014
    Last edited: Sep 5, 2014

    kryten2 macrumors 6502a

    Mar 17, 2012
    Look at last post of first link. scutil also looks promising. Or perhaps Power Manager.
    Good luck.

    Info : and and

    Note : Not at home at the moment so nothing tested.
  3. bkwendt thread starter macrumors newbie

    Sep 4, 2014
    Thanks for the reply, looks like a couple options here.

    I will give it a go.

Share This Page