linux - How to run Firefox jailed without serious performance loss?

18
2014-04
  • Vi.

    My Firefox configuration is tricky:

    1. Firefox runs at separate restricted user account which cannot connect to main X server.
    2. Firefox uses Xvfb (virtual "headless" X server) as X server.
    3. x11vnc is running on that Xvfb.
    4. On the main X server there is vncviewer running that connect to this x11vnc

    On powerful laptop (Acer Extensa 5220) it seems to work more or less well, but on "Acer Aspire One" netbook it is slowish (on a background that firefox is loaded with lots of extensions).

    How to optimise this scheme? Requirements:

    1. Browser cannot connect to main X server.
    2. Browser should be in chroot jail (no "suid" scripts, readonly for many things)
    3. Browser should have a lot of features (like in AutoPager, NoScript, WoT, AdBlockPlus)
  • Answers
  • grawity

    Try using Xephyr as the X11 server.

    Another possibility is to run Firefox over a SSH connection to localhost, with restricted X11 forwarding. The OpenSSH ssh client has options ForwardX11 and ForwardX11Trusted; disable the latter in ~/.ssh/config.


  • Related Question

    firefox flash drags performance down
  • Shawn

    I have an old notebook with a hardware profile like this :

    cpu: Intel Celeron 1.5GHZ ram: 1G os : winxp sp2 browser: firefox 3.5.3

    I found when I browse web pages with embeded flash ads or video clips, my firefox could eat up to 300M, 500M, sometimes even 600M memories. I experimented a bit and I can say I'm sure it's related to the flash embeded pages because this case doesn't happen when it's plain text with images pages. Also I'm sure there's no virus on my os.

    What's the problem or is it just firefox ?


  • Related Answers
  • John T

    It's Flash. Mozilla themselves even pinpoint flash as one of the major extensions notorious for high memory usage.

    Or you can block/control specific instances of memory usage, such as for Flash Player, via extensions or configuration options. Flash images in particular are pervasive in modern web pages (as ads, videos, etc) and so are a common source of memory usage.

    Even Mozilla themselves recommend FlashBlock which can be found here.

    If you are using an older version of Flash, it is recommended to upgrade to Flash Player 9 as soon as possible:

    Also, version 8.0.24.0 of Flash plugin can continually consume memory while you are on a web page that includes Flash content. [35] Workarounds are to remove the Flash plugin, block Flash content, or manually navigate away from pages with Flash.

    Celeron is also an older chip and Flash can require a fair bit of CPU power at times.

  • harrymc

    The best is to block these ads out by default.

    Use FF plugins such as NoScript or Adblock Plus. This gives you the choice of only seeing the flash movies that you want.

  • outsideblasts

    I agree with the other comments, but you can also use the addon AFOM to reduce memory usage/leakage. It's experimental, but I've found it very effective and with no problems.