Menu Close

Install Teamviewer on Rasperry Pi – Raspbian

Install Teamviewer on a Raspberry Pi

Installing TeamViewer on your Raspberry Pi may be the solution to countless headache on a headless set up. It give you a great remote access tool to control your Pi with a nice graphic desktop.

This post may contain affiliate links.  If you make a purchase I may get a commission at no cost to you.  Please see the Disclaimer for additional information.

TeamViewer, a Little Background

For those of you who do not know TeamViewer, it’s a proprietary software, distributed by the TeamViewer GmBH company, that is popular, with private home and company alike, for desktop sharing and remote access of devices. As such, It is heavily used by IT support teams and people like me, to remotely connect to servers and computers to help diagnose and resolve problem easily.

Since most Raspberry Pi are used as headless servers or headless smart devices, we will be installing the TeamViewer Host version. As such, it’s not like the standard PC and Smartphone app as it cannot connect to other clients, it is design to receive connection and act as a remote server only.

Before you Begin

As of now, the minimum requirement to install TeamViewer on a Raspberry Pi is a Raspberry Pi 2 running Jessie or any newer OS. As such, most people will be able to install TeamViewer on there Raspberry Pi, except if you have a really old Pi running somewhere.

Equipment

Raspberry Pi 2 or Newer (2, 3, 3B+ or 4)
32GB MicroSD card (if you don’t buy a Raspberry Pi kit)
Keyboard (if not using SSH)
Mouse (if not using SSH)
USB Keyboard and mouse combo (if not using SSH)
HDMI Cable (if not using SSH, Raspberry Pi 3B+ and lower)
HDMI Adapter (if not using SSH, Raspberry Pi 3B+ and lower)
Mini HDMI Cable (if not using SSH, Raspberry Pi 4)
Mini HDMI Adapter (if not using SSH, Raspberry Pi 4)
Ethernet Cable (if no Wi-Fi is availlable)
Wi-Fi Dongle (optional)
Raspberry Pi Case (optional)

Install an OS on your Raspberry Pi

If that is not already done, you need to install an OS on your Raspberry Pi. Just follow this great and easy guide on How to Install an OS on a Raspberry Pi and you will be good to go.

Update the Raspberry Pi

A good habit when installing new packages is to make sure that the package list and the installed packages are all up to date. And, this ensure a good working environment and reduces the amount of potential problems.
Simply run the following command:

sudo apt-get update 
sudo apt-get upgrade

Download the TeamViewer Package

Now that your Raspberry Pi is up to date, it’s time to download the TeamViewer Package from the TeamViewer servers.
Using the terminal window, or command line tool, it’s easy to download something with a single command.
The command to use is wget.
And we will use it to download the software installation package as a .deb file.
The .deb files are archive files designed specifically for the Debian packaging system.
As such, the .deb file contains all the necessary files for the installation of TeamViewer. Once it is downloaded, You simply navigate to the location where you want the file to be downloaded and you run the following command:

wget https://download.teamviewer.com/download/linux/teamviewer-host_armhf.deb

Install TeamViewer Package

Now that we have the TeamViewer .deb file on our Raspberry Pi, it’s time to install it by using the dpkg command. This utility is the base of the Debian package management system. As such, to install TeamViewer you simply need to run the following command:

sudo dpkg -i teamviewer-host_armhf.deb

Fix the Broken Stuff

When you run the command, you will notice that it gives off a lot of error about missing packages that you did not install.
Don’t worry, it’s easy to fix.
The Debian package manager system is made to handle these type of occurrences and it can repair those broken install errors.
As such, the package manager system apt will automatically detect the missing packages and will download, or at least attempt to, the latest versions of those packages. The command is as follow:

sudo apt --fix-broken install

Voilà! You only need to sit back and enjoy the ease of using the package manager.

Once the package manage completes it’s task, TeamViewer will up and running your Raspberry Pi! Congratulation! The way TeamViewer is set up, it will start automatically on boot.

Additionally, if you are running the Raspbian Lite version, with only the command line, TeamViewer would still work for you since it is set up to also share the command line screen.

Using TeamViewer on a Headless Raspberry Pi

For now, you can’t access your Raspberry Pi from a TeamViewer client, you didn’t set any password to access your server.
As such, you need to set the password using the teamviewer command line tool with the following command and replace with your password:

sudo teamviewer passwd 

Make sure that you keep your password safe and secure. It’s one of the piece of data that let anyone access your Raspbery Pi server.

Connect Using Teamviewer ID

With your password set, it’s now possible to retrieve your Pi’s TeamViewer ID. This ID is what you use to connect to the TeamViewer server that is on your Raspberry pi. As such, you retrieve the ID with the following command:

teamviewer info

This command also give the current version of the TeamViewer installation in addition of the ID. The result is of the following form:

TeamViewer                            YY.Y.YYYY (DEB)
TeamViewer ID:                      XXXXXXXXX

Don’t forget to write it down somewhere, this is the ID you need to use to connect using a TeamViewer client.

Connect using a TeamViewer Account

Otherwise, it’s possible to use a TeamViewer account, that you need to create, to connect to your Raspberry Pi TemViewer server. This is the fastest and easiest method of connection but you need to setup your Pi with your account. To access the setup menu, use the following command

sudo teamviewer setup

Once the setup process starts, you will need to accept and agree to TeamViewer’s Terms and Condition and you will need to enter your TeamViewer account credentials.
Again, by giving your Raspberry Pi TeamViever server access to your account details, it allows you to connect to it using any TeamViewer interface using your account.

Framebuffer Issues

The following error might come up after the sudo teamviewer setup for raspbian buster on a Raspberry Pi 4:

The frambuffer console seems to be unavaillable or has the wrong format. For connection to framebuffer console to work please make sure dant /dev/fb0 is accessible and configured to at least 16-bit depth.

If that happens to you, the fix is quite simple. Open up the config file in the boot directory and enable the TV out option. To do that :

Sudo nano /boot/config.txt

# Add in the [rpi4] section
Enable_tvout=1

Your Are Ready To Go

There you go, you are now ready to use TeamViewer to access your Raspberry Pi remotely from anywhere in the world!
It allows you to perform any activities you would normally be able to do using a monitor!
Go ahead and start to play with your Pi!

Enjoyed this post?

Follow us on Pinterest for additional awesome ideas!​

Some posts on this blog contain affiliate links.
At no additional charge to you, I receive a small commission whenever a product is purchased through these links. The Dreaming Dad is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.