Starting Teamviewer6 on Linux via SSH

Update: Added information on how to close screen without loosing Teamviewer.

Teamviewer is a remote desktop solution comparable to VNC. However, a significant difference is that Teamviewer offers a central server which allows to traverse NAT and also control PCs that are usually not reachable from the outside. What sounds like a security risk is actually quite handy in certain situations.

Running Teamviewer on Linux appears to be a pain, mainly because there is no real Linux version of Teamviewer. It has to be run in WINE in order to work (Teamviewer has packages that do this automagically). Although this may sound like a stupid solution, it works quite ok in practice.

However, if someone on the remote host running Linux accidentally kills the Teamviewer process, you are screwed. If you still have SSH access to the machine, you can however restart Teamviewer with the following commands:

export DISPLAY=":0.0"

The output should look somehow like this:

TeamViewer: 6.0.9258
Profile: /home/user (user)
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04.3 LTS
Release:	10.04
Codename:	lucid

Checking setup...
Launching c:Program FilesTeamViewerVersion6TeamViewer.exe...

Starting teamviewer in a screen will make the process survive, even when your SSH connection dies. Now either simply close the terminal window or detach the screen session. Do not exit screen by typing “exit” since that would kill TeamViewer as well. Detaching can be done by hitting CTRL+A and then “d”.


  1. Mohamed


    Thanks for this article, but after this:
    Checking setup…
    Launching c:Program FilesTeamViewerVersion6TeamViewer.exe…

    it stay blocked .

    Also the command “screen” doesn’t work

    I have Centos 6/64bit

    Can you tell me please, how can I get the ID and pass ??


  2. Mikhail Gaev

    it is realy helpful!!

  3. Reghard


    It worked perfectly for me.


  4. Gelber

    Thanks a lot. It worked perfectly for me.

  5. scott

    Thank you!!

  6. Alan

    This works flawlessly for me, except that when the SSH terminal is closed, Teamviewer also is

    1. admin

      Screen should actually prevent that. Are you closing the terminal by typing “exit”? If so, you are closing screen as well and it cannot do its job. You can “detach” the current session by hitting “CTRL+a and then d”. Then you quit the terminal by typing in “exit”.


Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.