Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

Default browser on linux fails on file:/// URLs.

  • 5 odpovedí
  • 0 má tento problém
  • 42 zobrazení
  • Posledná odpoveď od oylenshpeegul

more options

I just wrote this blog post and someone suggested I contact you.

I have my default browser set to Firefox on Linux (Debian Bookworm). When I open an http:// or https:// URL, it opens in Firefox, but when I open a file:/// URL, it opens in Chromium. It seems that file:/// URL makes it resort to the MIME type.

Is there anything Firefox can do here or is this a Debian or freedesktop.org issue?

Thanks!

Tim

I just wrote [https://oylenshpeegul.gitlab.io/blog/posts/20240209/ this blog post] and someone suggested I contact you. I have my default browser set to Firefox on Linux (Debian Bookworm). When I open an http:// or https:// URL, it opens in Firefox, but when I open a file:/// URL, it opens in Chromium. It seems that file:/// URL makes it resort to the MIME type. Is there anything Firefox can do here or is this a Debian or freedesktop.org issue? Thanks! Tim

Vybrané riešenie

Oh, excellent! Thanks so much!

Čítať túto odpoveď v kontexte 👍 0

Všetky odpovede (5)

more options

Are the files HTML documents? If so, what setting do you have for HTML document in Settings → Files and Applications → Applications. There are also applications File and plain text document.

Pomohla vám táto odpoveď?

more options

Right, what are you trying to open? see screenshots


Operating System: openSUSE Tumbleweed 20240208 KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.114.0 Qt Version: 5.15.12 Kernel Version: 6.7.4-1-default (64-bit) Graphics Platform: X11 Processors: 12 × Intel® Core™ i7-9850H CPU @ 2.60GHz Memory: 125.1 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 630 Manufacturer: HP Product Name: HP ZBook 17 G6

Pomohla vám táto odpoveď?

more options

Thanks for the reply!

Yes, the files are HTML documents. It seems to come down to the protocol.

     gio open http://www.freedesktop.org/

opens in Firefox, but

   gio open file:///home/tim/perl/foo.html

opens in Chromium.

Firefox is happy with the HTML files. If I call it directly

   firefox file:///home/tim/perl/foo.html

it works fine.

I don't seem to have a Settings → Files and Applications → Applications menu (Xfce 4.18).

I changed the "text/html" setting in Applications -> Settings -> Default Applications to Firefox and now it works as desired. The question is, why wasn't having the default Web Browser set to Firefox enough? Why does the MIME type also have to be changed?

Pomohla vám táto odpoveď?

more options

The chosen HTML handler is expected to take priority over the default browser when opening file:///example.html. On Ubuntu 23.10 with GNOME, changing the default browser causes the HTML handler to reset back to default.

Pomohla vám táto odpoveď?

more options

Vybrané riešenie

Oh, excellent! Thanks so much!

Pomohla vám táto odpoveď?

Položiť otázku

Ak chcete odpovedať na príspevky, musíte sa prihlásiť do svojho účtu. Ak ešte nemáte účet, položte novú otázku.