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:
sudo nano /etc/systemd/system/teamviewerd.serviceService File Content:
[Unit]Description=TeamViewer remote control daemonAfter=network.target
[Service]Type=forkingExecStart=/opt/teamviewer/tv_bin/teamviewerd -dPIDFile=/var/run/teamviewerd.pidRestart=on-failure
[Install]WantedBy=multi-user.target2. 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:
sudo systemctl daemon-reloadsudo systemctl enable teamviewerd.servicesudo systemctl start teamviewerd.service3. Add TeamViewer to Startup Applications
Section titled “3. Add TeamViewer to Startup Applications”To ensure the TeamViewer GUI starts when a user logs into the desktop environment, we added it to the Startup Applications Preferences. Steps:
- Open Startup Applications Preferences:
gnome-session-properties- Click “Add” and fill in the details:
- Name : TeamViewer
- Command :
teamviewer - Comment : (optional) Start TeamViewer at login
- 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:
- Open TeamViewer.
- Navigate to Extras > Options > General.
- Enable the option “Start TeamViewer with system”.
Verification
Section titled “Verification”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:
sudo systemctl status teamviewerd.serviceTroubleshooting
Section titled “Troubleshooting”If issues persist, check the system logs for more details: Command:
journalctl -xe | grep teamviewerSummary
Section titled “Summary”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.