Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#35528 - [anjuta] 3.8 corrupts mime-type setting for inode/directory

Attached to Project: Arch Linux
Opened by Peter Weber (hoschi) - Wednesday, 29 May 2013, 07:50 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 28 July 2016, 11:18 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 13
Private No


It seem that anjuta-3.8.x or it's package in Archlinux corrupts the mime-type settings.
$ xdg-mime query default inode/directory

This will results it weird behaviour. As an example, if a user selects to open the directory from a webbrowser (in which a file was saved from download-manager), this action will open anjuta and not nautilus.


Additional info:
* package version(s): anjuta-3.8.x
* config:
$ xdg-mime query default inode/directory # print current setting
$ xdg-mime default nautilus.desktop inode/directory # workaround to fix this

Thank you

Steps to reproduce:
This task depends upon

Comment by Matthias Dienstbier (fs4000) - Wednesday, 29 May 2013, 21:25 GMT
That's the same issue as  FS#31861 . We could again kill the MIME handler but the correct solution would be to ship a defaults.list for Gnome (and possibly Xfce and LXDE or one that tries to fit them all). This would completely prevent such issues.

Comment by Matthias Dienstbier (fs4000) - Saturday, 01 November 2014, 14:51 GMT
The specification has been updated:

Gnome should ship the file /usr/share/applications/gnome-mimeapps.list with at least the following content:

[Default Applications]

This would also correctly fix  FS#5785 ,  FS#7213 ,  FS#10318 ,  FS#30034 ,  FS#31861 ,  FS#33959 ,  FS#36085  and  FS#40667 .
Comment by nicholas (nicholas) - Friday, 28 November 2014, 11:39 GMT
Adding the file as you explained it was an instant fix for me, for at least one of my use-cases.
Comment by Austin (butler360) - Monday, 22 June 2015, 19:08 GMT
Just going to note this still happens by default. Quite annoying. :-p
Comment by Andreas Radke (AndyRTR) - Thursday, 28 July 2016, 11:20 GMT
Jan and Jan, how about adding such a small default apps snippet for Gnome desktop in one of its core packages?
Comment by Jan Alexander Steffens (heftig) - Thursday, 28 July 2016, 12:12 GMT
I've been talking to upstream about this already. See
Comment by mattia (nTia89) - Wednesday, 04 October 2017, 16:58 GMT
I cannot reproduce the bug (anjuta-3.22)
Comment by Eli Schwartz (eschwartz) - Monday, 09 October 2017, 19:10 GMT
mattia, the problem is that any desktop file which declares that it *can* handle a given filetype becomes a valid option for a default file handler. See e.g. the last comment on  FS#54894 

The XDG spec defines that the default, if not provided by a user in ~/.config/mimeapps.list, shall be derived from the first cached *.desktop file in /usr/share/applications/mimeinfo.cache which is in turn recreated from scratch, with a randomized order, by update-desktop-database on every run.

In effect, the XDG standard states that the default application shall be determined by RNG, and it is the user's fault for not using a distro/DE which installs a DE-specific override.

This could be fixed for the specific case of inode/directory by supplying that DE default as whatever the flagship DE file browser is. Or by using a distro which comes with lots of apps preinstalled and sets those as the distro defaults, which is very much not the Arch Way.

If you cannot replicate this problem, then either the XDG standards have changed without telling anyone and also without any package updates, or else the last time your pacman hook ran `update-desktop-database`, the RNG chose something else as the default. :p
(Or you have overridden it.)

So this is *not* "assumed fixed upstream".
Comment by Cedric Bellegarde (gnumdk) - Tuesday, 09 January 2018, 12:32 GMT
I just uploaded this to AUR

It provides Fedora defaults for ArchLinux.
Comment by Eli Schwartz (eschwartz) - Tuesday, 09 January 2018, 12:40 GMT

Shouldn't that at least be installed as gnome-mimeapps.list, so it can be co-installed with other desktop environments without clashing? Users can have more than one DE installed on a system at the same time, you know...

See the second comment.
Comment by Cedric Bellegarde (gnumdk) - Tuesday, 09 January 2018, 12:53 GMT