You are not logged in.

#1 2018-05-21 00:19:21

6ng4n
Member
Registered: 2012-02-07
Posts: 80

Is xdg-mime article wrong?

Recently I needed to rearrange some of my default apps including my web browser. I consulted wiki about xdg-mime. In the section mime-apps.list ( https://wiki.archlinux.org/index.php/XD … eapps.list ). It's said that

~/.config/mimeapps.list

is now the default path for overriding user defaults and

~/.local/share/applications/mimeapps.list

is deprecated. However the results I've gotten is quite opposite. The xdg-mime and xdg-settings commands go straight to ~/.local . It's advised to create symlink to .config/mimeapps.list in the article but this action results in xdg-mime moving the symlink around in .local/share/applications folder without properly modifying it which in the end results in non-modified defaults.

I could've go and change the article straight away but it has a reference to XDG standart which is somewhat parallel to wiki if the user has defined some environment variables like $XDG_CONFIG_DIRS but the xdg-* apps themselves behave differently with default configurations.

So what is the correct way? Leaving the article as-is, I think, is misleading.


PS: I don't know if there's any difference in other DEs and configs but I grepped my environment

$ env | grep -i xdg
XDG_VTNR=1
XDG_SESSION_ID=c2
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_CLASS=user
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CURRENT_DESKTOP=KDE
XDG_SEAT=seat0
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session2

Offline

#2 2018-05-21 06:33:07

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 613

Re: Is xdg-mime article wrong?

The previous recommendation was to create the link in the opposite direction so you either have an old version or xdg-mime behaves inconsistently for XDG_SESSION_DESKTOP=KDE.

Offline

#3 2018-05-21 17:21:44

6ng4n
Member
Registered: 2012-02-07
Posts: 80

Re: Is xdg-mime article wrong?

My system was fully update when I tried to set the defaults. @lahwaacz How does it behave on your system?

Offline

#4 2018-05-21 20:40:39

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 613

Re: Is xdg-mime article wrong?

It writes to ~/.config/mimeapps.list, though I don't have XDG_SESSION_DESKTOP=KDE. You can see the /usr/bin/xdg-mime file (it's just a simple ugly shell script) to see that KDE is handled differently than anything else - which sounds like a bug...

Last edited by lahwaacz (2018-05-21 20:40:59)

Offline

#5 2018-05-22 08:44:16

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,541

Re: Is xdg-mime article wrong?

I wouldn't be at all suprised to find out that the xdg-mime command is simply outdated and doing deprecated things. wink

For some incredibly strange reason wink the xdg-utils wrapper scripts are *always* super out of date unless you're using a detected desktop environment which interjects its own, much more modern XDG handlers.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB