Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i know if teamviewer executed successfully and get the session id and password?

I am trying to run TeamViewer in a headless ubuntu OS. The OS is running as amazon ec2 AMI so I have no physical access to it. Currently, I just type the command "teamviewer" in ssh and the only output I get is something like:

TeamViewer: 6.0.9258

Profile: /home/ubuntu (ubuntu)

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 Files\TeamViewer\Version6\TeamViewer.exe...

Did it launch successfully? If so, how can I know the session id and password so that I can connect to it from another machine?

like image 728
PJ. Avatar asked Aug 06 '11 16:08

PJ.


1 Answers

Given that you have a running X server (or Xvfb) and DISPLAY and XAUTHORITY are set properly, TeamViewer should start.

cat ~/.teamviewer/7/logfiles/TeamViewer7_Logfile.log | grep '^ID:' will give you the ID, but does not work on the first start. (The logfile symlink is created on the second launch). Of course you can also use the logfile to see if it started up properly. Wine problems are logged to ~/.teamviewer/7/logfiles/winelog)

To get ID and password, taking a screenshot really is the simplest solution. Like above, DISPLAY and Xauthority must be properly set. Then,

xwd -name TeamViewer | xwdtopnm | pnmtopng > tvscreen.png

will do the trick.

[Edit]

In TeamViewer 8 and above, the screenshot trick is not needed. From the command line, a password can be set and the ID can be printed See:

teamviewer --help
teamviewer --info
teamviewer --passwd [PASSWD]
like image 177
Daniel S Avatar answered Oct 03 '22 07:10

Daniel S