<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px">Hello there,</span><br><div class="gmail_quote"><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">

<br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">For a long time, Pharaoers and Squakers have been asking for headless support in the Cocoa VMs just as we have with Carbon VMs. Carbon is becoming a legacy framework so people needed this. </div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
I wanted to thanks <a href="http://www.square-i.net/" style="color:rgb(17,85,204)" target="_blank">Square [i] International</a> for sponsoring me to implement such a support. Not only have they sponsored the development but they have also agreed to release it under MIT license for the community. This headless support will be included in the official Pharo VM and will be, therefore, accessible to everybody.</div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
The project is not yet finished but I do have a demo/prototype that I wanted to share with you so that you can test it and give me feedback. This VM should only work starting at OSX 10.6.</div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">





<br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><b style="text-decoration:underline">How to use it?</b>  Basically it works this way: to have headless, just edit the Info.plist and set the flag LSBackgroundOnly to 1 (add the key if it is not present):</div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
 &lt;key&gt;LSBackgroundOnly&lt;/key&gt;</div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"> &lt;true/&gt;</div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">





<br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">When doing this, you don&#39;t even need the -headless anymore since, setting LSBackgroundOnly to 1, will cause the same effect (being the flag almost mandatory). If you don&#39;t want headless, put it to false or don&#39;t even put the key. If you don&#39;t set LSBackgroundOnly to 1 but send -headless, the VM will still be headless but you will see a little flash. If this flash bothers you, then set the flag. I am trying to get a way to avoid the &quot;flash&quot; while also avoiding to set LSBackgroundOnly to 1, but I still couldn&#39;t find it. Anyway, I think we can live with the current situation. </div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"> </div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
<u><b>How to test it?</b></u> You should run the image with something like RFB or Seaside or whatever you can and then confirm if it is working even if you are headless. As a matter of testing, I saved an image with seaside running in the port 5555. You can get both, this Seaside image and the VM with headless from: <a href="https://www.dropbox.com/sh/r7qk49bxywk2xce/6N7-fdyx6V" style="color:rgb(17,85,204)" target="_blank">https://www.dropbox.com/sh/r7qk49bxywk2xce/6N7-fdyx6V</a></div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">So if you run the VM headless with that image and go to localhost:5555, you should see that Seaside is running. </div>
<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">  </div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
I would appreciate if you can test it. And please let me know in which version of OSX you tried. Of course, the more of you who can test it, the better. Notice that this VM was compiled with LLVM GCC 4.2 and it may have some problems in older OSX versions (but I think it shouldn&#39;t). I still couldn&#39;t compile a VM with GNU GCC 4.2 as I get a crash :(</div>




<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
 </div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><u><b>Expected results?</b></u>  In headless mode, anything should be displayed (no window, no menu, no item in the dock and nothing appear when switching apps). When running headfull, everything should be normal.</div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
<b><u>Where is the code?</u> </b>The code I have modified to the VM is committed to my own fork of the VM: <a href="https://gitorious.org/~marianopeck/cogvm/marianopecks-blessed" style="color:rgb(17,85,204)" target="_blank">https://gitorious.org/~marianopeck/cogvm/marianopecks-blessed</a></div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">Once the code is ready, I will do a pull request so that it can be integrated. </div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">





<br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">Thanks everyone for the testing and feedback. Once again, thanks Square [i] International for sponsoring this great feature. Also thanks Esteban Lorenzano and Mark Smith for their incredible help.</div>




<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">This was just the first prototype. I will keep you informed about possible progress.   </div>





<div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13.333333969116211px;font-family:arial,sans-serif">
Best regards,</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
</font></span></div><br><br clear="all"><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>