为什么我无法使用ssh打开应用程序? [英] Why I can't open an application with ssh?

查看:146
本文介绍了为什么我无法使用ssh打开应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac上使用终端打开应用程序时遇到问题.我正在使用Macbook(在High Sierra 10.13.6上运行),并希望使用ssh在远程计算机上打开应用程序.此远程计算机是Imac(MacOS Catalina).

I have a problem to open an application with the Terminal on mac. I'm using a Macbook (running on High Sierra 10.13.6) and want to open an application on a remote computer using ssh. This remote computer is a Imac (MacOS Catalina).

我尝试使用以下命令行启动应用程序:

I try to launch an application using the following command line :

打开-a TeamViewer

open -a TeamViewer

但无法打开,并返回以下错误消息:

but it fails to open and returns the following error message:

对于应用程序/Applications/TeamViewer.app,LSOpenURLsWithRole()失败,错误为-610.

LSOpenURLsWithRole() failed for the application /Applications/TeamViewer.app with error -610.

有人知道如何解决此问题吗?

Does anyone have an idea of how to solve this problem ?

谢谢

推荐答案

您正试图以与当前登录用户不同的用户身份或根本没有用户登录来运行Teamviewer Gui应用程序没有权限或没有用户显示服务器可以连接.

You are attempting to run the Teamviewer Gui application, either as a different user to the currently logged in user or no user is logged in at all so the application doesn't have permission or there is no user display server to connect to.

如果您已经安装了TeamViewer,则还应该安装相应的LaunchDaemons并在计算机启动时启动服务.

If you've installed TeamViewer it should also install the appropriate LaunchDaemons and start the service when the machine starts.

/Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist

在此文件中,我找到了启动teamviewer服务的命令:

In this file I find the command to start the teamviewer service:

/Applications/TeamViewer.app/Contents/MacOS/TeamViewer_Service -Module Full

当我运行此命令时(您可能希望使其后台运行或不运行它),我可以看到服务器进程正在运行:

When I run this command (you may want to background or nohup it) I can see the server process running:

77890 ttys000    0:00.34 /Applications/TeamViewer.app/Contents/MacOS/TeamViewer_Service -Module Full

取决于在该计算机上配置teamviewer的方式.它可以侦听LAN连接和/或建立与teamviewer云服务器的连接.

Depending on how teamviewer is configured on that machine. It may listen for LAN connections and/or establish a connection to the teamviewer cloud servers.

您可以使用 netstat 或 lsof 来验证这一点.

You can use netstat or lsof to verify this.

标记

这篇关于为什么我无法使用ssh打开应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