Running Multiple Same Applications

Hello All. I was really wondering if OSX has the ability to run the same application at the same time. Example would be like Firefox, Safari, World Of War Craft ETC... I know on a PC I can run as many instances of the same app on my PC as I needed and would like to know if this is at all possible on a MAC. Very Much appreciated for any and all intel on this subject. Please Advise...

'24 inch Intel I-Mac, Mac OS X (10.5.6)

Posted on Apr 15, 2009 9:27 AM

Reply
15 replies

Apr 16, 2009 8:41 AM in response to Brian Postow

Brian Postow wrote:
On my mac, man open doesn't say anything about opening multiple copies of the same app. It certainly doesn't say anything about opening foo.app/Contents/MacOS/foo which I'm sure is something that Apple doesn't really want us doing...


No, it's not something that Apple does not want us doing. It's something that power users know and it's part of the BSD operating system that Apple uses.
No, it's not superficial information, but it's also not hidden on purpose. BSD is a huge OS, based on Unix and there are literally tens of thousands, or more, of commands and options such as discussed herein.
Visit our Unix forum to learn more:
http://discussions.apple.com/forum.jspa?forumID=735

If you right-click textedit.app, for example, one of the options is "Show Package Contents"
If you select that option, you will see the Contents in Finder. If you select MacOS you will see the actual binary, TextEdit which is what we are discussing. Double click it and it runs in a terminal, just as we expected.
Nothing hidden, nothing arcane. All done just using Finder. Nobody, including Apple is preventing us from doing anything like this.
Remember that Leopard, like most of an iceberg, is below the surface. Knowing how to use the entirety of Leopard is important for some of us. It's fun and one never stops learning new things.

Apr 15, 2009 10:02 AM in response to SergioBarr

SergioBarr wrote:
Hello All. I was really wondering if OSX has the ability to run the same application at the same time. Example would be like Firefox, Safari, World Of War Craft ETC... I know on a PC I can run as many instances of the same app on my PC as I needed and would like to know if this is at all possible on a MAC. Very Much appreciated for any and all intel on this subject. Please Advise...


OS-X certainly has the ability to run multiple instances of an app, but the app itself must support this. Some apps will only allow a single instance to be run for technical reasons or by user license restrictions.

Apr 15, 2009 12:42 PM in response to SergioBarr

I usually do one of these methods:

