# Open-in-Terminal from desktop and some other bugs ?

**URL:** <https://community.folivora.ai/t/open-in-terminal-from-desktop-and-some-other-bugs/39171>\
**Category:** Configuration Help & General Discussion\
**Tags:** scripting, finder\
**Created:** [September 15, 2024, 1:05pm UTC](https://community.folivora.ai/t/open-in-terminal-from-desktop-and-some-other-bugs/39171 "2024-09-15T13:05:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunnysigara](https://community.folivora.ai/user_avatar/community.folivora.ai/sunnysigara/32/31773_2.png) [@sunnysigara](https://community.folivora.ai/u/sunnysigara)\
**Post date:** [September 15, 2024, 1:05pm UTC](https://community.folivora.ai/t/open-in-terminal-from-desktop-and-some-other-bugs/39171/1 "2024-09-15T13:05:17Z")

</div>

BTT version: 4.639  
MacOS: Ventura

* * *

**First**

BTT put a new line at the end of `visible_window_list` which is not easily discoverable from GUI. I only discovered it running javascript. And if you don't include the new line it won't match.

 ![BTT-Elements-ends-with-new-line2](https://community.folivora.ai/uploads/default/original/3X/2/2/22203944532625db7c15031057c0915d8f9e7853.png)

 ![BTT-Elements-ends-with-new-line](https://community.folivora.ai/uploads/default/original/3X/6/5/65054aa5545500e8ed3212a09dc14790893d366d.png)

* * *

**2nd**

I was using finder context menu open-in-terminal from the article [here](https://maverickmac.github.io/2024-07-28/finder-context-menu-with-btt).

![Finder-Context-menu-with-BTT](https://community.folivora.ai/uploads/default/original/3X/7/a/7a7db66cede0d6b3dc373010844db917928c4837.png)

It works very well. Except when all finder window closes and then if you right click on the desktop and click `Open in Terminal`, it doesn't work. I am using **Warp** as terminal.

However `New File` (from the same article) works irrespective of any finder window visible or not.

 ![BTT-Finder-context-menu-open-in-terminal](https://community.folivora.ai/uploads/default/original/3X/4/6/467430ddec91928b143afec21ad88dc0fdd56545.png)

Of-course I can use script and run as `open -a Warp {BTTFinderContextMenuTargetPath}`, that will work, but why it doesn't work normally ?

Any idea ?

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [September 15, 2024, 1:45pm UTC](https://community.folivora.ai/t/open-in-terminal-from-desktop-and-some-other-bugs/39171/2 "2024-09-15T13:45:45Z")

</div>

> [@sunnysigara](#):
>
> visible\_window\_list

Ah, the visible\_window\_list can't/shouldn't be used for equality checks. The order of the windows is also not guaranteed and various system windows can popup there.  
Instead it's intended to be used with the "contains" check to check for specific windows.

Probably the desktop would need to be identified specifically because it behaves quite different from a scripting perspective. I'll check whether I can support this in the standard "open active / selected folder" action. When using BTTFinderContextMenuTargetPath it works without scripting Finder, thus is much more reliable.
