Running multiple images on Intel Mac

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Running multiple images on Intel Mac

Mike Hales
For the life of me, I can't get my Intel Mac to launch 2 instances of  
the same image.  No matter what method I try, double click the image,  
drag the image, command prompt, shell script, it just raises the  
first one that is already running.  So far I've only been able to  
launch the aqua vm for one, and the X11 vm for the other to get them  
going.  Anybody know how to fix this?

Thanks,

Mike

Reply | Threaded
Open this post in threaded view
|

Re: Running multiple images on Intel Mac

Roger Whitney
The same thing happens on PPC Mac. I solved the problem on PPC Macs  
by duplicating the VM and use a different VM for each image. (Drop  
the image on each VM or right click on the image and use the "open  
with..." option. You will want to use copies of the image also so  
your .cha files remain correct.

On Mar 9, 2007, at 6:14 AM, Mike Hales wrote:

> For the life of me, I can't get my Intel Mac to launch 2 instances  
> of the same image.  No matter what method I try, double click the  
> image, drag the image, command prompt, shell script, it just raises  
> the first one that is already running.  So far I've only been able  
> to launch the aqua vm for one, and the X11 vm for the other to get  
> them going.  Anybody know how to fix this?
>
> Thanks,
>
> Mike
>
>


----
Roger Whitney              Department of Computer Science
[hidden email]        San Diego State University
http://www.eli.sdsu.edu/   San Diego, CA 92182-7720
(619) 583-1978
(619) 594-3535 (office)
(619) 594-6746 (fax)

Reply | Threaded
Open this post in threaded view
|

Re: Running multiple images on Intel Mac

Dave Stevenson-2
In reply to this post by Mike Hales
Mike,

The problems may include things like stdin/stdout, copy/paste, that
weird Mac menubar thingy at the top of the screen (rather than at the
top of your windows), etc., I'm not sure. Keep the thread on the list so
others can keep contributing. You've got the sum total of my knowledge
on this topic anyway.

Dave

Mike Hales wrote:

> Dave, I have tried this, and it works, but when I do that I get really
> strange behavior when trying to opentalk between the images and my unit
> tests all fail.  When I copy the .app bundle and drag the image onto the
> origina .appl then the copied .app to start two instances, my opentalk
> tests pass and behave the way they are supposed to.  It's quite strange
> and disconcerting.  The really wierd thing is that when I use two images
> started from the shell using the X11 vm, the tests fail also.  I need to
> set up a matrix and figure out which combinations work and don't.
>
> Mike
>
> On Mar 12, 2007, at 3:10 PM, Dave Stevenson wrote:
>
>> The Mac machinery employed by the .app bundle enforces this. If you
>> launch the VM directly from a shell, rather than it's containing .app
>> bundle, you should be able to avoid that constraint. However, you
>> forfeit other niceties that the .app bundle gives you. I cannot
>> remember what they are, however.
>>
>> Dave
>>
>> Mike Hales wrote:
>>> For the life of me, I can't get my Intel Mac to launch 2 instances of
>>> the same image.  No matter what method I try, double click the image,
>>> drag the image, command prompt, shell script, it just raises the
>>> first one that is already running.  So far I've only been able to
>>> launch the aqua vm for one, and the X11 vm for the other to get them
>>> going.  Anybody know how to fix this?
>>> Thanks,
>>> Mike
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running multiple images on Intel Mac

Reinout Heeck
In reply to this post by Mike Hales


> For the life of me, I can't get my Intel Mac to launch 2 instances  
> of the same image.  No matter what method I try, double click the  
> image, drag the image, command prompt, shell script, it just raises  
> the first one that is already running.  So far I've only been able  
> to launch the aqua vm for one, and the X11 vm for the other to get  
> them going.  Anybody know how to fix this?


I found the following solution:

Use a wrapper program to launch the VM, in the launching code pass a  
special flag to tell the OS to allow multiple instances.  
Associate .im files with this .app.

I have this half-baked visualworks launcher .app I once started  
coding,  kLSLaunchNewInstance is the extra flag that does the trick  
in this snippet:

        [...]
        LSApplicationParameters  appParams;
        appParams.version=0;
        appParams.flags=kLSLaunchNewInstance | kLSLaunchDefaults;
        appParams.application=&appref;
        appParams.asyncLaunchRefCon=NULL;
        appParams.environment=environment;
        appParams.argv=NULL; // ignored since Mac OS X 10.4
        appParams.initialEvent=NULL;
       
        err=LSOpenItemsWithRole(file,1,0,NULL,&appParams,NULL,0);
  [...]



I don't know whether this flag can be set in the Info.plist of the  
Vm's .app or maybe in the header of the VM binary. Any Mac coders  
here who know?

If not Cincom could make such a wrapper in the VM.app be the default  
executable declared in the Info.plist




HTH,

Reinout
-------

Reply | Threaded
Open this post in threaded view
|

Re: Running multiple images on Intel Mac

Reinout Heeck

On Mar 17, 2007, at 1:45 PM, Reinout Heeck wrote:
>
> If not Cincom could make such a wrapper in the VM.app be the  
> default executable declared in the Info.plist

Forget that - it would require a .app inside a .app which is not  
possible AFAIK.

R
-

Reply | Threaded
Open this post in threaded view
|

Re: Running multiple images on Intel Mac

Reinout Heeck
In reply to this post by Reinout Heeck

And if you don't like coding a wrapper .app you could try this as a  
workaround:

http://scrap.dasgenie.com/articles/2005/08/26/start-it-again-mac


R
-

Reply | Threaded
Open this post in threaded view
|

Search Engine Deoptimization (Re: Running multiple images on Intel Mac)

Reinout Heeck
In reply to this post by Reinout Heeck
My apologies for the monologue but I couldn't resist:


If I do a Google search for kLSLaunchNewInstance Apple's reference  
documentation comes in as the *very last* in the results.

Now I know where to look :-(


R
-