Running a script when fast switching between users...

Discussion in 'Installation and Configuration of Parallels Desktop' started by bkwendt, Sep 4, 2014.

  1. bkwendt

    bkwendt Bit poster

    Messages:
    2
    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. Eugene@Parallels

    Eugene@Parallels Banned

    Messages:
    126
    Hi,

    You may try to use prlctl binary for this purpose.
    The Terminal command for suspending a virtual machine:

    prlctl suspend ID|name

    To get an ID of the virtual machine, please use "prlctl list -a" command without quotes.
    There you may find an ID or you may use the name in quotes.

    line can look like:

    prlctl suspend "Windows 7"
     
  3. bkwendt

    bkwendt Bit poster

    Messages:
    2
    Thanks Eugene

    I will have a look at prlctl and see what I can figure out.
     

Share This Page