Coder Social home page Coder Social logo

firefox-podman's Introduction

Containerized Firefox

Please Note: This is hosted at https://codeberg.org/ryangreenup/firefox-podman, if you’re viewing this on GitHub it is only a mirror. Please use the bug tracker on Codeberg for any issues.

Introduction

This runs firefox in a container, this makes it easier to rsync the firefox profile between machines because the version will be consistent.

Usage

Initial Setup

  1. Clone the repo
  2. Install the dependencies
    pip install click
        
  3. Build the dockerfile
    ./run.py build
        
  4. Make a Directory for the profile
    mkdir -p ./data/profiles/arkenfox
        
  5. Run a shell in the container
    ./run.py run --shell --profile ./data/profiles/arkenfox
        
  6. Create a new profile under ~/.mozilla/firefox/main_profile using the Profile Manager:
    firefox --ProfileManager
        

    Then exit the container

  7. Run firefox from the container:
    ./run.py run --profile ./data/profiles/arkenfox
        
  8. Optionally symlink ./run.py to ~/.local/bin/firefox-podman:
    ./run.py install
    # unisntall with
    # ./run.py uninstall
        

Usage thereafter

./run.py run --profile ./data/profiles/arkenfox

Implementation Notes

Wayland

If the host has XDG_SESSION_TYPE=wayland and XDG_USER_DIRS is defined, firefox will run through wayland and unset the X11 DISPLAY variable.

Sound

This uses pipewire pulse to communicate with pipewire on the host.

run.sh

A run shell script is included that can be used for debugging

Multiple Windows

Firefox only allows one instance of a profile to run at a time, it is configured to simply attach back to the last running session. This is confusing and not implemented here, instead, create new windows from the running session.

Troubleshooting

I had some grief running VPNs, I had to restart the container, I’ve since mounted /etc/resolv.conf and this should probably fix that.

Syncing profiles

One can use rsync or unison to syncrhonise profiles. Syncthing is not recommended because the files will change a lot during runtime and this will likely lead to a poor experience. I’ve used git and the experience was pretty good also.

target="my_other_pc"
user="username"
dir="$HOME/Sync-Current-rsync/containerized_applications/share/firefox"

rsync -avh "${dir}/" ${user}@${target}:"${dir}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.