netblue30 / firejail

Linux namespaces and seccomp-bpf sandbox
https://firejail.wordpress.com
GNU General Public License v2.0
5.69k stars 557 forks source link

firefox: --private-home= disables add-ons #3611

Open SuperSentient opened 4 years ago

SuperSentient commented 4 years ago

Write clear, concise and in textual form.

Bug and expected behavior When using Private Home Firejail disables Firefox add-ons.

No profile or disabling firejail Everything launches normally.

Reproduce Steps to reproduce the behavior:

  1. Run in bash firejail PROGRAM run firejail --private-home=.mozilla firefox
  2. See error ERROR I'm not sure if this an error message but when I run firejail --private-home=.mozilla firefox in the terminal this what I get (firefox:15): LIBDBUSMENU-GLIB-WARNING **: 09:37:01.887: Unable to get session bus: Could not connect: No such file or directory
  3. Click on '....'
  4. Scroll down to '....'

Environment

Additional context Other context about the problem like related errors to understand the problem.

Checklist

debug output ``` OUTPUT OF `firejail --debug PROGRAM` ```
When ever I this command firejail --private-home=.mozilla firefox it disables the add-ons in Firefox I have to re-enable manually the strange thing is the add-ons show them as being enabled under add-ons they don't show up in the toolbar and I know there actually disabled because if go to site like YouTube it shows ads and that means my Ublock Origin disabled.
SkewedZeppelin commented 4 years ago

This could potentially be related to recent changes to extensions.enabledScopes and extensions.autoDisableScopes in the past few versions.

SuperSentient commented 4 years ago

This could potentially be related to recent changes to extensions.enabledScopes and extensions.autoDisableScopes in the past few versions.

So I wonder when a fix for it will be made? Because I hate having manually re-enable all of my add-ons every time I use Private Home for Firefox.

rusty-snake commented 4 years ago

@SuperSentient to test @SkewedZeppelin guess, open prefs.js in your firefox-profile and add user_pref("extensions.autoDisableScopes", 0); + user_pref("extensions.enabledScopes", 15);. If these prefs already exist in your prefs.js remove the old once, but remember its value (NOTE: comments in prefs.js are removed by firefox).

SuperSentient commented 4 years ago

@SuperSentient to test @SkewedZeppelin guess, open prefs.js in your firefox-profile and add user_pref("extensions.autoDisableScopes", 0); + user_pref("extensions.enabledScopes", 15);. If these prefs already exist in your prefs.js remove the old once, but remember its value (NOTE: comments in prefs.js are removed by firefox).

I have no idea how to do that I tried looking for it under about:config couldn't find it.

rusty-snake commented 4 years ago

Options:

  1. See about:profiles where your profile is (e.g. ~/.mozilla/firefox/quux.qaax), then open the file prefs.js in it with an editor while firefox is not running (e.g. vim~/.mozilla/firefox/quux.qaax/prefs.js)
  2. Start firefox w/o private-home (it is still a whitelisting profile) and set these on about:config, you maybe need to create these settings.
SuperSentient commented 4 years ago

Options:

1. See `about:profiles` where your profile is (e.g. `~/.mozilla/firefox/quux.qaax`), then open the file prefs.js in it with an editor while firefox is not running (e.g. `vim~/.mozilla/firefox/quux.qaax/prefs.js`)

2. Start firefox w/o private-home (it is still a whitelisting profile) and set these on about:config, you maybe need to create these settings.

Oh sheesh this sounds way to complicated for me I mean my hacking skills are limited, but regardless thanks for your help. Hopefully netblue30 will be able fix this in a future update.

bbhtt commented 4 years ago

@SuperSentient to test @SkewedZeppelin guess, open prefs.js in your firefox-profile and add user_pref("extensions.autoDisableScopes", 0); + user_pref("extensions.enabledScopes", 15);. If these prefs already exist in your prefs.js remove the old once, but remember its value (NOTE: comments in prefs.js are removed by firefox).

Neither help. This is a firefox only problem I think. I tested chrome and midori both work fine with extensions and private-home, tried seamonkey...it doesn't have a extension toolbar, so I couldn't find a way to check if they are actually enabled.

I have no idea how to do that I tried looking for it under about:config couldn't find it.

One of them exist in about:config https://imgur.com/0ZteNEu, firefox 80.0...

An easy workaround exists for private-home: click on the extensions a few times...

it disables the add-ons in Firefox I have to re-enable manually

