jbtule / cdto

Finder Toolbar app to open the current directory in the Terminal
MIT License
2.31k stars 233 forks source link

2 Terminals open on OsX Mojave #34

Closed shaikh1110 closed 5 years ago

shaikh1110 commented 6 years ago

When opening cd to, expecting to open terminal at current directory it opens two terminals one with base root and second at current directory

screen shot 2018-09-29 at 11 57 33 am
dogatekin commented 6 years ago

I have the same problem. I discovered that this does not happen if you close all your terminal windows by using ⌘W.

DmitryZemlyuk commented 6 years ago

Hi. +1 with the same problem. @jbtule can we help with fixes? (send log, anything...)

grenappels commented 6 years ago

+1 I also have this problem!

jensrutschmann commented 5 years ago

I believe it happens because of this error:

Since sending application [sess=100007 pid=98033 uid:501,501,501 g:20,20 pV:396619] is not permitted to send this AppleEvent to this process, returning an errAEEventNotPermitted reply.

I see this in the event log / console every time I click the cdto icon in Finder.

Also see https://trac.cyberduck.io/ticket/10475#comment:3

If you build your app with the 10.14 SDK, the NSAppleEventsUsageDescription key is required. If it is not provided, trying to send an AppleEvent to another, running app will always return error errAEEventNotPermitted (-1743). The key is only optional when using older SDKs.

huti26 commented 5 years ago

The issue only occurs when you quit Terminal using ⌘Q. If you dont actually quit the application, it should still work.

rterrabh commented 5 years ago

I have the same issue in Mac OS 10.14.3.

If terminal is not "active" (open or running without any windows), cd to works perfectly.

However, I always use ⌘Q and two windows are annoying me. Is there any perspective to fix this issue? I can help you @jbtule testing if you want to.

williamaeberhard commented 5 years ago

Same here with Mac OS 10.14.3. I confirm that cdto creates that second window only when Terminal has been completely closed beforehand (not running in background). To be clear, one window opens at the default directory (~ for me) and the second one opens wherever cdto was executed from.

jakevossen5 commented 5 years ago

Confirming this still exists on 10.14.4 (18E226)

gingerbeardman commented 5 years ago

To resolve the 2 window thing (a problem in High Sierra as well as Mojave)

I now use https://github.com/Ji4n1ng/OpenInTerminal (Lite version)

dogatekin commented 5 years ago

Hey thanks for letting us know, that's great!

jbtule commented 5 years ago

Enable this setting

defaults write name.tuley.jay.cd-to cdto-close-default-window -bool true

And use v3.1 and cd to will now attempt to close the 2nd window. https://github.com/jbtule/cdto/releases/tag/v3.1