Skip to content

Instantly share code, notes, and snippets.

@efernandesng
Last active January 9, 2024 19:38
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save efernandesng/c739dba20beadb988f2bff492fbe0dce to your computer and use it in GitHub Desktop.
Save efernandesng/c739dba20beadb988f2bff492fbe0dce to your computer and use it in GitHub Desktop.
Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#!/bin/bash
##
# Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#
# Tested on Arch linux
##
CONFIG_FILE=/opt/teamviewer/config/global.conf
# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
if [ ! -s $CONFIG_FILE ]; then
echo "$CONFIG_FILE not found! Teamviewer is installed?" 1>&2
exit 1
fi
systemctl stop teamviewerd
lastMACUsed=`cat $CONFIG_FILE | grep LastMACUsed | cut -b 23- | tr -d '"'`
for iface in `ls /sys/class/net`; do
read mac </sys/class/net/$iface/address
mac=`echo $mac | tr -d ':'`
if [ "${lastMACUsed#*$mac}" != "$lastMACUsed" ]; then
echo "$iface -> $mac"
#ip link set $iface down
macchanger $iface -r
#ip link set $iface up
fi
done
rm -f "$CONFIG_FILE"
systemctl start teamviewerd
@k4mrul
Copy link

k4mrul commented May 13, 2021

Works in manjaro. Thanks

@pereverti
Copy link

Works with Ubuntu / Xubuntu too. Be sure to install macchanger if missing.

Thank you for your script :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment