You are not logged in.
Hello,
I've associated text/plain with Mousepad as seen below:
And this works great, it's the default in Thunar etc. Except I'd expect
xdg-mime query default text/plain
to return mousepad too, but it says
wine-extension-txt.desktop
. This is problematic: Applications may open the default editor for something programmatically using xdg-mime (I'm trying to do exactly this), and the resulting application is something the user does not want to see / has never configured! Is this a bug? What is going on?
Here is a more detailed log:
$ env XDG_UTILS_DEBUG_LEVEL=10 xdg-mime query default text/plain
Checking /home/phi/.config/mimeapps.list
Checking /home/phi/.local/share/applications/mimeapps.list
Checking /home/phi/.local/share/applications/xfce-defaults.list and /home/phi/.local/share/applications/xfce-mimeinfo.cache
Checking /home/phi/.local/share/applications/defaults.list and /home/phi/.local/share/applications/mimeinfo.cache
wine-extension-txt.desktop
In .config/mimeapps.list, there *is* Mousepad, but only as an "Added Association":
[Added Associations]
x-scheme-handler/http=xfce4-web-browser.desktop;
x-scheme-handler/https=xfce4-web-browser.desktop;
text/html=org.xfce.mousepad.desktop;firefox.desktop;
As far as I understand, this should not make it become the default. When I move it to [Default Applications], it is detected by xdg-mime too.
It is possible that I once manually edited mimepps.list, so maybe it's an exotic problem - or maybe not. Bug either way?
Last edited by phil294 (2022-08-19 22:50:29)
Offline
I have a similar problem when I (think) I create a new wine prefix - it creates associations and defaults them to active. Here is a wine faq entry on how to prevent that from happening (though I haven't tried it yet).
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks! But just for clarification, this isn't specific to Wine. If I remove the Wine stuff, xdg-mime opens up Atom instead and so on. Still a mismatch.
Offline
Even if you "remove the Wine stuff", any configuration that it changed at some point on top of its own config files will remain active on your system.
Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please!
Offline
I meant removing Wine's entry from the mime database. Then just the next editor takes its place.
In other words, this thread has nothing to do with Wine, but with the fact that xdg-mime and Xfce default applications show different results.
Offline
[ Generated in 0.007 seconds, 8 queries executed - Memory usage: 535.33 KiB (Peak: 536.17 KiB) ]