SuperSentient commented 4 years ago

@SuperSentient to test @SkewedZeppelin guess, open prefs.js in your firefox-profile and add user_pref("extensions.autoDisableScopes", 0); + user_pref("extensions.enabledScopes", 15);. If these prefs already exist in your prefs.js remove the old once, but remember its value (NOTE: comments in prefs.js are removed by firefox).

Neither help. This is a firefox only problem I think. I tested chrome and midori both work fine with extensions and private-home, tried seamonkey...it doesn't have a extension toolbar, so I couldn't find a way to check if they are actually enabled.

I have no idea how to do that I tried looking for it under about:config couldn't find it.

One of them exist in about:config https://imgur.com/0ZteNEu, firefox 80.0...

An easy workaround exists for private-home: click on the extensions a few times...

it disables the add-ons in Firefox I have to re-enable manually

Alright I guess I'll try modifying Firefox in a VM and see if that will help with this issue, but I'll need guidance since my hacking skills are limited and may take me while to get back a hold of you all. But I'll keep doing what I've doing for the time being and that's re-enabling my add-ons every time I use Private Home for Firefox. But I curious does happen with other browsers based of Firefox such as Waterfox or even Pale Moon?

SkewedZeppelin commented 4 years ago

@SuperSentient Those prefs are hidden, just fiddle around with them in about:config. This is due to recent security changes in the past few versions of Firefox.

SuperSentient commented 4 years ago

@SuperSentient Those prefs are hidden, just fiddle around with them in about:config. This is due to recent security changes in the past few versions of Firefox.

So how do I find them in about:config if there hidden? Also when I updated my Firefox browser I opened it in Private Home and the add-ons didn't disable but after I rebooted my system it started disabling my add-ons again in Private Home, so I'm guessing that Netblue30 might able to fix it on the Firejail end.

rusty-snake commented 4 years ago

So how do I find them in about:config if there hidden?

Enter the full pref and create a new of type "number".

rusty-snake commented 4 years ago
user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.enabledScopes", 15);

It still happens with these prefs. about:addons and about:support say that my add-ons are enabled, about:performance does not show any active add-ons and about:debugging just show me a TypeError: target is null if I try to debug one of the "enabled" add-ons.

mq2yy9t33 commented 4 years ago

i had the same on arch. user_pref("extensions.lastAppBuildId", "2020xxxxxxxxxx"); seems to cause it. changing this date/time value e.g. to 2020xxxxxxxxxY makes the icons remain visible. about:performance shows all extensions active. OP's command firejail --private-home=.mozilla firefox works in the terminal without error. rebooted, checked, still works.

so i would like to call for testing if this works 4 u 2...

SuperSentient commented 4 years ago

i had the same on arch. user_pref("extensions.lastAppBuildId", "2020xxxxxxxxxx"); seems to cause it. changing this date/time value e.g. to 2020xxxxxxxxxY makes the icons remain visible. about:performance shows all extensions active. OP's command firejail --private-home=.mozilla firefox works in the terminal without error. rebooted, checked, still works.

so i would like to call for testing if this works 4 u 2...

That's funny I don't remember saying that it works in the terminal in fact I just tried that and my add-ons are still disabling. Either way I would like to some sort of fix for this issue.

mq2yy9t33 commented 4 years ago

I can't do anything with your answer. i'm talking of Firefox 80.0.1 on archlinux, firejail --private-home=/home/USER/.mozilla firefox, missing icons and deactivated extensions. any value in user_pref("extensions.lastAppBuildId", "VALUE"); that differs from the original works. did you try to leave it blank or "20200901112233"? did you try something unreal like "20200901555555" or characters like "abcdefghijklmn"? i think this issue has nothing to do with firejail. fetch a pref.js of a working FF from a forum user and run FF with this different file. if FF works properly then compare and copy settings partially to narrow down the pref.js entries. that's what i did.

dpellegr commented 3 years ago

I was having this issue on FFox 81, Archlinux.

firejail --private-home=/home/USER/.mozilla firefox

The theme is kept, but the extensions behave weirdly:

Following the suggestion of @mq2yy9t33 I edited the profile file (~/.mozilla/firefox/your_profile_folder/prefs.js) setting extensions.lastAppBuildId to blank and it has solved the issue.

Keep in mind that if you open FF without firejail, it will revert extensions.lastAppBuildId to the original value, breaking all the new firejailed instances.

All the above applies to FF82 as well.