On 3 Jun 2012, at 18:27, Sean P. DeNigris wrote:

> 
> Mark Smith wrote
>> 
>> Marking the process as background only will remove the icon, menu etc. but
>> it will not stop us from creating that window.
>> ...
>> Anyway I'd like to keep working on this but I've hit a wall
> Are your changes publicly available anywhere?

I didn't make many changes yet. The machinery is already there but isn't 
functional.

If you set the LSBackgroundOnly key in Info.plist to YES and run headless you 
will see that the icon and menu bar are gone… only the window remains :).

With this change in place –

When the VM is not run in headless mode it it brings itself into the 
foreground. Unfortunately this cannot work the other way around because 
foreground processes cannot become background processes (we'll have to ask 
Apple why that is exactly :).

When the VM is run in headless mode it stays in the background, but our window 
will be visible.


If we can change the VM such that no window is created in headless mode then 
everything should function as we expect. That's where I get lost.  The obvious 
thing to try (which I tried ;) is to not create a window, but then the VM 
doesn't start and the application just exits [normally]. I have no idea why 
starting the VM would have anything to do with the creation of a window but 
this seem to be the case.


That said Mac applications aren't exactly friendly to headless operation. That 
is that they're sort-of-intended to be graphical.

The other solution would be to make a headless VM, similar in operation to 
perl/python/ruby... which is really what we want. 

I think ;).

> --
> View this message in context: 
> http://forum.world.st/Some-steps-towards-headless-on-OS-X-tp4633047p4633048.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
> 


Reply via email to