I wanted to launch a GUI Application as a User Agent in Macos, but I m not sure about the right way of doing it. I m aware of 2 ways and wanted to know which should be used and why?
Note: The LaunchGUI.sh is script which uses the 'open' command to launch the GUI .app bundle.
From the Apple man page:
Program <string>.
This key maps to the first argument of execv(3) and indicates the absolute path to the executable for the job.
Means you have to specify the path to a shell script or UNIX executable, in case of an application (bundle) the file in ./Contents/MacOS
.
If you want to launch an application by its bundle path use /usr/bin/open
with the -a
or -W
flag.