19

When I'm loading gitk I get an error ->

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. Any ideas on how to fix this?

Jhalaa Chinoy
  • 497
  • 5
  • 14
  • Make sure you have XQuartz installed (it's been a long time since I did so I have forgotten how to do it and/or check for it). – torek Nov 01 '18 at 17:41

2 Answers2

29

There is relevant information about this in an older issue: Applescript fails with error (-600) when launched over ssh on Mavericks

People has reported to solved this by either restarting the machine or killing "System Events".

$ kill -9 $(pgrep "System Events")
Baleato
  • 849
  • 9
  • 19
0

The accepted solution did not work for me. The pgrep came back empty, so I got a usage error for 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.

22degrees
  • 596
  • 4
  • 11