[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Dedicated separate Firefox windows

Filed under: Hacking — Thomas @ 10:59

2009-11-06
10:59

Dear intarweb,

here's what I'd like to be able to do. I would like to start a completely separate Firefox window, in a separate process, with a given webpage. This process should be completely separate from my regular browsing, not take new links in its window when I click links somewhere else (usually they go to the most recently opened window), not crash when the regular firefox process crashes, and not bog down because my regular firefox goes to 100% CPU and beyond.

It seems to be hard to google for this idea; is it possible ?

36 Comments »

  1. You should be able to use a separate firefox profile for this…

    Comment by Josh Stone — 2009-11-06 @ 11:26

  2. Maybe you should give prism a try, never tried it myself though
    http://mozillalabs.com/prism/

    Comment by Benni — 2009-11-06 @ 11:26

  3. First start the profile manager via “firefox -ProfileManager -no-remote” and create a new profile (for example ‘default2’), then to run a new session in future just do “firefox -P default2 -no-remote” (after having started firefox already with your default session.

    Comment by Mike Sheldon — 2009-11-06 @ 11:36

  4. Maybe something like
    firefox -P -no-remote

    First time you launch it you’ll get a profiles manager, just create the profile there.

    Comment by Alexander Larsson — 2009-11-06 @ 11:36

  5. The option -no-remote basically does what you want. Caveat: In the current codebase, no two running processes are able to share a profile, and this is enforced with locking. Therefore you’ll also want to create multiple profiles. Rough idea: create three firefox icons, which call, respectively:
    firefox -P default
    firefox -P profile2 -no-remote
    firefox %u
    (and use the third one as a URL drop point).

    Followup if this works for zou would be appreciated. :-)

    Comment by pixelpapst — 2009-11-06 @ 11:42

  6. Perhaps you mean like launching a separate profile?

    Try: firefox -no-remote -P “profile-name”

    More command-line switches are available from http://kb.mozillazine.org/Command_line_arguments/

    Comment by Philip Peitsch — 2009-11-06 @ 11:47

  7. You probably need to run different profiles at the same time: http://lifehacker.com/231646/geek-to-live–manage-multiple-firefox-profiles

    Comment by Alberto Fernandez — 2009-11-06 @ 11:53

  8. You could use another browser altogether, like epiphany. That’s what I do.

    Comment by anon — 2009-11-06 @ 11:53

  9. Does running a no-remote separate profile do what you want?

    firefox –no-remote -p SecondProfile

    I think that should create SecondProfile automatically, if not you should be able to do

    firefox –no-remote -p

    to access the profilemanager and create it, also use that to make sure your original profile remains the default one.

    Comment by Adam — 2009-11-06 @ 12:00

  10. I just actually looked up the command line options and that maybe should have been a capital -P, and if the second one doesn’t work try -ProfileManager

    Comment by Adam — 2009-11-06 @ 12:02

  11. You could start epiphany as second browser!

    Comment by Paul Cobbaut — 2009-11-06 @ 12:03

  12. firefox -P ?

    Comment by Stephane — 2009-11-06 @ 12:05

  13. Tried sandboxing it from a chroot?

    Comment by TGM — 2009-11-06 @ 12:18

  14. As TGM said why do not sandbox it? Maybe use the isolate tool for automatic sandboxing: http://code.google.com/p/isolate/

    Comment by Daniel Alonso — 2009-11-06 @ 12:20

  15. You can use firefox profiles to do some of this (the only thing is about new links clics, but if you first start the first profile, then the usual one, it should be fine).

    Comment by tuXXX — 2009-11-06 @ 12:24

  16. for i in `seq 1 5` ; do useradd user$i ; done

    su – user 1
    firefox

    su – user2
    firefox

    su – user3
    firefox

    su – user4
    firefox

    su – user5
    firefox

    Comment by Kris Buytaert — 2009-11-06 @ 12:24

  17. Eh, i see my brackets where eaten. I mean:
    firefox -P [profile-name] -no-remote [uri]

    Comment by Alexander Larsson — 2009-11-06 @ 12:27

  18. You could use firefox’s built-in profile management; create a separate profile for that webpage (called “foo”) and then have .desktop files for

    firefox -P default

    and

    firefox -P foo -no-remote

    (though one problem with this is that I think the former shortcut will open another instance of “foo” profile if the latter is already running, and using -no-remote on both means you could end up with many instances).

    Come to think of it, you don’t even need a different profile, necessarily: you could just use -no-remote on one .desktop and click that every time you want a separate process.

    Comment by Carl van Tonder — 2009-11-06 @ 12:36

  19. Mmm, “firefox -h” shows an option that should do that:

    -no-remote Open new instance, not a new window in running instance.

    but it pops up a dialog saying that firefox is already running, but not responding?!?

    Comment by Nicola Larosa — 2009-11-06 @ 12:36

  20. You can try firefox’s profiles.

    Comment by xhantt — 2009-11-06 @ 12:42

  21. As far as I know Prism is the tool for this job. It has everything you want: a completely separate process and a completely separate browser window.

    Comment by Harm Hilvers — 2009-11-06 @ 12:44

  22. To have firefox in independent processes the best idea is to start it with different users. I don’t know if profiles can save you from crashes.

    Though if you want to just have separate sessions per window (or tab) for the same site you can use the cookiepie plugin

    Comment by Psyxovgalths — 2009-11-06 @ 13:10

  23. I’m with 21
    One word: Prism
    http://prism.mozilla.com/

    It’s the easiest solution without using multiple profiles.

    Comment by aeon — 2009-11-06 @ 14:07

  24. Note also that Mozilla is considering a multi-process model for future versions of the fox.

    Comment by Chris Tyler — 2009-11-06 @ 14:21

  25. You could use Chromium. There are linux snapshots that work great.

    Comment by David — 2009-11-06 @ 14:23

  26. firefox -no-remote url
    firefox -no-remote casual-browsing-url

    Comment by Josh Matthews — 2009-11-06 @ 14:33

  27. Funny how everyone repeats the same suggestion over and over. And some trolls suggest Epiphany and Chromium. What about Midori or Kazehakase? Or switching over to Windows while you’re bored.

    Comment by Markus — 2009-11-06 @ 14:34

  28. How about:

    sudo -u testuser firefox

    I know it’s only a workaround but you’d get a completely new environment. Even scriptable with creating a new user, starting firefox, waiting for it and the deleting the user…hmmm gotta do some shell scripting :)

    Comment by Martin Marcher — 2009-11-06 @ 14:54

  29. Maybe it’s time to give firefox a –new-window=URL option that opens a new window with the current profile. When you find a problem in free software and you’re a capable software developer, fixing the problem upstream can be fun and rewarding.

    Other browsers get it right, FF should too.

    Comment by Ben Asselstine — 2009-11-06 @ 16:11

  30. Under Windows, I’d look at thinapp (application virtualization: application runs in a bubble, enabling multiple bubbles to exist with independent applications).

    Comment by bert — 2009-11-06 @ 16:19

  31. sudo apt-get install prism

    There are packages already setup for certain websites:
    sudo apt-get install prism-google-mail
    sudo apt-get install prism-google-reader
    sudo apt-get install prism-facebook

    To use a custom website, manually create a launcher for prism, or use this extension:
    https://addons.mozilla.org/en-US/firefox/addon/6665

    Comment by Laszlo Pandy — 2009-11-06 @ 16:25

  32. Prism is exactly what you want for the job. It meets all of your stated requirements.

    Comment by Adam — 2009-11-06 @ 17:19

  33. If you are running rawhide/fedora 12, why not use the cool sandbox command:

    http://danwalsh.livejournal.com/31247.html

    Then your firefox is totally selinux isolated from the rest of your machine/desktop.

    Comment by Kevin Fenzi — 2009-11-06 @ 17:38

  34. Sounds like you want IE6 – er, I mean Chromium. Nah, on a serious note, Firefox is pretty badly behind in the ballgame on some basic features like this. I tried to use that -no-remote -P solution for a while in a situation where I actually WANTED not just a separate process, but also separate extensions for some work. Even then it sucked, because later -new-window launched would latch on to the wrong process. Plus, it sucks up memory like mad. Pretty happy with chromium now, though still need firefox from time to time for some stuff.

    Comment by Osma — 2009-11-07 @ 06:44

  35. Not yet… But they are working on it.

    Mozilla is working on multi-process browsing, IIRC the plan is to initially split into two processes, one for the chrome, the other for content (so yes one page can still crash all the others, but not the entire browser, I imagine the plan is to have FF recover from this all by itself)

    I suppose once that goes in it might be possible to make an extension that does what you want… but they are supposedly eventually moving to something like chrome, one process per page.

    Comment by Spudd86 — 2009-11-11 @ 15:45

  36. The Mozilla project that people have mentioned to make each tab run in a separate process is called Electrolysis.

    Comment by Daf — 2009-12-06 @ 01:20

RSS feed for comments on this post. TrackBack URL

Leave a comment

picture