If you use lynx to browse the World Wide Web, you probably never thought about installing TeamViewer on a headless Linux server. But if you’re more used to the convenience of a graphical user interface, you might have thought about (or dreamed of) administering your servers with TeamViewer.
Maybe you have even tried it. The first problem you may have encountered is that Linux servers often don’t have any graphical user interface installed by default.
Of course, you know how to solve that. Just grab the packages of your favorite desktop environment and then start it… oh wait, what? X does not start? Complaining about the absence of a screen? Bummer.
Sure, you can solve that, too. Or just start some virtual X (Xvfb). But… still no success… something is still not working properly… Giving up. Been there? Sit back…
TeamViewer 11 for Linux introduces headless support — the industry’s first professional, easy remote access to headless Linux systems.
TeamViewer Headless Linux support takes you directly to the terminal – also known as command line, shell, console or VT (virtual terminal).
Once the simple setup is done, headless remote access is only a double-click away.
Handpicked related content:
Defining some terms
Let’s first define some terms, just to make sure we’re talking about the same stuff…
The Desktop Environment is the graphical user interface (X server with KDE, Gnome, Unity…) where applications run.
A Virtual Terminal (VT) provides an interface for the user to log in and work. You can switch between VTs using the Ctrl+Alt+Fx shortcuts. They are usually text based.
The graphical desktop environment traditionally runs on VT7 (Ctrl+Alt+F7). I will refer to this as GVT. Before Version 11, TeamViewer could only be used on the GVT.
A framebuffer terminal (or console) is a pixel-based terminal, unlike the traditional character-based terminal. Today, most distributions use a framebuffer console by default. It uses colored output and can display a penguin when booting the computer.
A framebuffer pixel-based terminal also allows higher resolutions than the traditional 80×25 characters in text mode. In this article, I will refer to a framebuffer as VT.
You can leave your head on
With headless support enabled, remote control connections will take you to the active VT. The active VT is the one that you see on the monitor — or would see, if one was attached.
This can also be the GVT. And is different from, say, ssh connections. They emulate a VT that only lives as long as the connection. TeamViewer connects to the active VT on the system – if you connect again, it will still have the contents, including command history, that you saw before.
Another difference (compared to ssh connections) is that the resolution is that of the VT. If a monitor is attached, it is usually the native resolution of the screen.
On a truly headless machine you may want to change the resolution of the framebuffer. This is beyond the scope of this introduction, but if you feel adventurous, you can have a look at kernel mode setting and setting the resolution in text consoles as a starting point.
If you’re curious as to which VT you‘re currently on, try fgconsole. Just after booting you’ll most likely be on VT1, if no X server is running on VT7.
Handpicked related content:
To reiterate: You will always be taken to the active VT (the thing you switch using Ctrl+Alt+F1…F12). So, you will always see what the user in front of the Linux box sees. Or what he would see, if a screen were attached.
Conversely, that user (if present) will also see what you do. You can’t connect to a VT if a user is active on the GVT.
There is always some indication that a TeamViewer connection is running: On the GVT, you’ll always see the typical TeamViewer windows and maybe a tray icon.
On the VT, you’ll see a TeamViewer logo in the upper right corner.
Requirements and setup
To set up headless for TeamViewer, you’ll need:
- a TeamViewer account.
- your kernel has to be configured to use a framebuffer.
- you also need to be root to configure TeamViewer headless support.
After installing the TeamViewer package, just run teamviewer setup (as root) to configure it for headless use.
Setup will ask you for the credentials of your TeamViewer account and then assign your computer to that account. If you run setup again, it’ll inform you that it has already been assigned to your account.
Note that the account assignment is removed when you remove the TeamViewer package – but not when you install a TeamViewer update.
And that’s actually it. Nothing more to be done.
The machine should now appear in your Computers & Contacts list and you can connect to it by simply double-clicking on it.
Want to find out what else you can do with TeamViewer 11? Click the button below!