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:
screen export DISPLAY=":0.0" teamviewer6
The output should look somehow like this:
TeamViewer: 6.0.9258 Profile: /home/user (user) Desktop: 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”.