Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-08-19 19:40:21

phil294
Member
Registered: 2022-08-19
Posts: 3

Default applications don't seem to correspond to xdg-mime

Hello,

I've associated text/plain with Mousepad as seen below:

mime dialog

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

#2 2022-08-19 22:33:26

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Default applications don't seem to correspond to xdg-mime

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

#3 2022-08-19 22:49:10

phil294
Member
Registered: 2022-08-19
Posts: 3

Re: Default applications don't seem to correspond to xdg-mime

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

#4 2022-08-20 05:04:03

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Default applications don't seem to correspond to xdg-mime

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! tongue

Offline

#5 2022-08-20 16:42:06

phil294
Member
Registered: 2022-08-19
Posts: 3

Re: Default applications don't seem to correspond to xdg-mime

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

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 8 queries executed - Memory usage: 535.33 KiB (Peak: 536.17 KiB) ]