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:

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”.

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”.