Skip to main content

TeamViewer: macOS Client Setup

What

FileWave's TeamViewer integration requires endpoint prerequisites on each supported platform.  In future versions, we may embed some of these prerequisites, but at this time, we erred on the side of letting you control the elements.  So, slightly more work but much greater control.

When/Why

TeamViewer is used to remotely control your clients. You can use TeamViewer when you need access to a device for troubleshooting or assisting a user. TeamViewer for macOS differs from other OSs because it requires a few privacy permissions before allowing TeamViewer to be installed.

How

We'll need to meet prerequisites for macOS client devices in order for TeamViewer to work seamlessly. 

We'll need the:

In this documentation, we will be installing the TeamViewer Host application. The full TeamViewer application is only necessary for computers wanting to remote into other computers. The Host application is only allowed to accept connections and not initiate them. You can use both, but we highly recommend the Host application.

(During an attempt to prompt a device for control, users will be prompted to either install or launch a local copy of Teamviewer.  Only the TeamViewer Host version can be launched if pre-installed.)

FileWave Client (14.7+)

Remember to always use the client updater Fileset to update your clients.  Do NOT push the FileWave client PKG to upgrade macOS clients.

The most recent FileWave client is always included on the FileWave download pages, which you can find here: https://fwkb.atlassian.net/wiki/spaces/DOW/overviewDownloads

TCC Profile for TeamViewer Host - Accessibility and Full Admin Access

These profiles will allow you to enable 2 of the 3 permissions that TeamViewer Host needs. Screen Recording is a privacy setting that can not be allowed by anyone but the user. You can, however, give a Standard User the right to allow Screen Recording (macOS 11+).

The two profiles may be uploaded simultaneously. The Fileset Requirement Script is able to identify either profile.

TCC Profile for TeamViewer Host: Profile - TeamViewerHostmacOS.fileset.zip

 

TCC Profile for TeamViewer Host with Standard User Screen Recording Allowance 11+: Profile - TeamViewerHost Allow Standard User.fileset.zip

Teamviewer Host Fileset

We are including the below Fileset/payload as an example only to show the use of the settings file.  Please download the most recent version of TeamViewer at the link above for your own installer. 

To put the latest TeamViewer Host PKG in this Fileset, you should download the installer from the TeamViewer website and then right-click the installer app and Show Contents which will reveal the Install TeamViewerHost.PKG file. Edit the example Fileset below and add the PKG installer to /usr/local/etc/TeamViewer/ and replace the one in the Fileset.

Options for configuring the Host Application are available and an example is below but is not included in this Fileset.

Choose an embedded TeamViewer Fileset: 

Note that you only need one of the below, but we may offer several versions in case you need an older version.

 

TeamViewer Host Install macOS 15.40.8.fileset.zip

 

TeamViewer Host Install macOS 15.30.3.fileset.zip

Fileset Contents:

macOS TeamViewer Host Fileset Contents

Installer and Installer Options:

The choices.xml file tells the .pkg to install silently. 

Requirement Script:

This Fileset example includes the below Requirement Script that checks that either profile is installed before continuing with the rest of the Fileset. This way, TeamViewer Host won't install until that profile is present, and won't prompt the user for Full Disk Access and Accessibility Privacy Settings. 

The check_tv_profile script can be found by selecting the imported Fileset and clicking Scripts in the toolbar. 

If you are using your own Profile or you had to regenerate the Identifier, you can find your ID in the Profile Info window (double-click on Profile in Admin) and change one of the found_profile values to your ID.


#!/bin/bash
#edited by Emma Ainsworth 6/15/2023 to check for both profiles

found_profile1="ml1063.local.5a57bcb9-7293-4cba-a20b-126eb2660b25.Configuration.5a57bcb9-7293-4cba-a20b-126eb2660b25"
found_profile2="ml1063.lan.30916554-5d82-4d52-a86d-3cd457330717.Configuration.30916554-5d82-4d52-a86d-3cd457330717"

if profiles -P | egrep -q $found_profile1; 
then
	echo "Found installed profile: $found_profile1"
	exit 0
elif profiles -P | egrep -q $found_profile2; 
then
	echo "Found installed profile: $found_profile2"
	exit 0
else
	echo "Profile $found_profile1 or $found_profile2 NOT FOUND"
	exit 1
fi

Activation Script:

The Fileset also includes this script which makes the installation silent for TeamViewer Host and hides the Wizard that would normally appear after the install. 

#!/bin/zsh
installer -applyChoiceChangesXML /usr/local/etc/TeamViewer/choices.xml -pkg "/usr/local/etc/TeamViewer/Install TeamViewerHost.pkg" -target /
exit 0

Post-Uninstallation Script:

the mac_teamviewer_uninstaller script will uninstall TeamViewer when/if the Fileset is removed from the Client.

Optional TeamViewer Host Configurations

There are a few options that can be set, depending on your needs. In this example, we're locking the TeamViewer Options to only be accessed by users with Administrator rights and removing the password so the client can only be accessed by FileWave Admin users.

The script below changes the TeamViewer Preferences plist (com.teamviewer.teamviewer.preferences.plist) and restarts the TeamViewer service to apply the changes. 

If you have already deployed TeamViewer Host to your devices, you can send this script in it's own empty Fileset. If you're just getting started with your TeamViewer deployment, you can add this script to the provided Fileset as a Postflight Script. Adding it as a Postflight script will ensure the script is executed after TeamViewer Host is installed and the .plist is created. 

change_tv_preferences.sh

#!/bin/bash

sleep 30

#Security_PasswordStrength will change the password strength to None, only allowing known connections from Admin
/usr/libexec/PlistBuddy -c "Add :Security_PasswordStrength integer 3" /Library/Preferences/com.teamviewer.teamviewer.preferences.plist

#Security_Adminrights being true will only allow Administrators to open TV Preferences
/usr/libexec/PlistBuddy -c "Add :Security_Adminrights integer 1" /Library/Preferences/com.teamviewer.teamviewer.preferences.plist

sleep 15

teamviewer=$(ps -xa | grep -i "TeamViewer_Service" | grep -v grep | awk {'print $1'})

kill -9 $teamviewer

exit 0

TeamViewer also provides guidance here on mass deployment that may be helpful: https://community.teamviewer.com/English/kb/articles/50739-mass-deployment-on-macos