Routing xdg-open to specified Firefox Containers and/or Firefox Profiles to enforce PERSEC/OPSEC. Works with any Firefox based browser - I'm using Zen-Twilight.
Requirements:
- Pyothon 3.10+ to encode URLs
- Open external links in a container Firefox Extension that provides the custom protocol handler
- Firefox Multi-Account Containers (Recommended) Firefox Extension to route URLs inside the browser to specified a container
- UWSM (Optional)
- Install the Desktop file zen-dispatcher.desktop
- Install zen-dispatcher.sh executable and update the path in zen-dispatcher.desktop
- Make sure zen-dispatcher.desktop is your default with mimeapps.list
Configure the URLs of the switch-case statement in zen-dispatcher.sh to route into a specific container by setting CONTAINER="Gaming" for example. You can also specify any non-default profile by appending additional ARGS such as ARGS+=("-P" "Media" "--name" "zen-twilight-media" "--no-remote").