我如何知道 teamviewer 是否成功执行并获取会话 ID 和密码?
我正在尝试在无头 ubuntu 操作系统中运行 TeamViewer。该操作系统作为 amazon ec2 AMI 运行,因此我无法对其进行物理访问。目前,我只需在 ssh 中输入命令“teamviewer”,我得到的唯一输出如下:
TeamViewer:6.0.9258
配置文件:/home/ubuntu (ubuntu)
桌面:
没有可用的 LSB 模块。
发行商 ID:Ubuntu
描述:Ubuntu 10.04.3 LTS
发布:10.04
代号:清醒
正在检查设置...
正在启动 c:\Program Files\TeamViewer\Version6\TeamViewer.exe...
启动成功吗?如果是这样,我如何知道会话 ID 和密码,以便我可以从另一台计算机连接到它?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您有一个正在运行的 X 服务器(或 Xvfb)并且 DISPLAY 和 XAUTHORITY 设置正确,TeamViewer 应该启动。
cat ~/.teamviewer/7/logfiles/TeamViewer7_Logfile.log | grep '^ID:' 将为您提供 ID,但在第一次启动时不起作用。 (日志文件符号链接是在第二次启动时创建的)。当然你也可以通过日志文件来查看是否正常启动。 Wine 问题会记录到
~/.teamviewer/7/logfiles/winelog
)要获取 ID 和密码,截图确实是最简单的解决方案。与上面一样,DISPLAY 和 Xauthority 必须正确设置。然后,
就可以了。
[编辑]
在 TeamViewer 8 及更高版本中,不需要屏幕截图技巧。
从命令行可以设置密码并打印 ID
看:
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,
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:
只是一个一般策略的想法:
您可以尝试在进程列表中查找 wine TeamViewer.exe 的 ProcessID,截取属于该进程的窗口的屏幕截图,将其保存到具有您选择的文件名的图像中,然后然后下载该图像。
人们尝试过做类似的事情(但在这种情况下不是使用 teamviewer,而是在 Windows 上)。
如何从窗口的进程句柄获取窗口的 HWND?
Just an idea for a general strategy:
You could try to grep the process-list for the ProcessID of wine TeamViewer.exe, take a screenshot of the window belonging to that process, save it to an image with a filename of your choice, and then download that image.
People have attempted to do similar things, (but in this case not with teamviewer, and on windows).
How to get window's HWND from it's process handle?
如果 xorg 未运行,teamviewer 将无法工作。
teamviewer doesn't work if xorg is not running.