0

I have some AppleScript, to bulk export URLs and titles of tabs from my browser.

It used to work, from iTerm (and Terminal, and Script Editor).

I keep my terminal as long-running sessions in tmux that survives application restarts.

  • It no longer works from iTerm, on a slow timeout, it returns ... got an error: Application isn’t running. (-600).

  • In Terminal, I'm prompted for "access to control" the app, and then it works.

    macOS pop-up permissions prompt: "Terminal.app" to control "Brave Browser.app", allowing docs & data access and actions within the app

  • In Script Editor, it works.

How do I re-prompt for appropriate "application control" access for iTerm? It's unclear which setting is needed. I already provide "Full Disk Access" among others. The existing approval may have started failing after an update to the OS, or after the application underwent an update.

Relatedly, can I use some System level tool to see all entitlements by application, instead of by entitlement? It's frustrating to try to guess which additional newly created permissions concepts are required to continue using scripting bridge functionality.


I've explicitly upgraded the application, still fails. In hopes of resetting the preferences entitlements-application mapping, I could delete iTerm, install it again, and see if that prompts me again.

1 Answer 1

1

Because you use a long-running tmux session, it is the parent of your shells, and calls to osascript, so it inherits the macOS security context that was used to start the long-lived tmux server.

By opening a new iTerm terminal, parent to bash without tmux intermediation, you can check the current entitlement status.

You'll need to kill your tmux server, and restart it from the new, permission-ed iTerm session (or Terminal), and it will allow osascript control of other applications.

1
  • 1
    That was exactly my problem, thanks for saving me a lot of headache! I just ran tmux kill-server and then created a new tmux session from within iTerm and everything worked fine.
    – 23tux
    Commented Mar 30, 2023 at 6:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .