How to change default macos app launching?

33 Views Asked by At

In the question about Chromium-ghost sync was answer about lunching app via terminal like "/Applications/Chromium.app/Contents/MacOS/Chromium" and this launching work wish sync when launching via simple click to Chromium.app don't work.

What the reason of different application behavior? And how I can set to the app to launching like command "/Applications/Chromium.app/Contents/MacOS/Chromium" when I just click to Chromium.app in macbook?

upd I tried to create additional app via applescript and if I run script

tell application "Terminal"
    activate
    do script "/Applications/Chromium-Gost.app/Contents/MacOS/Chromium-Gost"
end tell

it run successful, but if i run script without Terminal it launch without sync

do shell script "/Applications/Chromium-Gost.app/Contents/MacOS/Chromium-Gost"
1

There are 1 best solutions below

0
Jean-Baptiste Yunès On

You must not run an application like this, I mean by referring directly its executable path.

Use launch (AppleScript) command with the application name or use Terminal open -a Chromium-Ghost. Both are commands to run an application as if clicking on its icon.

Clicking on an application icon does some over things than simply running the executable.