You are not logged in.

#1 2022-11-16 10:11:05

newsboost
Member
Registered: 2016-07-24
Posts: 157

[SOLVED] Understanding mime types: "xdg-open index.html" opens "Atom"

Hi all,

I have an annoying problem I've met occasionally. I never fully understood the solution, so would like to hear a bit. I have the "atom", socalled "A hackable text editor for the 21st century" installed via flatpak (as io.atom.Atom, this is because otherwise I think it requires a lot of time to rebuild from sources, when upgrading). Somehow I think by installing this, some mime-type setting somewhere is overruled such that "xdg-open index.html" now opens up the "Atom"-editor instead of firefox... This is really annoying!

I've tried to read https://wiki.archlinux.org/title/default_applications but am unsure about whether there exist a good permanent solution such that it doesn't revert when upgrading atom (via "flatpak upgrade/update")... Maybe it also wouldn't be so annoying, if there's a terminal "override-to-firefox"-method. Otherwise, probably the best solution is to permanently make hmtl-files opened by firefox. What is the best way to achieve this and avoid Atom-upgrades doesn't revert my manual settings for .html mime default file type-settings? Hope someone knows about this and will help, thanks!

Last edited by newsboost (2022-11-16 10:58:55)

Offline

#2 2022-11-16 10:19:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,300

Re: [SOLVED] Understanding mime types: "xdg-open index.html" opens "Atom"

If you configure the defaults once explicitly they shouldn't be changed by any self respective automatisms. If you configure your user local mimeapps list once explicitly, then it shouldn't get overriden by system wide changes: https://wiki.archlinux.org/title/Xdg-utils#xdg-mime  https://wiki.archlinux.org/title/XDG_MI … eapps.list

Last edited by V1del (2022-11-16 10:20:57)

Offline

#3 2022-11-16 10:58:27

newsboost
Member
Registered: 2016-07-24
Posts: 157

Re: [SOLVED] Understanding mime types: "xdg-open index.html" opens "Atom"

Ah, this is fantastic, thanks a lot! Seems I were just looking at the wrong mime-information, because the links you provided were much better than what I looked at. This suffices at the moment, problem seems solved, thanks! And for the record, I just did:

xdg-mime default firefox.desktop text/html
xdg-open index.html

Offline

Board footer

Powered by FluxBB