Home » Questions » Computers [ Ask a new question ]

How do I start programs automatically when Mac OS X boots up? Specifically VMWare Fusion's vmrun to start VMs

How do I start programs automatically when Mac OS X boots up? Specifically VMWare Fusion's vmrun to start VMs

How do I configure programs to run automatically when (after) Mac OS X boots up?

Asked by: Guest | Views: 323
Total answers/comments: 2
bert [Entry]

"I tried a few methods and got the weirdest results. This is what finally worked:

<?xml version=""1.0"" encoding=""UTF-8""?>
<!DOCTYPE plist PUBLIC ""-//Apple//DTD PLIST 1.0//EN"" ""http://www.apple.com/DTDs/PropertyList-1.0.dtd"">
<plist version=""1.0"">
<dict>
<key>Label</key>
<string>com.example.myvmname</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/VMware Fusion/vmrun</string>
<string>start</string>
<string>pathtovirtualmachinevmxfile.vmx</string>
<string>nogui</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>myusername</string>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

I created a file com.example.vmname.plist containing the above in /Library/LaunchDeamons and made sure its owner:group was root:wheel. the Apple developer tools provide an excellent editor for plist XML files.

This produces the following behaviour, which is ideal for my environment (I have a eight-core Mac Pro with 8 GB of memory and can afford to run several VMs in the background instead of suspending them or shutting them down):

When Mac OS X boots the VM starts up in the background. This also works for more than one VM.
If at any time the VM crashes it will be restarted immediately.
The same applies when the VM is being shut down or stopped unless done from the Fusion GUI (the latter behaviour allows for editing VM settings).
When Mac OS X shuts down, the VM suddenly stops. I have to find a way to shut them down more gracefully before a system reboot."
bert [Entry]

"These solutions are way overcomplicated. By far the easiest way is to go to System Preferences ->Users & Groups->Login items tab and click the plus and select the app you want to start.

Also in System Preferences ->Users & Groups you can select Login Options and select your user for automatic login of that user. THERE IS NO SECURITY RISK TO THIS UNLESS YOU GIVE OTHER PEOPLE PHYSICAL ACCESS TO YOUR MACHINE!

Anyone with physical access to your machine can boot off an external drive (or various other methods of bypassing your login password) and have access to all the files on your hard disk. The correct answer to your computer's security is not to have your computer nag YOU to enter your own password every time you walk up to it, instead it is to lock your room! Has the added benefit of not allowing your 3 year old to rip out the keys on your keyboard, spill orange juice on your mac pro, and other such things.

So remember, login passwords are only for shared work areas/environments where your computer is somewhere everyone else can walk up to and use - something you should never do with your home PC in my opinion. If you have proper physical security, the login password is just a waste of your time and should be disabled, it provides almost no security at all."