How To Open Two Instances Of An Application In OS X

How To Open Two Instances Of An Application In OS X

Whether you want to look at two PDF pages side-by-side or you want two Twitter accounts open at once, sometimes OS X requires a separate instance of an application to be open. Here’s how to do it with a simple Terminal command.

Say you want to look at two PDF pages side-by-side. If they’re in the same PDF, OS X won’t let you open the PDF twice — it’ll just direct you to the first instance of the open file. The open command, however, will let you open two instances of most programs with the -n parameter. So, to open two instances of the same PDF, just double-click on the PDF to open the first instance, then run:

open -n “path/to/file.pdf”

to open the second one in Preview. Of course, replace path/to/file.pdf with the path to the file you want to open. It will open up in a new instance of Preview, with its own dock icon and everything.

This will actually work with a number of programs (not iTunes though, apparently), and if you want to do it often, Macworld suggests turning it into an Automator service. I had a bit of trouble getting Macworld’s code to work, so I tweaked it to something that worked for me, using an AppleScript. We’ve shown you how to use Automator before, so just open it up, create a new service that accepts any type of file from the Finder, and add the Run AppleScript action with the following code in the box:

on run {input, parameters}

set input1 to quoted form of POSIX path of input
do shell script “open -n ” & input1

end run

Your service should look like this (click to enlarge):


Now just save it as whatever you want (I named mine “Open in New Instance”). When you right-click on a file in the Finder, you can open it using a second instance of its corresponding application by selecting your new service.

Open Two Instances of Preview at Once [Macworld]


  • Why would you need this? I thought the whole point of OSX was that it was easy to use, intuitive, and that you didn’t need to use the terminal.
    Now having to run a script so you can open another instance of a program… I wouldn’t call that easy, or intuitive. And I wouldn’t call having to use the terminal not having to use the terminal.
    Now I know in the PDF readers I use there is a menu item to open a copy, and every other application will just open a new window. Except a media player, but why would you want to overlap two songs at once?
    Now I’m sorry if this seems like an attack on OSX but it is. So deal with it. People that say Mac OSX is the best OS ever obviously don’t see how many of these posts there are with relatively complicated ways to do simple things.

Log in to comment on this story!