Page 1 of 1

Running SS as an Agent in OSX tri tue tre em

Posted: Tue Mar 26, 2019 3:57 am
by bacsithoa
So, I've had my SheepShaver running in an app bundle for a wrapper project I've been working on. I've come across a problem that I cannot seem to fix.

The ultimate goal is to have OSX set SheepShaver to invisible while booting, and make it visible when the startup application has been launched. I've already built the tools to make OS9 issue commands to a host-side OSX script that changes the visibility when the application launches.

The main problem I'm having is that I can't get SheepShaver to run as an agent accessory which hides the dock icon. If the dock icon is clicked, it automatically gives visibility back to SS which is an issue.

There is an Info.plist attribute called LSUIElement which will launch an application as an accessory. Meaning it will not show up in the doc or task manager, but windows will still have visibility if they are marked as visible in system events.

However, to the best of my attempts after several hours moving it around and delving into the info.plist, it still does not make the dock icon disappear. Is there anything in SS that is overriding this? Does anyone have an idea?

Re: Running SS as an Agent in OSX tri tue tre em

Posted: Tue Mar 26, 2019 3:55 pm
by adespoton
I've fought with this one myself; I seem to recall one method I used to make it work was to run the SheepShaver MachO via the terminal with the LSUI flag instead of launching via the Finder. The wrapper I used to do that used the LSUI plist entry and stayed hidden just fine.

Re: Running SS as an Agent in OSX tri tue tre em

Posted: Tue Mar 26, 2019 9:03 pm
by emendelson
How do you set the LSUIelement flag when launching an executable from the terminal????

Re: Running SS as an Agent in OSX tri tue tre em

Posted: Tue Mar 26, 2019 11:10 pm
by adespoton
Hmm; can't find the method I used now. But I did find this:
https://discussions.apple.com/thread/140891

It suggests that if you're using an applescript to launch an app, you may need to call lsregister to get LSUIelement to be properly recognized in some situations.