Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate bookmarks in Firefox #2406

Closed
bertradio opened this issue Feb 16, 2019 · 14 comments
Closed

Duplicate bookmarks in Firefox #2406

bertradio opened this issue Feb 16, 2019 · 14 comments
Labels
information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required

Comments

@bertradio
Copy link

No description provided.

@bertradio
Copy link
Author

I run both Firefox and Chrome under firejail. Within Chrome when I try and save a page all my bookmarks are correct. But when I try and save a page in Firefox I see duplicate bookmarks. I am running the latest version of firejail (o.9.28.2). Any idea what might be happening. Evidently the bookmarks are saved somewhere but I cannot find where. I am using Linux Mint 19.1.

example

@smitsohu
Copy link
Collaborator

smitsohu commented Feb 17, 2019

I am running the latest version of firejail (o.9.28.2)

Do you mean 0.9.58.2? Version 0.9.28 is very old, unsupported and has lots of known issues (pick a package with the newest version e.g. from here)

Did you try what happens when you run them without firejail?

/usr/bin/firefox
/usr/bin/chromium
# or /usr/bin/google-chrome or whatever your path is

@bertradio
Copy link
Author

You are right, that's a typo. I am running 0.9.58.2, the latest.

Everything is fine if I run without firejail - no duplicates. And Chrome is fine with and without firejail. I also run FF and firejail on another computer and there are no duplicates there. So it must have something to do with my installation or config files.

@bertradio
Copy link
Author

I did a complete uninstall in Synaptic and reinstall so I have unmodified profiles. Now I have this:

image

Note that the entry for Home (with a capital H) points to my user home. The entires for "home" (small h) point to the home folder in rook which contains my Home.

@bertradio bertradio reopened this Feb 17, 2019
@chiraag-nataraj
Copy link
Collaborator

This is because the private-* options mount tmpfs on top of various directories. Those directories show up as "mounts" in various file managers.

The reason you're seeing differences between firefox and chromium is that the chromium profile is much looser than the firefox one (due to chromium needing tons of privileges to set up its own sandbox). I don't see why that would necessarily affect this, but it is what it is.

Regardless, this isn't really a bug. It's mostly just an artifact of the way whitelisting is implemented.

@chiraag-nataraj chiraag-nataraj added the information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required label Feb 17, 2019
@bertradio
Copy link
Author

So I guess I'll have to live with this... unless you know of somewhere in the system I could get rid of the duplicates.

@chiraag-nataraj
Copy link
Collaborator

Not that I know of, nope. Unless you can configure the file manager not to show you mounted stuff (which would probably be inconvenient in the general use case).

The fundamental problem here is that stuff mounted by firejail (to hide things) appears exactly the same as, say, a flash drive you mounted to copy files. It's using the same subsystems (well...tmpfs versus reading from an actual filesystem, but still...same overall subsystem), which means you can't hide one without hiding the other (and users rarely want to hide mounted flash drives from their sidebar).

@bertradio
Copy link
Author

bertradio commented Feb 17, 2019 via email

@glitsj16
Copy link
Collaborator

I also run FF and firejail on another computer and there are no duplicates there. So it must have something to do with my installation or config files.

@bertradio Have you compared ~/.config/gtk-3.0/bookmarks yet between both installations? Try shutting down your file-manager, remove any duplicates from that file and see if that helps at all.

@bertradio
Copy link
Author

Yes. The bookmarks files are identical and there are no duplicates in the bookmark files.

@chiraag-nataraj
Copy link
Collaborator

Also, fwiw, this randomly stopped happening for me with my firefox profile (which you can find here).

@bertradio
Copy link
Author

Thanks. But our systems seem different and it did not work on mine. I'll just live with the problem,

@rusty-snake
Copy link
Collaborator

I figured out when that happened.
Two condtitions must meet:

  1. nobus
  2. access to /etc/fstab
firejail --noprofile zenity --file-selection # NO
firejail --noprofile --nodbus zenity --file-selection # YES
firejail --noprofile --nodbus --private-etc=empty zenity --file-selection # NO
firejail --noprofile --nodbus --private-etc=fstab zenity --file-selection # YES
firejail --noprofile --nodbus --blacklist=/etc/fstab zenity --file-selection # NO

How could firejail prevent that?

  1. Adding blacklist /etc/fstab where possible to profiles with nodbus
  2. Mounting with x-gvfs-hide
mkdir tmp1 tmp2
sudo mount --bind tmp1 tmp2
zenity --file-selection # tmp2 is shown
sudo umount tmp2
sudo mount -o x-gvfs-hide --bind tmp1 tmp2
zenity --file-selection # tmp2 is hidden

Disclaimber: I have only tried and worked with GTK/GIO/GVFS.

@rusty-snake
Copy link
Collaborator

rusty-snake commented Sep 5, 2019

@bertradio Adding this ?HAS_NODBUS: blacklist /etc/fstab to globals.local should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information_old (Deprecated; use "doc-todo" or "needinfo" instead) Information was/is required
Projects
None yet
Development

No branches or pull requests

5 participants