How to automatically start a session? With linux it's easy but with OSX ...

With linux, just use the command line:
myuser@myhost:~$ /opt/Ardour-5.10.0/bin/ardour5 Music/mysession/mysession.ardour

.

There seems to be no other way than using the command line but with OSX does not work as easily as with linux.

Obviously, the purpose is to ensure autostart without user intervention.

Is anyone who has already solved the problem in OSX?

In OSX (10.12) just double click on the session file (mysession.ardour) to open it automatically ( https://community.ardour.org/manual/startup ).

It should be possible to create a not-interactive double click equivalence for use within a script.
Maybe Automator or some other tool can be useful?

SOLVED <<<

An easier way is:

  1. create a shortcut to the ardour session file on the desktop
    $ ln -s Music/mysession/mysession.ardour Desktop/mysession.ardour

  2. place the desktop icon on the top left near the apple

  3. download and install cliclick utility ( https://www.bluem.net/en/mac/cliclick/ )

  4. to do a double click on the top left icon, run the following scriptable command:
    $ cliclick dc:5,25

IT’S NOT AN ELEGANT WAY BUT IT WORKS!

To launch Ardour on OSX from a Terminal:

ARDOUR_BUNDLED=1 /Applications/Ardour5.app/Contents/MacOS/Ardour5

You may also want to enable Preferences > General > Try to auto-launch audio/midi engine

Thanks Robin for posting this…

As always you are a font of knowledge.

This is a handy thing to aid in debugging…