1: copy the application (application.app and application copy.app) and use both;
2: use the terminal with the command "open" (try this in a terminal window: <open /Applications/TextEdit.app/Contents/MacOS/TextEdit> (without the signs) and you will see another instance of TextEdit (assuming, of course, that TextEdit is already running once. Don't use the ".app" bundle as the path since it won't work).

Apr 16, 2009 9:00 AM in response to nerowolfe

nerowolfe wrote:

If you right-click textedit.app, for example, one of the options is "Show Package Contents"


This is a NEW feature in 10.5.3 IIRC. And a feature that I am very happy with.

Remember that Leopard, like most of an iceberg, is below the surface. Knowing how to use the entirety of Leopard is important for some of us. It's fun and one never stops learning new things.




I'm not disagreeing with any of that. I'm just wondering if there is documentation on opening the actual executable files. open is NOT a standard unix command. I believe it's a mac specific thing, it doesn't exist in BSD based Ultrix, SunOS or any other unix I've used. So Apple CAN decided how it gets used, and what it does, and the documentation would have to be Apple's.

And I still want to know how applescript interacts with this feature. Because you usually just say "tell textedit.app ....." If there are two instances, which one gets the message? and where is this documented?

Also, my main point above was that your comment of "look at the man page" didn't actually answer my question.

Message was edited by: Brian Postow

Apr 16, 2009 9:27 AM in response to Brian Postow

Brian Postow wrote:
nerowolfe wrote:

If you right-click textedit.app, for example, one of the options is "Show Package Contents"


This is a NEW feature in 10.5.3 IIRC. And a feature that I am very happy with.

It came along with the first version of Leopard, 10.5.0
http://www.appletell.com/apple/comment/show-package-contents-can-now-be-a-simple -keystroke/

Remember that Leopard, like most of an iceberg, is below the surface. Knowing how to use the entirety of Leopard is important for some of us. It's fun and one never stops learning new things.




I'm not disagreeing with any of that. I'm just wondering if there is documentation on opening the actual executable files. open is NOT a standard unix command. I believe it's a mac specific thing, it doesn't exist in BSD based Ultrix, SunOS or any other unix I've used. So Apple CAN decided how it gets used, and what it does, and the documentation would have to be Apple's.

It may be Mac-specific. The man says it was introduced with NextStep.
However, the ancient 🙂 Unix command 'exec' is nearly identical and if you replace 'open' with 'exec' in my examples, you get the same result
For example:
exec /Applications/TextEdit.app/Contents/MacOS/TextEdit
runs an instance of textedit just as does 'open'
And I still want to know how applescript interacts with this feature. Because you usually just say "tell textedit.app ....." If there are two instances, which one gets the message? and where is this documented?

AppleScript is a different animal. I don't think 'tell' is a BSD item.

Also, my main point above was that your comment of "look at the man page" didn't actually answer my question.

I suggested that as a way of understanding the command, 'open' not a general tutorial on how BSD supports multiple instances of programs internally.
For example, one may not find a document describing exactly a very complex and complicated pipe command, but a good working knowledge of the OS is sufficient to create it. Same with shell programming. There are hundreds of book on dozens of programming languages, Ruby, PHP, built-in, to name a few. And there are dozens of shells. There is no one document to describe all of it.
I go back to Kernighan and Pike and Richie days, when I ran Coherent at home on an old PC and used Unix on mainframe terminals where I was consulting.

Apr 16, 2009 11:04 AM in response to nerowolfe

Ok, fair enough. I'm very familiar with unix, and when it comes to running multiple instances of bash at the same time, or more, or vi, or what have you, I have no questions.

However, I had been under the impression that things that made it to the mac layer (things in the doc) couldn't be duplicated...

and actaully, exec is actually very different from open. You can't "exec" a text file and have it open in textedit. you can't exec a .app folder.

in particular, the thing that I want documentation on is the difference between:

open /Applications/textedit.app
and
open /Applications/textedit.app/Contents/MacOS/textedit

and why if you do the first 3 times in a row, you only have one PID for textedit, but if you do the 2nd you have 3 PIDs

Apr 16, 2009 12:14 PM in response to nerowolfe

If you right-click textedit.app, for example, one of the options is "Show Package Contents"

This is a NEW feature in 10.5.3 IIRC. And a feature that I am very happy with.

It came along with the first version of Leopard, 10.5.0


This feature is not new. It dates back to 10.1 at least, I think. It is definitely much older than Tiger. The link that nerowolfe posted tells how to add a keyboard shortcut for this. But the contextual menu method has been around probably since the beginning.

Apr 16, 2009 12:21 PM in response to SergioBarr

Running multiple versions of an application is almost never necessary or useful, and can often be harmful. Applications often modify resources such as preferences and files in Applications Support. If more than one instance were open at a time, they could interfere with each other and possibly corrupt the files. Safari and Firefox, for example, can open as many windows as you want. There is no need to use separate processes.

Apr 16, 2009 12:39 PM in response to Jeffrey Jones2

Jeffrey Jones2 wrote:
Running multiple versions of an application is almost never necessary or useful, and can often be harmful. Applications often modify resources such as preferences and files in Applications Support. If more than one instance were open at a time, they could interfere with each other and possibly corrupt the files. Safari and Firefox, for example, can open as many windows as you want. There is no need to use separate processes.


If one uses fast user switching, then every app can be run in a new instance and the system is designed to support this without a problem.
Running the same app as three different users is nothing special. I seriously doubt that running the same app several times as a single user makes any difference. When you say that they could interfere with each other, you are sorely dismissing the power of BSD. If they do, then it is only because of a bug, not because running multiple instances of an app is wrong or confusing to the OS. I would like to see some evidence that running several instances of an app, whether as a separate but simultaneous user, or as a single user can present a problem.
If so, I have never experiences it. I regularly run high-powered math programs as a second user and run the same program in my own account.
BSD allows putting tasks into the background, which is the same thing. You can run multiple instances of an app in the background and continue business as usual without any problems.
BSD is a very stable system. You give it short shrift too easily, IMO
Do you have any idea how many process are spawned by kernel_task?
At this very moment I have 299 threads and 69 processes running, all in perfect harmony, in the background and I am still able to work without a problem.
Are you familiar with PIE??

Message was edited by: nerowolfe

Apr 16, 2009 1:15 PM in response to nerowolfe

Running multiple users is a different situation. Each user has his own copy of the preferences, his own Application Support folder, his own caches folder. A conventional BSD process does not use preferences the way a Mac application does. I assume the original question was about running multiple instances of Safari, etc. simultaneously +in the same login session+. Doing it in separate login sessions is not an issue. Simply launch the application in each session.

A simple thought experiment should demonstrate a potential problem. Safari will remember what web pages were open. In the event of a crash, you can use History > Reopen All Windows From Last Session. Now if you have two instances open, and one crashes, which set of "All Windows From Last Session" will prevail? As you open and close windows, and navigate to various sites, presumably both instances will be trying to keep this information up-to-date.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Running Multiple Same Applications

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.