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 freswa (frederik) - Sunday, 13 September 2020, 13:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
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 100%
Votes 13
Private No

Details

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

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.

See:
https://bbs.archlinux.org/viewtopic.php?id=163172

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

Closed by  freswa (frederik)
Sunday, 13 September 2020, 13:40 GMT
Reason for closing:  Upstream
Additional comments about closing:  Please report this upstream. We don't ship our own desktop file.
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.

see http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/
Comment by Matthias Dienstbier (fs4000) - Saturday, 01 November 2014, 14:51 GMT
The specification has been updated: http://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html

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

[Default Applications]
inode/directory=org.gnome.Nautilus.desktop;
text/plain=org.gnome.gedit.desktop;

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 https://bugzilla.gnome.org/show_bug.cgi?id=747706
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 https://aur.archlinux.org/packages/shared-mime-info-gnome/

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

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
Fixed.
Comment by Peter Weber (hoschi) - Monday, 02 September 2019, 20:46 GMT
Hello!
This happens now again:

1.) Download file with Epiphany
2.) Click on directory icon
3.) Anjuta and the responsible application opens?!

$ xdg-mime query default inode/directory
anjuta.desktop

But I cannot fix it with the existing workaround anymore :(
Comment by Peter Weber (hoschi) - Monday, 02 September 2019, 20:56 GMT
The new fix should be:
$ xdg-mime query default inode/directory org.gnome.Nautilus.desktop

Anyway, Anjuta got removed from 'gnome' and 'gnome-extra' and I think that is a good decision. If your not already replaced it by Anjuta with GNOME-Builder, I suggest this.

Loading...