Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I run another instance of the application while the application is already running, by clicking on the application icon in /Applications/?

I don't want to run it from /Applications/myapp.app/Contents/MacOS/myapp

Can I link a script file containing statements

open -n /Applications/myapp.app

or

open -n /Applications/myapp.app/Contents/MacOS/myapp

… with the application icon click?

I've tried making changes in Info.plist of the application

key-Executable file    value-myapp    

(present at /Applications/myapp.app/Contents/MacOS/myapp)

changes

key-Executable file   value-launch.sh  

(present at /Applications/myapp.app/Contents/MacOS/launch.sh)

As I know an Application Bundle on OS X can only be started once. By simply copying the bundle the same application can be launched twice.

Is there any solution for the above problem?

share|improve this question

The closest thing to a solution I can see is to create an AppleScript app that calls open -n and to use that instead. You could move the original application to somewhere other than /Applications, replace it with your new script and, if you wanted to, change the icon.

You can create such an app with osacompile -e 'do shell script "open -n /Path/To/Application.app"' -o /Path/To/New/Script.app.

share|improve this answer
    
Thanks for making me believe that it is possible. How can i link the apple script with the application Icon(Info.plist) I could move the original application to somewhere other than /Applications, replace it with your new script I can create such an app with osacompile -e 'do shell script "open -n /Path/To/Application.app"' -o /Path/To/New/Script.app The Requirement is like i want to run another instance by double clicking on the same application Icon present at /Applications/ – user1497732 Oct 6 '12 at 5:31
    
To make your script have the same icon as the application, follow these instructions with the original application and your script. – colons Oct 6 '12 at 6:29
    
Unfortunately this solution requires 2+ icons for each such app in the menu bar: One for the launcher, and one per running instance. – Daniel Beck Oct 6 '12 at 7:49
    
It is fine with changing the icon of the script, It is also fine the script will help in runninig multiple instances open -n /Applications/myapp.app I want to make it working with the application bundle(eg myapp.app) – user1497732 Oct 6 '12 at 9:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .