简体   繁体   English

在 macOS 上启动 gitk 会报错 application is not running

[英]Starting gitk on macOS gives an error application is not running

When I'm loading gitk I get an error ->当我加载 gitk 时出现错误 ->

Error in startup script: 58:102: execution error: System Events got an error: Application isn’t running. (-600)
    while executing
"exec osascript -e [format {
        tell application "System Events"
            set frontmost of processes whose unix id is %d to true
        end te..."
    invoked from within
"if {[tk windowingsystem] eq "aqua"} {
    exec osascript -e [format {
        tell application "System Events"
            set frontmost of processes ..."
    (file "/usr/local/bin/gitk" line 12212)

My git version is 2.17.1 and my mac os version is 10.13.6.我的git版本是2.17.1,我的mac os版本是10.13.6。 Any ideas on how to fix this?有想法该怎么解决这个吗?

There is relevant information about this in an older issue: Applescript fails with error (-600) when launched over ssh on Mavericks 在较旧的问题中有与此相关的信息: 当在Mavericks上通过ssh启动Applescript时,它将失败,并显示错误(-600)

People has reported to solved this by either restarting the machine or killing "System Events". 人们报告通过重新启动计算机或取消“系统事件”来解决此问题。

$ kill -9 $(pgrep "System Events")

The accepted solution did not work for me.公认的解决方案对我不起作用。 The pgrep came back empty, so I got a usage error for kill. pgrep 返回是空的,所以我得到了 kill 的使用错误。 This is because System Events wasn't running at all!这是因为系统事件根本没有运行! A great mystery!一个巨大的谜团!

To start System Events if it's not running:如果系统事件未运行,则启动它:

open /System/Library/CoreServices/System\ Events.app/

Now gitk works as expected.现在gitk按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM