Isolate mutiple browsers on linux?

Discussion in 'all things UNIX' started by lucygrl, May 18, 2014.

Thread Status:
Not open for further replies.
  1. lucygrl

    lucygrl Registered Member

    Nov 6, 2013
    Hello, is there a way to isolate say 3 firefox browsers on linux? So for example, if browser one got infected with a problem such as malware, it would not spread to the other browsers on the OS? Or would a problem just simply spread through the system?

  2. lotuseclat79

    lotuseclat79 Registered Member

    Jun 16, 2005
    Hi lucygrl,

    There is a way to separate the installation of 3 separate Firefox browsers in Linux which I utilize on a version numbering basis by naming each separate version in /usr/lib on installation. That is only the first part of solving the problem.

    In each users account on the same computer, there is a different profile for each user that is kept in the user's home directory named ~username/.mozilla. If userA got infected, it could be either in the /usr/lib/firefox-28.0 instance of firefox or for example, in the /usr/lib/firefox-29.0.1 instance of firefox. If so, then all of the users using one of either instance of an infected Firefox would run into problems. But, if only userA in account /home/userA profile directory /home/userA/.mozilla got infected there and not in either instance of the /usr/lib versions of Firefox, then only userA would be infected with malware in the /home/userA/.mozilla profile directory. So, infection depends on where the infection asserts itself as to whether one user or many users get infected with the same problem malware.

    The way I setup my different Firefox versions is as follows:
    1) as root, create instance directories for each different version of Firefox, e.g. in /usr/lib/firefox-28.0 and /usr/lib/firefox-29.0.1
    2) as root, decompress and untar the specific versions with gunzip if the version is compressed with gzip (.gz), or unxz if with xz (.xz) in a Desktop directory
    3) as root, untar the tar file of each separate version which untars to a firefox directory (on the Destop directory in this example)
    4) as root cd or pushd to the firefox directory of each instance and issue a cp -rp ./* into the respective /usr/lib/firefox-28.0 or /usr/lib/firefox-29.0.1 directories respectively
    5) as root, cd or pushd from either /usr/lib/firefox-version directory to /usr/bin directory, and then issue the command: ls -lt firefox*
    6) setup the following symbolic links with these commands from /usr/bin
    # ln -s ../lib/firefox-28.0/firefox firefox-28.0
    # ln -s ../lib/firefox-29.0.1/firefox firefox-29.0.1
    7) Choose one of the versions to be the actual Firefox linked into the Firefox icon from the applications bar (I am using Ubuntu 12.04.4 LTS):
    # ln -s firefox-28.0 firefox
    The last command will set Firefox 28.0 instance to be linked to the Firefox icon, and can easily be changed to use the symbolic link to Firefox-29.0.1 to be the default Firefox used by users on that computer - just remove and re-symbolic link to the other Firefox version.

    At the end of each daily Firefox session, I have developed a couple of scripts to help me save my Firefox profile on my hard drive in order to retain my bookmarks, history that I may want to retain (the reason I do this is that I boot up daily Ubuntu 12.04.4 LTS from a USB flash drive). Conversely, on a daily basis, I boot from a couple of setup scripts that reside on my hard drive to setup my user environment from the booted USB flash drive.

    -- Tom
    Last edited: May 19, 2014
  3. mirimir

    mirimir Registered Member

    Oct 1, 2011
    I just put each one in it's own VM. CrunchBang VMs use ~120 MB RAM at idle, and one Firefox window adds another 180-220 MB. A CrunchBang VM with 400 MB RAM and 64 MB video RAM is usable. There's some swapping, but not enough to be annoying.
  4. Palancar

    Palancar Registered Member

    Oct 26, 2011
    I also utilize the VM approach and I am very happy with that method. I tend to use a more "full size" VM with all the features of any surfing bare metal OS. With today's hardware and 32 Gig of Ram even VM's using 5 Gig of hard drive and 4-5 Gig assigned RAM - still allows you to run half a dozen and I never see a flinch. Blowing away any of them and re-cloning from their respective template makes it very easy to keep the "house" squeaky clean!
Thread Status:
Not open for further replies.