Run several instances of an application -use a script.

When you open an application via the GUI, OS X checks that it isn’t open already to keep you from simultaneously opening several instances of it. However, it is possible to achieve this through the Terminal:

1. Open Terminal
2. Enter “cd /Applications/<name of application>.app/Contents/MacOs
3. Enter “./<name of application> &

You can do that as many times as you want, and you’ll be able to run almost independent instances of the application -you can quit Terminal and the applications will continue to run. This is useful when you have an application that only lets you log in with one account, and you want to use two at the same time, or when you have an application that doesn’t support several files open at the same time -GarageBand comes to mind.

We can even write a script to do this automatically:

echo “Enter the name of an Application”
read app
cd /Applications/$app.app/Contents/MacOs
./$app &

–> App.command-1.zip (you might have to make it executable with “chmod 777 App.command“)

You should keep in mind, though: the way applications will behave depends on how re-entrant the application in question is. Some might behave unpredictably.

Technorati Tags: , ,


 
 

Post a comment to "Run several instances of an application -use a script."



Support MacTips

MacTips Newsletter


Random Popular Tips

Recent Comments

Recent Discussions

MacTips Poll

What level of tips would you like to see?

View Results

Loading ... Loading ...

Friends of MacTips

Subscribe to MacTips

Site Links