fb2reader icon indicating copy to clipboard operation
fb2reader copied to clipboard

Unable to associate local FB2 on Linux "right way"

Open pyhedgehog opened this issue 10 months ago • 1 comments

Solution mentioned as a reply to #8 works, but has a disadvantage - I can't select other FB2 app (like crqt-ng) in a "Open with...".

$ xdg-mime query filetype some_book_file.fb2
application/x-fictionbook+xml
$ echo ${ff:=$(xdg-mime query default application/x-fictionbook+xml)}
firefox-esr.desktop
$ sed -e '/^MimeType=/ s@$@application/x-fictionbook+xml;@' \
	/usr/share/applications/$ff \
	> ~/.local/share/applications/$ff
$ update-mime-database ~/.local/share/mime
$ update-desktop-database ~/.local/share/applications
$ xdg-open some_book_file.fb2

Then firefox asks whether I want to open it with "Firefox" or save and after clicking open with firefox it opens empty tabs named as file in a loop. :-(

pyhedgehog avatar Mar 18 '25 19:03 pyhedgehog

Seems it's unsupported in Firefox. :-(

pyhedgehog avatar Mar 18 '25 19:03 pyhedgehog

Well, that is the exact duplicate of the #8 issue. Firefox treats application/fictionbook+xml as some generic mime type, and does not trigger the extension.

the link above is a bit unrelated, as it is about Progressive Web Apps, not Firefox extensions.

tymofij avatar Apr 10 '25 19:04 tymofij