running mozilla multiple times
I’ve found that with recent (1.6, 1.7) versions of Mozilla on Linux, you aren’t able to run multiple instances of the browser. If Mozilla is already running and you try to run Mozilla again, you get the Profile Manager which is a nuisance and of little use.
My solution was to write a shell script to determine if an instance is already running. If it is it opens a new window and if it isn’t, it runs mozilla normally. It’s quite simple but I thought it might come in handy for others, so here it is.
#!/bin/sh # Run Mozilla normally if there are no other instances. If there are, open # a new window within the running instance. mozilla="/usr/local/mozilla/mozilla" pgrep -f $mozilla 1> /dev/null 2>&1 if [ "$?" == 0 ]; then $mozilla -remote "openURL(about:blank, new-window)" else $mozilla fi
Make sure the path to mozilla is correct, and if you want to open a new tab instead of a new window, change new-window to new-tab.
I’ve had the same issue before. I just made sure I always had the mail window open, and then I had a hotkey set up to do a remote openURL to open a browser, but this is better.
I had a similar problem and his is how i solved it:http://linux-sxs.org/internet_browsing/multimoz.html
Thank you very much for this posting. The script was quite helpful. I just do not understand why mozilla was this quirky behavior exists.
Its easier than that. I just set up my desktop Mozilla link to execute /home/user/mozilla/mozilla -remote “oenURL(about:blank, new-window)” and it does the same thing without having to make a script.
Oops spoke to soon. It works when you have an instance already running but doesn’t work opening a window from scratch when you have the -remote flag on there.
Yup, the -remote option is allowing you to run a command in an existing instance of Mozilla, so if Mozilla isn’t running, the command returns:
Error: No running window found.