Software & AppsOperating SystemLinux

How To Make TeamViewer Start Automatically on Ubuntu

ubuntu 8

In this article, we will guide you through the process of configuring TeamViewer to start automatically on an Ubuntu system. This can be particularly useful if you need to access your Ubuntu system remotely and want to ensure that TeamViewer is always running.

Quick Answer

To make TeamViewer start automatically on Ubuntu, you can use the teamviewerd.sysv script for older versions of Ubuntu, enable the "Start TeamViewer with system" option in newer versions of TeamViewer, or use systemd for newer versions of Ubuntu.

What is TeamViewer?

TeamViewer is a widely used remote desktop software that allows you to connect to a computer remotely and use it as if you were sitting in front of it. It’s a powerful tool for system administrators, IT professionals, and anyone who needs remote access to their computer.

Why Start TeamViewer Automatically?

By default, TeamViewer does not start automatically when Ubuntu boots up. This means that if your system restarts for any reason (such as a power outage or system update), you will not be able to remotely access your system via TeamViewer until you manually start the application. By configuring TeamViewer to start automatically, you can ensure that you always have remote access to your system.

Methods to Start TeamViewer Automatically on Ubuntu

There are several methods to make TeamViewer start automatically on Ubuntu. We will cover three of them in this article:

  1. Using the teamviewerd.sysv script (for older versions of Ubuntu)
  2. Using the “Start TeamViewer with system” option (for newer versions of TeamViewer)
  3. Using systemd (recommended for newer versions of Ubuntu)

Method 1: Using the teamviewerd.sysv script

For older versions of Ubuntu, TeamViewer provides a script called teamviewerd.sysv that can be used to start the TeamViewer daemon on boot. Here’s how to use it:

  1. Copy the script to the /etc/init.d/ directory by running the following command:
sudo cp /opt/teamviewer/tv_bin/script/teamviewerd.sysv /etc/init.d/

This command uses sudo to run the command as the root user, cp to copy the file, and /opt/teamviewer/tv_bin/script/teamviewerd.sysv /etc/init.d/ specifies the source file and the destination directory.

  1. Make the script non-writable to anyone but the owner:
sudo chmod 755 /etc/init.d/teamviewerd.sysv

The chmod command changes the permissions of the file. 755 means the owner can read, write, and execute the file, while others can only read and execute it.

  1. Update the system’s startup configuration to include the TeamViewer daemon:
sudo update-rc.d teamviewerd.sysv defaults

The update-rc.d command is used to install system startup links for System V.

  1. The service will now start automatically with each boot. You can also start it manually with:
sudo service teamviewerd.sysv start

Method 2: Using the “Start TeamViewer with system” option

In TeamViewer version 9 and above, there is an option called “Start TeamViewer with system” that can be enabled to automatically start TeamViewer on boot.

  1. Open the TeamViewer application and go to the settings.
  2. Look for the “General” or “Advanced” tab and find the “Start TeamViewer with system” option.
  3. Enable this option to ensure that TeamViewer starts automatically with the system, even before logging in.

Method 3: Using systemd

Since systemd is now the default init system on newer versions of Ubuntu, it is recommended to use it to start TeamViewer automatically.

  1. Create a new systemd service unit file for TeamViewer by running the following command:
sudo nano /etc/systemd/system/teamviewer.service

This command opens the nano text editor with root privileges to create a new file at the specified location.

  1. Paste the following content into the file:
[Unit]
Description=TeamViewer remote control daemon
After=network.target

[Service]
ExecStart=/opt/teamviewer/tv_bin/script/teamviewerd.sysv

[Install]
WantedBy=multi-user.target

This is a basic systemd service file. It specifies when the service should start (After=network.target means it starts after the network is up), what command to run to start the service (ExecStart), and when the service should be installed (WantedBy=multi-user.target means it’s installed when the system is in multi-user mode).

  1. Save the file and exit the text editor.
  2. Enable the service to start on boot:
sudo systemctl enable teamviewer.service

The systemctl enable command is used to enable a service to start on boot.

  1. The service will now start automatically with each boot. You can also start it manually with:
sudo systemctl start teamviewer.service

Conclusion

By following the steps in this article, you can configure TeamViewer to start automatically on your Ubuntu system. This ensures that you will always be able to remotely access your system, even after a system restart. As always, it’s a good idea to refer to the official TeamViewer documentation or support resources for the specific versions you have installed.

Can I use these methods to start TeamViewer automatically on other Linux distributions?

These methods are specifically for Ubuntu. While some parts may be applicable to other Linux distributions, it is recommended to refer to the official documentation or support resources for the specific distribution you are using.

How can I check if TeamViewer is running on my Ubuntu system?

You can check if TeamViewer is running by opening a terminal and running the following command: teamviewer --daemon status. If TeamViewer is running, it will display the status as "running".

Can I start TeamViewer automatically for multiple user accounts on Ubuntu?

Yes, you can start TeamViewer automatically for multiple user accounts on Ubuntu by following the methods mentioned in this article for each user account separately. Each user account will have its own instance of TeamViewer running.

Can I disable TeamViewer from starting automatically on my Ubuntu system?

Yes, you can disable TeamViewer from starting automatically by reversing the steps mentioned in the methods. For example, in Method 1, you can remove the startup links by running sudo update-rc.d -f teamviewerd.sysv remove. In Method 2, you can disable the "Start TeamViewer with system" option in the TeamViewer settings. In Method 3, you can disable the systemd service by running sudo systemctl disable teamviewer.service.

Does starting TeamViewer automatically on boot affect system performance?

Starting TeamViewer automatically on boot should not have a significant impact on system performance. However, keep in mind that running TeamViewer in the background may consume some system resources. If you notice any performance issues, you can consider disabling the automatic startup or adjusting TeamViewer’s settings to optimize resource usage.

Leave a Comment

Your email address will not be published. Required fields are marked *