Headless Linux
by

Headless Linux Systems: Easy Remote Access with TeamViewer

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.

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.

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:

Let’s see…

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.

Headless2

Requirements and setup

To set up headless for TeamViewer, you’ll need:

  • 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!

 

Find out more about TeamViewer 11

Want More Like This?

Get exclusive Customer Service tips, insights and expert advice delivered straight to your inbox.

 

28 replies
    • Juulia Ruha
      Juulia Ruha says:

      Hi Touzeau,
      Thanks for the message. Can you please explain in more detail what kind of issue you are experiencing? Alternatively, you can contact directly our Support Department: http://bit.ly/1DZjHiq

  1. Chris
    Chris says:

    It would be great to see this on more than just Linux. Mac OS X could be a good example, where I would love to see the same “connect to console / terminal” functionality.

    Reply
  2. Marc
    Marc says:

    I had no problems installing it and it worked great, but after a reboot, the server shows as offline. If I run “teamviewer setup” again, it says that the computer is already connected to my account, but in the client it still shows as offline. How can I bring it back online?

    Reply
    • Doug McKerson
      Doug McKerson says:

      Hi Marc – thanks for getting in touch. Please contact our support team so they can provide assistance. Please open a support ticket including your TeamViewer log files here: http://bit.ly/1DZjHiq

  3. Bernd
    Bernd says:

    Hey there,

    thanks for TeamViewer to begin with. I’ve been using ist both personally and professionally with great success.

    However I’m trying to setup a headless workstation using KUbuntu 15.10 and TeamViewer 11. Setting up TeamViewer to start with the operating system is easy enough and works spleditly as long as you have a monitor attached to your computer. However if you want to run your workstation or server (e.g. if the server is using a GUI) headlessly you wou will encounter problems with X-Server. X-Server somehow tries to autoconfigure the grafics according to the monitor that it tries to detect automatically. If there is no monitor presen X-Server will fail to display the GUI and you’ll only see a halfway loaded X-Server console (black screen with X for mouse pointer) when accessing throughTeamViewer.

    After browsing the google oracle for some help I found out that you can somehow disable the auto-detect for the monitor by meddling with the configuration of X-Server. However I haven’t been able to find the right solution to this problem. So I’m asking you if you could provide some more information on not only configuring TeamViewer for headless support but also on how to configure Linux accordingly. Otherwise this is only halfway and not really useful since you’ll not be able to really use TeamViewer to access your headless Linux OS.

    Thanks in advance and keep up the good work!
    Cheers, Bernd

    Reply
    • Doug McKerson
      Doug McKerson says:

      Hi Bernd – thank you for your message. Just to check, have you tried to install TeamViewer on headless Linux according to the FAQ steps? http://bit.ly/1UUywtT It should work as described there.

      With the latest version of TeamViewer headless Linux installed, it is possible to switch to the console, using the key combination “Strg+Alt+F1” to switch on the first console.

      Additionally you can try to kill the X-Server: http://bit.ly/1VhmjQw to only use the console and not the gui, then try to install headless Linux version again.

      If none of those steps work, please contact our support team so they can take a closer look at this issue: http://bit.ly/1DZjHiq

  4. Erik
    Erik says:

    Hi Teamviewer Team,

    excellent feature. I just got it work on a Ubuntu 16.04.

    Three questions:

    1) Performance seems be poor. There is a significant lag between my typing and what is shown on the screen. Any idea how I can speed this up?

    2) Is is possible to set the PW on the Server? If I want to give this account to someone, it would be nice to just provide the team viewer ID + PW, however it seems this is tightly connected to my online TV account.

    3) How would I make it work with Local Lan / IP address for better performance?

    Thanks!

    Reply
  5. Fabio
    Fabio says:

    Hi,
    I’m trying to use this feature on Ubuntu SERVER 16.04 on Virtualbox but the teamviewer client (from where I try to connect) remain on initial screen with “Connection Parameters Initialization”.

    Thanks

    Reply
  6. Jean-pierre
    Jean-pierre says:

    Hi,

    Thank you for this version of TeamViewer, it’s works well when I connect to my Desktop at home, but I try to make TeamViewer 11 works on my personal Ubuntu Server 16.04 on Linode, and a the point:

    teamviewer setup

    I got:

    The framebuffer console seems to be unavailable or has the wrong format. Please make sure that /dev/fb0 is accessible and it is configured to 32-bit depth.

    I know that you wrote “your kernel has to be configured to use a framebuffer”, but I try a lot of solution on the web, and nothing works. Do you have a link where is show how to proper configure that please?

    Thank you.

    Reply
  7. Nathan
    Nathan says:

    I get a VT connection, the information shows like it’s a console that is waiting to be woken up. I hit a key and it does nothing. I can spam the keyboard with typing and nothing happens. I can try to “login” since maybe it’s just slow, but nothing.

    Reply
  8. Christopher Kooistra
    Christopher Kooistra says:

    Hey this has been really helpful thanks! I think that you should amend the original article to include how to disable the screen saver as that is an integral part of this process. My question is now that I can remote connect to my server I would like to be able to paste strings of charachters into the console but ctrl+v and ctrl+shift+v isn’t working. Do you have any suggestions on how to achieve this? Thanks

    Reply
  9. Taras
    Taras says:

    A lot of bugs. I cant manage my Linux server with this software, periodically it’s crashes and stop refreshing the screen to me.

    Reply
  10. Baskar Selvaraj
    Baskar Selvaraj says:

    Using TV12.0 on a CentOS 6.5 Server in headless.mode, works smoothly. It’s a great feature for Linux console user like me. Thank You !

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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