It happened to me to have the need to run at the same time the Skype application in Mac OS X being logged with two different accounts, this was needed to test the messaging and file sharing capabilities or simply to be able to receive calls on two different accounts or registered numbers at the same time.
That practice is not actually permitted with the current version of Skype for Mac OS X (Skype Version 18.104.22.168) so I had to find a DIY solution.
At the beginning I tried to copy the application bundle and launch it, wishing that the system was recognising this as a distinct application but unfortunately that didn’t work and Mac OS X was complaining that the application was already running and it could not open a second instance of it (due to a conflict of resources).
I then started wondering why in GNU/Linux (that is a not-so-far cousin of Mac OS X UNIX subsystem), wasn’t that difficult to launch from command-line a second instance of an application, so it came to my mind the ‘open’ command that sometimes I use with AppleScript to launch some applications.
Reading the manual of ‘open’ I discovered these two ‘magical’ options:
- The ‘-n’ option, that guarantees the opening of a new instance of the application;
- The ‘-a’ option, that permits to specify the name of an application without the bundle extension ‘.app’ and without specifying the absolute path of the application (that in this case would generally be ‘/Applications/Skype.app’;
I ended up with this ‘best solution’ to open a second (or further) copy of an application with Mac OS X using the given CLI command ‘open’ as follows:
# open -na <application_name>
Powered by Facebook Comments