如何以编程方式检测 OS X 屏幕共享何时处于活动状态?

发布于 2024-10-09 16:47:26 字数 351 浏览 0 评论 0原文

OS X 不会明显表明您可能已打开屏幕共享会话,并且它仍在主动将您的会话广播到这些其他计算机。 有人知道 Snow Leopard 在哪里存储您所在的计算机有一个开放的屏幕共享会话吗?

如果我可以每分钟左右使用 shell 脚本检测到此文件,那么我可以触发 Growl通知让我知道我基本上正在被另一台计算机监视(使用找到的代码片段 这里)。

否则,现在唯一知道的方法就是注意到屏幕右上角有一个非常小的图标,看起来像双筒望远镜(很难注意到)。

OS X does not make it obvious that you might've left a screen sharing session open -- and it's still actively broadcasting your session to these other computers. Does anyone know where Snow Leopard stores that the computer you're sitting at has an open screen sharing session?

If I could detect this file using a shell script every minute or so, then I could fire a Growl notification to let me know that I'm essentially being watched by this other computer (using the code snippet found here).

Otherwise, the only way to know now is to notice a very small icon on the top right of my screen that looks like binoculars (very hard to notice).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

池予 2024-10-16 16:47:26

一种方法是使用 lsof 检查 AppleVNCServer 是否已建立任何连接

lsof -a -i :vnc-server -sTCP:ESTABLISHED -c AppleVNCServer

One way would be to use lsof to check for any established connections by AppleVNCServer

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