Hi.
I played with such idea few month ago. And it was worked.
I use this script on Mac:
./pharo Pharo6... eval --no-quit "Author useAuthor: 'test' during: [ OSWindowWorldMorph new open]"
where "pharo" was script for headless run.
Maybe Author do not need anymore. There was issue around it.
I think your error (libSDL2 not found error) not depends on headless mode. And it would be same if you open external window from normal pharo UI. Try it in playground.