Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Launch multiple instances of any given application' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Launch multiple instances of any given application
Authored by: dmmorse on Jul 15, '03 07:24:14PM

I would be very careful launching two apps at the same time. I tried the following:

1) launch Safari normally;

2) with Safari running from step 1, launch Safari again, but this time sudo'ing using the above hint.

With Safari running in two instances, the sudo'd application picked up the preferences of the normally run application. This should not have happened, as the sudo'd application should have taken its preferences from the root preferences folder. It did not, so there must be some sharing or memory or resources going on that is not intended.

In short, I would not run multiple copies of the same application unless I have a recent backup of my important data. Of course, regular back-ups are always a good idea.



[ Reply to This | # ]
No problem here
Authored by: discordantus on Jul 16, '03 06:34:09PM
hmmmm... I did the same thing, and it used root's preferences, bookmarks, etc... Seems to work fine here.

I regularly use this trick to run an application as root, and have never had any problems with it. I've also used it frequently to get open multiple copies of programs that otherwise only allow one open window, or one server connection. Again, no problem.

OTOH, some applications need to keep exclusive access to certain files, and it may cause problems there. It seems that this would only happen when running two copies as the same user, but would limit the problems to, say, your bookmarks not getting updated correctly.

[ Reply to This | # ]

Launch multiple instances of any given application
Authored by: erikh on Jan 09, '06 04:30:18PM

Sudo never changes the home directory - that is, if you're joe, and your home directory is /Users/joe, this will happen:

$ echo $HOME
/Users/joe
$ sudo bash
# echo $HOME
/Users/joe

Since safari most likely uses some mutation of $HOME to determine where the library path is (which is where your settings are stored), it's most likely that this is the problem.

To solve this:

sudo -H [command]

Which will set the home directory to the user you're targetting (in this case, root).



[ Reply to This | # ]