我如何知道 teamviewer 是否成功执行并获取会话 ID 和密码?

发布于 2024-11-28 06:25:48 字数 507 浏览 1 评论 0原文

我正在尝试在无头 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

豆芽 2024-12-05 06:25:48

如果您有一个正在运行的 X 服务器(或 Xvfb)并且 DISPLAY 和 XAUTHORITY 设置正确,TeamViewer 应该启动。

cat ~/.teamviewer/7/logfiles/TeamViewer7_Logfile.log | grep '^ID:' 将为您提供 ID,但在第一次启动时不起作用。 (日志文件符号链接是在第二次启动时创建的)。当然你也可以通过日志文件来查看是否正常启动。 Wine 问题会记录到~/.teamviewer/7/logfiles/winelog

要获取 ID 和密码,截图确实是最简单的解决方案。与上面一样,DISPLAY 和 Xauthority 必须正确设置。然后,

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

就可以了。

[编辑]

在 TeamViewer 8 及更高版本中,不需要屏幕截图技巧。
从命令行可以设置密码并打印 ID
看:

teamviewer --help
teamviewer --info
teamviewer --passwd [PASSWD]

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]
单挑你×的.吻 2024-12-05 06:25:48

只是一个一般策略的想法:

您可以尝试在进程列表中查找 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?

不必了 2024-12-05 06:25:48

如果 xorg 未运行,teamviewer 将无法工作。

teamviewer doesn't work if xorg is not running.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文