git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Evgeny Cherpak <cherpake@me.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Gitk doesn't work on macOS Mojave
Date: Fri, 20 Jul 2018 00:11:13 +0300	[thread overview]
Message-ID: <1569C0A9-7C44-4F28-9C9B-AF2489E021AB@me.com> (raw)
In-Reply-To: <CAPig+cT+Z-hN6WidMOUW2jRVNFovvv03LEFESXpr05NKmpnWAA@mail.gmail.com>

It seems this code placed at the end of the file, after getcommits() does the trick:

if {[tk windowingsystem] eq "aqua"} { 
	set openscript [format { 
		open -a \"$(ps -p %d -o comm=)\"
	} [pid] ]
    exec osascript -e [format {
		do shell script "%s"
    } "$openscript” ]
}


> On 19 Jul 2018, at 22:12, Eric Sunshine <sunshine@sunshineco.com> wrote:
> 
> On Thu, Jul 19, 2018 at 2:48 PM Evgeny Cherpak <cherpake@me.com> wrote:
>> You have probably heard this by now already, but gitk doesn’t work on macOS 10.14 - because it uses Apple Events,
>> And apps on 10.14 require user to give them permissions to control other apps with Apple Events.
> 
> This hasn't been reported, so thanks for bringing it up.
> 
>> Here is what I get when I try running it on my machine with beta 4 installed:
>> 
>> Error in startup script: 58:102: execution error: Not authorized to send Apple events to System Events. (-1743)
>>    while executing
>> "exec osascript -e [format {
>>        tell application "System Events"
>>            set frontmost of processes whose unix id is %d to true
>>        end te..."
> 
> Fortunately, this feature is merely a convenience, not otherwise
> critical to gitk functioning. It would be ideal if someone running
> Mojave could devise up a patch to work around the problem (either by
> skipping this code on Mojave or discovering a different way to bring
> the application to the foreground). An alternative would be to revert
> 76bf6ff93e (gitk: On OSX, bring the gitk window to front, 2013-04-24),
> which introduced this code.
> 
> (Note, however, that the gitk project is dormant, so it's not clear if
> such a patch will be picked up.)


  reply	other threads:[~2018-07-19 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 18:05 Evgeny Cherpak
2018-07-19 19:12 ` Eric Sunshine
2018-07-19 21:11   ` Evgeny Cherpak [this message]
2018-07-19 21:49     ` Eric Sunshine
     [not found]       ` <BD1EAEBF-B125-4D3E-A814-F8824E5D2CA8@me.com>
     [not found]         ` <CAPig+cTRdh56VVcOGzeJmUN-L0-v2i+rCdMGxdr1FEUgfUGw4g@mail.gmail.com>
     [not found]           ` <5196A9EF-3967-4E4A-A929-58CD8BE72150@me.com>
     [not found]             ` <CAPig+cRDTMW5O1T20CnK03wWb9W8ev9q34U4P4rRk-3hrnNfGg@mail.gmail.com>
     [not found]               ` <C9089D48-5516-4EF9-9260-BADD62FA3CBD@me.com>
2018-07-20  6:25                 ` Eric Sunshine
2018-07-20  6:26                   ` Evgeny Cherpak
2018-07-24  6:51                   ` [PATCH] gitk: fix MacOS 10.14 "Mojave" crash on launch Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569C0A9-7C44-4F28-9C9B-AF2489E021AB@me.com \
    --to=cherpake@me.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    --subject='Re: Gitk doesn'\''t work on macOS Mojave' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).