Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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. –  Iain Dawson 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.