Firefox default setting in Qubes OS

With the default Qubes settings each new AppVM starts Firefox with its default setting (search “Google”, homepage … no addons … theme…). I looking for a solution to customize the default Firefox setting so that each new AppVM with Firefox has a customized / personalized setting. Is there there a solution within the template VM or an easy export/import approach for all the Firefox settings?

@whoami - if you want NON disposable qubes to be so configured, then you
can do this:
Open firefox and configure it as you will, (in a normal qube).
qvm-copy .mozilla to a template.
In the template, move the .mozilla folder in to /etc/skel

Now every new qube that uses that template will inherit the .mozilla
folder, and the configuration you have set.
This wont work for existing qubes, but it’s a start.
For existing qubes you could try copying the .mozilla folder to ~.

Obviously you wont want to do this where you want qubes to have a
distinct persona.

6 Likes

Beside useful @unman’s tip, I’m thinking on how to set this for disposableVM, for any browser.

  1. Download, not install, all the desired addons to a spare place.
  2. Set browsing dvm-template's netVM temporarily to none
  3. Open browser in offline mode in a disposableVM.
  4. Copy and install all the addons.
  5. Set the other browser’s settings as desired.
  6. Just in case clear whole cache.
  7. Finally, copy such set browser’s profile to a template's /etc/skel/
  8. Create completely new `dvm-template’ (see @unman’s post above why)
  9. Set netVM to dvm-template if not automatically assigned.
  10. Start fully set browser with a clean profile in a new online disposableVM.

This way, it works.

Since I’m using split-browser, relaunching is not an option, like it would be in the regular browsing disposables (I could just start disposable by first starting terminal then Brave and I could relaunch it then), so any idea @rustybird or anyone else could have on how to overcome this with split-browser would be great.

1 Like

Why even go through a DisposableVM? I’d just customize Firefox in the -dvm (starting it as an AppVM with network access - or without network access if you’ve already downloaded the addons in another VM). Hmm it does make sense if you’re planning to also use the -dvm for other programs that an exploited Firefox shouldn’t contaminate.

This can be avoided by shutting down Brave/Firefox before you copy its profile. (Copying a browser’s profile while it’s still running can also result in data corruption in the copy.)

In case you’re launching the “installation DisposableVM” via Split Browser too: When you’re done customizing Firefox, open a terminal in the same disp1234 and run killall -s STOP split-browser-disp so that the DisposableVM stays alive after Firefox shutdown, and you then have time to copy out the profile.

1 Like

Great tip and thanks for it!

Well, actually, I use dvm-template only for a single browser, for each browser another dvm-template and no other use. As compartmentalized as possible - just not running anything in what has in its name - template.

Unfortunately, this won’t work. No matter what you try with/in dvm-template, a new random profile will be generated in disposableVM conflicting with formerly set profile - “Firefox cannot start, because another instance is already running, blah, blah…”

Fortunately, this works, so I’m not sure why @unman wrote

Any way, I edited my previous post so it could be relevant.

Since I’m using non-TorBrowsers exclusively on clearnet, I don’t find this relevant for my use case, but other might keep it on their mind.

And the most important thing (inserted in edit, too)

And definitely

… this didn’t work for me, but if someone has some tip on this, it would be appreciated.

qubeA:
Check which firefox profile you are using - in firefox type
about:profiles in address bar.
You will see the name of the profile in use: remember it.
Close down firefox.
qvm-copy the .mozilla folder to qubeB

qubeB:
Open terminal.
Delete the .mozilla folder - rm -rf ~/.mozilla
mv ~/QubesIncoming/qubeA/.mozilla ~
Start firefox using the ProfileManager:
firefox --ProfileManager
Select the profile you used in qubeA
Select option to open without prompting in future.

Done

4 Likes

Thanks, I was focused on disposables, and totally forgot the switch at the moment. Right after the post, I did it simply overwriting the content of the default profile firefox folder with the content of the customized one.

A tip to add custom search engine in offline browser:

  1. Provide yourself with the search URL in online Firefox and replace search term with %s
  2. In an offline Firefox, go to about:config and add new boolean value

browser.urlbar.update2.engineAliasRefresh

  1. Go to Settings->Search section of your offline Firefox and there you should get Add button to add new search engine from 1.

i was interested in how to do it for ‘all’ users that start firefox, system-wide.

if i understand correctly, that seems to be possible in /etc/firefox/user.js .

relted links:

https://wiki.archlinux.org/title/Firefox/Privacy

If you take that route, maybe this would be interesting to you:

1 Like