git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Gitk doesn't work on macOS Mojave

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 20, 2018, 06:25 UTC
Message-ID
<CAPig+cTJvJLMe4CFOb-yxqwF4udvs4G-BUiT=Kp-NZcfAWAyiQ@mail.gmail.com>
In-Reply-To
<C9089D48-5516-4EF9-9260-BADD62FA3CBD@me.com>
[re-adding cc:git]
On Fri, Jul 20, 2018 at 12:38 AM Evgeny Cherpak <cherpake@me.com> wrote:
Show 18 quoted lines
> > On 20 Jul 2018, at 7:30, Eric Sunshine <sunshine@sunshineco.com> wrote:
> >
> > On Fri, Jul 20, 2018 at 12:11 AM Evgeny Cherpak <cherpake@me.com> wrote:
> >> Not sure what you referring to?
> >> Is it alternative to gitk? How I install it?
> >
> > This: https://git-scm.com/docs/git-gui
> >
> > It's not an alternative to gitk, but complements it by providing
> > ability to stage and create commits, show blame information
> > graphically, etc.
> >
> > It's a standard part of the Git distribution, although it may not be
> > installed by default, depending upon your platform and the packager.
> > Some Linux distributions, for instance, may place it in a separate
> > package for installation (named "git-gui" or something).
>
> Just tried it - it works, but doesn't get focus.

Looking more closely, the code in "git gui" is catching and silently ignoring errors:

    ## On Mac, bring the current Wish process window to front
    if {[tk windowingsystem] eq "aqua"} {
        catch {
            exec osascript -e [format {
                tell application "System Events"
                    set frontmost of processes whose unix id is %d to true
                end tell
            } [pid]]
        }
    }

which explains why you don't see the "Not authorized to send Apple events" error you see with gitk, and also explains why the application doesn't get focus.

So, updating gitk to mirror git-gui might be one way forward.
Previous: Eric SunshineNext: Evgeny Cherpak
Message 5 of 7 in “Gitk doesn't work on macOS Mojave”
  1. Evgeny CherpakJul 19, 2018
  2. Eric SunshineJul 19, 2018
  3. Evgeny CherpakJul 19, 2018
  4. Eric SunshineJul 19, 2018
  5. Eric SunshineJul 20, 2018
  6. Evgeny CherpakJul 20, 2018
  7. gitk: fix MacOS 10.14 "Mojave" crash on launchEric Sunshine, Jul 24, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.