Earlier my text/xml
files were by default opened by firefox
I think. Not sure of this because I do not remember exactly. Then I think I installed geany
and then my text/xml
files were always by default opened by Geany until I installed google-chrome
. Now I see they are by default opened by google-chrome
.
Until now I did not bother to check what are the default applications associated with a particular filetype.
Now when I check my /usr/share/applications/defaults.list
file I see this:
text/html=firefox.desktop;google-chrome.desktop
text/xml=google-chrome.desktop;
application/xhtml_xml=google-chrome.desktop;
My default browser is still set to firefox
. The first line above shows both Firefox and Chrome for text/html
but for text/xml
it is only Chrome.
I think earlier it was Geany for text/xml
because that's the reason by default Geany used to open XML files. I'm not sure on this because I've never checked.
Questions
- I'm wondering how it is set. How a particular application is chosen over another.
- Also how the semicolon (
";"
) is read in the file.
I'm using Fedora 20 – Mate desktop environment.
Query based on Answer by slm
Based on the Answer by @slm, I see my xml filetypes are associated with Geany.
But I see them opening with Chrome instead.
$ xdg-mime query default application/xml
geany.desktop
$
As I mentioned above my /usr/share/applications/defaults.list
file shows
text/xml=google-chrome.desktop;
So what is the difference and which should override?
Best Answer
I usually use the command line tool
xdg-mime
to determine what applications are associated with a given MIME type.You can make this a single command like so:
You can change the default using
mimeopen
like so:NOTE: By the way, the semi-colons are there because there can be multiple associations for a given MIME type. So
text/xml
could havegoogle-chrome.desktop;firefox.desktop;
as it's value would would indicate that there are 2 apps that can handle that particular type.References