AppleScript的失败,当小牛推出通过ssh错误(-600) [英] Applescript fails with error (-600) when launched over ssh on Mavericks

查看:315
本文介绍了AppleScript的失败,当小牛推出通过ssh错误(-600)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图寻找这一点,看到别人有类似的问题,但似乎并没有在任何地方都找到了答案......

I've tried searching for this, and have seen others with similar problems but don't seem to have found an answer anywhere....

我有我尝试运行通过SSH,这样我可以远程控制我的Mac的AppleScript。这工作previously与OSX 10.8,但似乎不再因为升级到10.9上班。

I have an AppleScript that I am trying to run over ssh so that I can remotely control my mac. This has worked previously with OSX 10.8 but no longer seems to work since upgrading to 10.9.

我执行的命令是:

ssh <user>@mymac.local "osascript -e 'tell application \"iTunes\" to play'"


  • 所以SSH会话正确打开我已经设置了RSA密钥

  • 我连接相同的用户认为Mac当前登录和下运行

  • iTunes是在Mac上运行与该用户当时的脚本启动

  • 该脚本失败,回来有:

    execution error: iTunes got an error: Application isn’t running. (-600)
    

    同样,一个数字,我有previously一直使用还有其他脚本似乎现在可以在10.9具有相同的错误打破,因此这似乎是它的运行通过SSH进行相关的事实,而不是问题与iTunes或特定的应用程序。

    Similarly, a number of other scripts that I had previously been using also seem to now be broken on 10.9 with the same error, so this seems to be related to the fact that it's running over ssh, rather than an issue with iTunes or a specific application.

    我已经试过包装的AppleScript的应用,节省了他们在远程Mac上,然后从一个SSH会话中打开它们,但是这也失败:

    I've tried packaging the applescripts as applications, saving them on the remote Mac, and then opening them from within an ssh session, but this also fails:

    ssh <user>@mymac.local
    open "~/Desktop/Play Music.app"
    

    (其中播放Music.app')是导出为一个应用程序的AppleScript)。

    (Where 'Play Music.app') is an applescript exported as an app).

    这并不SSH会话内报告错误,但出现在远程MAC的AppleScript对话框:

    This does not report an error within the ssh session, but an applescript dialog appears on the remote mac:

    我也有被安排与我的Mac上的crontab几个脚本,并且由于升级这些也失败了。

    I also have several scripts that were scheduled with crontab on my Mac, and these are also failing since upgrading.

    我认为这是某种形式的安全性变化作为小牛队的一部分,但我似乎无法找到一个办法让它重新工作。没有人有任何解决这个?

    I assume this is some sort of security change as part of Mavericks, but I can't seem to find a way to make it work again. Does anyone have any solutions to this?

    推荐答案

    应用程序没有运行(-600)是<一个href=\"https://developer.apple.com/library/mac/documentation/applescript/conceptual/applescriptlangguide/reference/ASLR_error_$c$cs.html\">operating系统错误。

    这是操作系统错误时发生的AppleScript或错误
      一个应用程序从Mac OS请求服务。他们是罕见的,
      经常有什么可以在脚本中对他们做,除了
      他们报告

    An operating system error is an error that occurs when AppleScript or an application requests services from the Mac OS. They are rare, and often there is nothing you can do about them in a script, other than report them.

    这篇关于AppleScript的失败,当小牛推出通过ssh错误(-600)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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