TeamViewer initctl start fail on Linux

Sep 11, 2015
Tested on: Linux Mint 17.1 Rebecca (Ubuntu 14.04.1 LTS) with TeamViewer 10.0.46203

TeamViewer is great! But it keeps a daemon running in background, which may not be very desirable for occasional users. The daemon can be disabled by running: $ teamviewer daemon disable tee: /opt/teamviewer/logfiles/install_teamviewerd.log: Permission denied Fri Sep 11 14:12:42 PDT 2015 Action: Removing ... initctl stop teamviewerd initctl: Unknown instance: fail rm: cannot remove ‘/etc/init/teamviewerd.conf’: Permission denied initctl: Rejected send message, 1 matched rules; type="method_call", sender=":1.113" (uid=1000 pid=22111 comm="initctl reload-configuration ") interface="com.ubuntu.Upstart0_6" member="ReloadConfiguration" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init") OK, using sudo seems to do the trick: $ sudo teamviewer daemon disable Fri Sep 11 14:14:55 PDT 2015 Action: Removing ... initctl stop teamviewerd initctl: Unknown instance: fail wine: /home/username/.config/teamviewer10 is not owned by you
After disabling daemon, TeamViewer shows following error message when started, which is expected. However, the daemon fails to start when the command is executed:

$ sudo teamviewer daemon start initctl start teamviewerd initctl: Unknown job: teamviewerd fail $ sudo teamviewer --daemon start initctl start teamviewerd initctl: Unknown job: teamviewerd fail initctl is not aware of teamviewerd, probably because /etc/init/teamviewerd.conf was deleted during the daemon disable command (see above). Reinstalling teamviewer makes it work, but that's not the best solution.

After looking into some more details, following command can be used to start the daemon (open TeamViewer as usual after this and Ctrl-C to kill the daemon): $ sudo /opt/teamviewer/tv_bin/teamviewerd -f
For reference, initial content of /etc/init/teamviewerd.conf can be found in /opt/teamviewer/tv_bin/script/teamviewerd.DEB.conf, which can also be modified and copied to correct location. Also see this Github discussion and this blog post for more details.