Teamviewer Linux has the annoying property of installing a permanently running daemon. This not only consumes resources but also presents a security risk. You can disable the daemon startup, however then the teamviewer client does not work anymore.
The best way is to enable the daemon before running the teamviewer script and disable it again after the teamviewer client has closed.
The following shell script handles things automatically:
#!/bin/sh
echo starting teamviewer daemon
sudo teamviewer --daemon enable
teamviewer &
wait $!
echo teamviewer finished
sudo teamviewer --daemon disable
sudo killall -KILL teamviewerd
echo stopped and disabled teamviewer daemon
teamviewer --daemon enable
should be just teamviewer daemon enable
–
Apure killall -KILL teamviewerd
which will kill the daemon for shure –
Aforementioned On ubuntu 18.04, here how I solve this
Stop autostart demon
$sudo systemctl disabled teamviewerd.service
create script /opt/tm.sh
#!/bin/bash
pkexec --user root systemctl start teamviewerd.service;
/opt/teamviewer/tv_bin/script/teamviewer;
pkexec --user root systemctl stop teamviewerd.service;
Set bash script executable
chmod u+x /top/tm.sh
Update de /usr/share/applications/com.teamviewer.TeamViewer.desktop
Exec=/opt/tm.sh
It work perfecly for my needs. I only need to connect to other computer never to mine, so root deamon always running is not needed.
Let's see how it live with update from ppa of Teamviewer
The solution Fedora 30+ is:
# systemctl disable teamviewerd.service
# systemctl stop teamviewerd.service
But don't forget to start the service again in order to get a TeamViewer ID.
# systemctl start teamviewerd.service
The tar package allows to run the TV client without installation and without root privileges.
© 2022 - 2024 — McMap. All rights reserved.
$ sudo teamviewer --daemon disable [sudo] password for usuario: Init... *** TeamViewer can not be executed with sudo! *** Either use your normal user account without sudo or use a the real root account to log in to your desktop (not recommended!).
– Nippon