[GH-ISSUE #3129] midori.profile: ad-blocker not working properly #1963

Closed
opened 2026-05-05 08:37:39 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @Rosika2 on GitHub (Jan 7, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3129

Hi altogether,

I´ve encountered the following problem: When running the midori web-browser with firejail midori
it loads the midori.profile which is correct.

Midori runs alright except the issue with the ad-blocker 2.0(0.4.1), which is enabled in midori by default.
The ad-blocker is active but doesn´t seem to function.

Example: when running firejail midori an then loading
https://www.linuxquestions.org/questions/showthread.php?p=6072547#post6072547

the respective page is displayed with ads and the ad-blocker shield is green. So the ad-blocker is active but doesn´t seem to work.

When displaying the same page running firejail --noprofile midori
the page is displayed without ads and the ad-blocker shield is yellow. That´s the way it should be.
So I guess some setting within the midori.profile prevents the ad-blocker from kicking in accurately.

What might be the issue there?

Thanks a lot in advance.
Greetings.
Rosika

P.S.:

  • midori & firejail running on BodhiLinux in virtual machine
  • host: Lubuntu 18.04.3 LTS, 64 bit
Originally created by @Rosika2 on GitHub (Jan 7, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3129 Hi altogether, I´ve encountered the following problem: When running the midori web-browser with `firejail midori ` it loads the _midori.profile_ which is correct. Midori runs alright except the issue with the _ad-blocker 2.0(0.4.1)_, which is enabled in midori by default. The ad-blocker is active but doesn´t seem to function. Example: when running `firejail midori` an then loading `https://www.linuxquestions.org/questions/showthread.php?p=6072547#post6072547` the respective page is displayed **with** ads and the ad-blocker shield is **green**. So the ad-blocker is active but doesn´t seem to work. When displaying the same page running `firejail --noprofile midori ` the page is displayed **without** ads and the ad-blocker shield is **yellow**. That´s the way it should be. So I guess some setting within the _midori.profile_ prevents the ad-blocker from kicking in accurately. What might be the issue there? Thanks a lot in advance. Greetings. Rosika P.S.: - midori & firejail running on BodhiLinux in virtual machine - host: Lubuntu 18.04.3 LTS, 64 bit
Author
Owner

@rusty-snake commented on GitHub (Jan 7, 2020):

What might be the issue there?

Probably the ad-blocker works, but has no rules.

We can separate the profile in there parts that can cause this:

  1. the whitelist
  2. the blacklist (include disable-*.inc)
  3. the rest (caps.drop all to disable-mnt)
<!-- gh-comment-id:571596220 --> @rusty-snake commented on GitHub (Jan 7, 2020): > What might be the issue there? Probably the ad-blocker works, but has no rules. We can separate the profile in there parts that can cause this: 1. the whitelist 2. the blacklist (`include disable-*.inc`) 3. the rest (`caps.drop all` to `disable-mnt`)
Author
Owner

@Rosika2 commented on GitHub (Jan 7, 2020):

@rusty-snake:
Thank you so much for your help again.

I tried everything you suggested and it turned out to be include disable-programs.inc.
That´s the only line I had to comment out.
So # include disable-programs.inc enables the pop-up blocker to read the rules. Its icon is yellow and ads aren´t shown.

Thanks again for your really fast quality help. It´s much appreciated.

Greetings.
Rosika

<!-- gh-comment-id:571615468 --> @Rosika2 commented on GitHub (Jan 7, 2020): @rusty-snake: Thank you so much for your help again. I tried everything you suggested and it turned out to be `include disable-programs.inc`. That´s the only line I had to comment out. So `# include disable-programs.inc` enables the pop-up blocker to read the rules. Its icon is yellow and ads aren´t shown. Thanks again for your really fast quality help. It´s much appreciated. Greetings. Rosika
Author
Owner

@rusty-snake commented on GitHub (Jan 7, 2020):

@Rosika2 in general it is a bad idea to comment include disable-progams.inc. Here is it not so bad because midori is a whitelisting profile. disable-progams blacklists a lot of program path in $HOME, you could enable it and add a noblacklist command if you know the path. Use journalctl --grep="blacklist violation" --reverse to see logged access tries to blacklisted paths (from sandboxes with tracelog).

<!-- gh-comment-id:571633750 --> @rusty-snake commented on GitHub (Jan 7, 2020): @Rosika2 in general it is a bad idea to comment `include disable-progams.inc`. Here is it not so bad because midori is a whitelisting profile. disable-progams blacklists a lot of program path in $HOME, you could enable it and add a noblacklist command if you know the path. Use `journalctl --grep="blacklist violation" --reverse` to see logged access tries to blacklisted paths (from sandboxes with `tracelog`).
Author
Owner

@Rosika2 commented on GitHub (Jan 8, 2020):

@rusty-snake:
Hello again and thanks a lot for the additional info.

I looked up my journalctl-entries. What worked for me was the command journalctl | grep "blacklist violation" which gave me as a result
Jan 07 15:28:56 rosika2-Standard-PC-i440FX-PIIX-1996 firejail[2035]: blacklist violation - sandbox 2024, exe midori, syscall access, path /home/rosika2/.cache/midori
Thus I got the respective path.
Afterwards I enabled include disable-progams.inc again and added noblacklist /home/rosika2/.cache/midori.
And it works as desired. The ad-blocker reads the rules and applies them accordingly (yellow symbol) .

Thanks for explaining the inner workings of the profile.

Greetings.
Rosika

<!-- gh-comment-id:572031130 --> @Rosika2 commented on GitHub (Jan 8, 2020): @rusty-snake: Hello again and thanks a lot for the additional info. I looked up my **journalctl**-entries. What worked for me was the command `journalctl | grep "blacklist violation"` which gave me as a result `Jan 07 15:28:56 rosika2-Standard-PC-i440FX-PIIX-1996 firejail[2035]: blacklist violation - sandbox 2024, exe midori, syscall access, path /home/rosika2/.cache/midori` Thus I got the respective path. Afterwards I enabled `include disable-progams.inc` again and added `noblacklist /home/rosika2/.cache/midori`. And it works as desired. The ad-blocker reads the rules and applies them accordingly (yellow symbol) . Thanks for explaining the inner workings of the profile. Greetings. Rosika
Author
Owner

@rusty-snake commented on GitHub (Jan 8, 2020):

upsteam 105dce9bba (diff-2d1d56611361d49d41311dab5fe786bb)

@Rosika2 thx for your help.

<!-- gh-comment-id:572060692 --> @rusty-snake commented on GitHub (Jan 8, 2020): upsteam https://github.com/netblue30/firejail/commit/105dce9bba1136484251daf645e578d64366bbed#diff-2d1d56611361d49d41311dab5fe786bb @Rosika2 thx for your help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1963
No description provided.