Skip to content

TeamViewer Auto-Startup Configuration on Ubuntu Desktop

Source: Notion | Last edited: 2024-07-22 | ID: e4c760de-683...


Date : 2024-07-22 It is confirmed that the TeamViewer daemon and GUI are now configured to start automatically on the Ubuntu desktop workstation. Below are the detailed steps taken to achieve this setup.

💡 Must have powered-on physical screen monitor attached via HDMI cable or some of the UI features cannot be performed via TeamViewer.

Steps to Ensure TeamViewer Starts Automatically

Section titled “Steps to Ensure TeamViewer Starts Automatically”

1. Create and Configure the Systemd Service for TeamViewer Daemon

Section titled “1. Create and Configure the Systemd Service for TeamViewer Daemon”

First, we created a systemd service file to manage the TeamViewer daemon, ensuring it starts automatically at boot. Commands:

Terminal window
sudo nano /etc/systemd/system/teamviewerd.service

Service File Content:

[Unit]
Description=TeamViewer remote control daemon
After=network.target
[Service]
Type=forking
ExecStart=/opt/teamviewer/tv_bin/teamviewerd -d
PIDFile=/var/run/teamviewerd.pid
Restart=on-failure
[Install]
WantedBy=multi-user.target

2. Reload Systemd Daemon and Enable the Service

Section titled “2. Reload Systemd Daemon and Enable the Service”

After creating the service file, we reloaded the systemd manager configuration and enabled the service to start on boot. Commands:

Terminal window
sudo systemctl daemon-reload
sudo systemctl enable teamviewerd.service
sudo systemctl start teamviewerd.service

To ensure the TeamViewer GUI starts when a user logs into the desktop environment, we added it to the Startup Applications Preferences. Steps:

  1. Open Startup Applications Preferences:
Terminal window
gnome-session-properties
  1. Click “Add” and fill in the details:
  • Name : TeamViewer
  • Command : teamviewer
  • Comment : (optional) Start TeamViewer at login
  1. Click “Add” to save the new startup entry.

4. Enable Auto-Start in TeamViewer Settings

Section titled “4. Enable Auto-Start in TeamViewer Settings”

We ensured that the “Start TeamViewer with system” option is enabled in the TeamViewer application settings. Steps:

  1. Open TeamViewer.
  2. Navigate to Extras > Options > General.
  3. Enable the option “Start TeamViewer with system”.

After completing the above steps, we verified the configuration by restarting the Ubuntu system and checking the status of the TeamViewer daemon and GUI. Commands:

Terminal window
sudo systemctl status teamviewerd.service

If issues persist, check the system logs for more details: Command:

Terminal window
journalctl -xe | grep teamviewer

By creating a systemd service for the TeamViewer daemon and ensuring the GUI is added to startup applications, we achieved a seamless auto-start configuration for TeamViewer on the Ubuntu desktop workstation. This setup ensures that TeamViewer is always ready for remote connections immediately after the system boots.