Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
34
rated 0 times [  34] [ 0]  / answers: 1 / hits: 131897  / 2 Years ago, mon, july 4, 2022, 12:13:12

After installing TeamViewer x86 on Ubuntu, it will not start automatically on boot, even when telling it to do so via the application settings ("Start TeamViewer with system"). How do I make sure TeamViewer starts with the system, before even logging in?


More From » services

 Answers
6

TeamViewer provides a script called teamviewerd.sysv available in /opt/teamviewer/tv_bin/script. Here's an excerpt:



#!/bin/bash
#
# /etc/init.d/teamviewerd
#
# chkconfig: 2345 95 05
# description: daemon for TeamViewer
#
# processname: teamviewerd
# config: /etc/teamviewer/global.conf
# pidfile: /var/run/teamviewerd.pid

### BEGIN INIT INFO
# Provides: teamviewerd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Required-Start: $all
# Required-Stop: $local_fs $network $named
# Short-Description: TeamViewer remote control daemon
# Description: TeamViewer remote control daemon
### END INIT INFO


All you need to do is make sure this script runs on startup. Making sure of this is relatively simple, just copy it to /etc/init.d like so:



cd /opt/teamviewer/tv_bin/script
sudo cp teamviewerd.sysv /etc/init.d/


Don't forget to make the script non-writable to anyone but the owner!



sudo chmod 755 /etc/init.d/teamviewerd.sysv


Then run



sudo update-rc.d teamviewerd.sysv defaults


The service will now start automatically with each boot. If you don't feel like rebooting, you can start the service manually with:



sudo service teamviewerd.sysv start


2019 EDIT: This answer was written in 2013. Since then, systemd has arrived in force and is normally used for constructing services that start upon boot. For instructions on how to achieve this in systemd instead, please see this question: How do I run a single command at startup using systemd?


[#26772] Monday, July 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
termetalli

Total Points: 326
Total Questions: 127
Total Answers: 110

Location: Sao Tome and Principe
Member since Sat, Sep 12, 2020
4 Years ago
termetalli questions
Sat, Apr 30, 22, 17:54, 2 Years ago
Mon, Dec 6, 21, 05:24, 2 Years ago
Thu, Jun 30, 22, 00:32, 2 Years ago
Mon, Dec 19, 22, 00:15, 1 Year ago
;