Running a script when faster switching between users...

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

  1. bkwendt macrumors newbie

    Joined:
    Sep 4, 2014
    #1
    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.

    Thanks!
    Barrett
     
  2. kryten2, Sep 5, 2014
    Last edited: Sep 5, 2014

    kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    Look at last post of first link. scutil also looks promising. Or perhaps Power Manager.
    Good luck.

    Info : http://hintsforums.macworld.com/archive/index.php/t-109559.html and http://www.radiotope.com/content/os-x-how-perform-action-during-fast-user-switch and http://www.dssw.co.uk/blog/2010-09-16-how-to-run-a-script-within-every-user-session/

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

    Joined:
    Sep 4, 2014
    #3
    Thanks for the reply, looks like a couple options here.

    I will give it a go.
     

Share This Page