Running SS as an Agent in OSX tri tue tre em

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
bacsithoa
Space Cadet
Posts: 1
Joined: Tue Mar 26, 2019 3:52 am

Running SS as an Agent in OSX tri tue tre em

Post 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?
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

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

Post 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.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

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

Post by emendelson »

How do you set the LSUIelement flag when launching an executable from the terminal????
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

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

Post 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.
Post Reply