If you just want TeamViewer to start when you're logged in (including if your computer is set to automatically log in on boot), then do what CaseyIT says. If you want TeamViewer to genuinely start on boot, you need to use
First, you'll need to identify the actual executable. Open a terminal and look around in the TeamViewer bundle - the executable will likely be at
/Applications/TeamViewer.app/Contents/MacOS/TeamViewer but your mileage may vary. To check you've found the right path, type it in the terminal - if TeamViewer starts, you've probably got it. Alternatively, open Activity Monitor while TeamViewer is running, identify the TeamViewer process and click 'Inspect' in the toolbar. Then, in the Open Files and Ports tab, the executable will likely be the first or second entry listed (after
Once you know what program you're tracking, you can create a
launchd Property List. This is an XML file, so you can do it with your favourite text editor or alternatively you can use the Property List Editor that's installed with the Mac OS X Dev Tools. Create the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Save this in
/Library/LaunchDaemons/some.meaningful.name.plist (you will need an administrator account and/or
sudo), then open a terminal and do:
sudo launchctl load /Library/LaunchDaemons/some.meaningful.name.plist
This will cause launchd to load the item which will cause it to start TeamViewer on boot. As a bonus,
launchd will monitor the specified program and, if it exits for any reason, it will be re-started. To get rid of the item (if you genuinely need to quit TeamViewer, for instance) simply replace load in the above command with unload.
Alternatively, Lingon provides a graphical interface to
launchd, and may be easier.