Export to GitHub

rawtherapee - issue #1398

Remove inode/directory from supported mime-types


Posted on Jun 5, 2012 by Massive Rhino

In gentoo, installing rawtherapee results in associating inode/directory with it. Every time xdg-open is called with the directory as a parameter, the rawtherapee is launched.

Comment #1

Posted on Jun 5, 2012 by Grumpy Bird

Intentional, so that you can open a folder via right-clicking on it in your file manager or digital asset management program.

Comment #2

Posted on Jul 10, 2012 by Grumpy Bird

Issue 1476 has been merged into this issue.

Comment #3

Posted on Jul 10, 2012 by Grumpy Bear

That's a good point, but it's overwriting the file managers, so we can't really right click the folder to open it. This really inconveniences me especially, as whenever I try to open a folder by right clicking a download in Firefox, it tries to open the folder in RawTherapee.

I don't think this is an expected side effect. There must be some other way to do this?

Comment #4

Posted on Jul 10, 2012 by Grumpy Bird

The issue is invalid because the desktop file is correct. Any issues that arise with default applications are not the fault of RT or its desktop file.

http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s07.html http://standards.freedesktop.org/desktop-entry-spec/latest/apc.html

How did you install RT, and what desktop manager do you use?

Comment #5

Posted on Jul 10, 2012 by Swift Dog

Comment deleted

Comment #6

Posted on Jul 10, 2012 by Grumpy Bear

I installed it through my distro's package manager (pacman), and I use Xfce 4.10.

Comment #7

Posted on Jul 10, 2012 by Grumpy Bird

I read through the shared-mime-info-spec and it only explains how to set your application as the default for a given mime-type, not how not to. You might want to take this issue up with your distro, pacman might have some control over defaults.

ps. should be WontFix not Invalid

Comment #8

Posted on Jul 11, 2012 by Massive Lion

As a maintainer of the rawtherapee package in Arch Linux I think I should chime in.

I read through the shared-mime-info-spec and it only explains how to set your application as the default for a given mime-type, not how not to.

This is exactly the problem. While you can easily add a new MIME handler, it is difficult to change the default handler and it depends on the desktop environment. It is relatively easy to change the default (per user) in KDE. In GNOME 2 it was pain but it was still possible. However the users which use simple window managers have no way to change the defaults.

pacman might have some control over defaults.

This is not possible (see above). Arch Linux is aiming at the use of vanilla packages. The MIME cache is handled by the update-mime-database utility that is associated with the shared-mime-info-spec. This utility doesn't allow to change the priority of applications. Generally, there's no way to set low priority for rawtherapee.

So let me reiterate why having inode/directory in the desktop file is a really bad thing. It is not possible to affect the defaults during the installation (unless you fiddle with the freedesktop's mime info package). This results in possibility that the user is presented with the strange defaults that are almost impossible to change if a desktop environment is not used. Moreover rawtherapee is not a file manager, so having inode/directory makes absolutely no sense.

On the other hand adding a new mime handler is really easy. Also most of the file managers allows adding of custom actions.

To sum up, having inode/directory creates a lot of problems, while it's benefits are very low. That is because: 1. Rawtherapee is not a file manager. 2. Mime type handling is rather unpredictable on Linux, which results in: 3. If the rawtherapee is made default for inode/directory for some reason, it is difficult to change the defaults. The user can be presented with useless system. 5. The only small and questionable benefit is that it is possible to open directory directly in RT. However users who wants this can easily add custom actions in theirs file manager or add a new mime type handler.

Comment #9

Posted on Jul 11, 2012 by Grumpy Bird

Should we also remove the JPEG, TIFF and PNG associations because RT is a raw photo editor? Should Gimp not associate itself with PDF files, Photoshop PSD, cursor files and vector images because it is primarily a raster image editor and Arch will do something stupid if you install Gimp after installing a PDF viewer or Inkscape?

"Moreover rawtherapee is not a file manager, so having inode/directory makes absolutely no sense." That's not an argument, the conclusion does not follow from the premise, it's your opinion. RT can handle paths as input (from file managers or other digital asset management programs such as digiKam) to display the images inside, to do this is must be associated with folders, therefore that mime-type is justified. What's more, it is inline with the Freedesktop specification which states that MimeType= contains a list of all mime types supported by the program, not just those that should be opened with it by default.

I acknowledge that some people will experience something unexpected and unwanted, but I don't think the solution is to cripple all desktops that understand mime-type priorities because a minority still doesn't. How does Arch handle the Gimp association "issues" I listed above?

Comment #10

Posted on Jul 12, 2012 by Massive Lion

Should we also remove the JPEG, TIFF and PNG associations because RT is a raw photo editor?…

No, because rawtherapee can be used pretty well for viewing any kind of supported image files. However it is absolutely unusable as a file manager. And, in my opinion, file manager is one of the basic parts of the desktop that should work out-of-the-box.

Arch will do something stupid if you install Gimp after installing a PDF viewer or Inkscape?

It is not just Arch, it is pretty much every distribution out there. I saw this kind of problems, such as Gimp being associated with PDF files by default, on Fedora, OpenSuSE and some old Ubuntu. It is a deficiency of the mime handling on Linux desktop in general. However, I can't say there is no distribution using some strange, non-standard way to fix this kind of problems.

RT can handle paths as input (from file managers or other digital asset management > programs such as digiKam) to display the images inside…

Firefox can open directories, geeqie can open directories, digikam's showfoto can open directories and so on. There are dozens of applications that can open directories, but none of them has the inode/directory listed. Why is rawtherpee the only one?

I acknowledge that some people will experience something unexpected and unwanted, but I don't think the solution is to cripple all desktops that understand mime-type priorities because a minority still doesn't.

So because I don't have inode/directory for like 50% of all GUI applications listed in the desktop file I have a crippled desktop? That is ridiculous. What I call crippled desktop is a desktop where file manager can't be used.

How does Arch handle the Gimp association "issues" I listed above?

You are saying that like it is an Arch-specific problem. It isn't. However, most of the applications are sane enough to not to use mime types that would wreak a havoc on the desktop.

Comment #11

Posted on Jul 12, 2012 by Grumpy Bird

RT isn't a photo viewer, it's an editor, and PNG images are typically not photos, so we should remove that... or we keep it, because it's supported by RT though we don't suggest anyone actually have RT associated with PNG files as the primary application - which is in line with Freedesktop. Same for everything else.

I asked about Arch because you said you are an Arch maintainer. I won't discuss other systems. I guess the answer to that question was "yes, it will."

Wouldn't make sense for digiKam to associate with folders, it can't open them. It only opens "albums" - folders within its "collections". Anyways I won't speak for any of them.

Building a straw-man and then burning him won't help us get anywhere. I'm open minded about this and I can change my mind, but it will take a good argument or force. If there is no way to avoid this problem for distros which don't understand priority then I will be forced to remove it.

I ask again, how does Arch handle Gimp taking over PDF for default, or any other obviously unwanted mime-type association by any other program?

Comment #12

Posted on Jul 16, 2012 by Massive Lion

I reply again, Arch doesn't handle Gimp taking over PDF, nor any other application.

And again, no distribution that can handle it. It depends on the desktop environment. KDE and GNOME handle MIME types, but there are tons of other light DEs and WMs for which MIME handling is out of their scope (often the xdg-open is used). And it's their users that will suffer from the decision to include inode/directory.

If the freedesktop guys provided a way to avoid such unwanted file associations, or if they would at least provide a way to revert the change, we wouldn't be having this discussion. Unfortunately this is not the case and we need to deal with the consequences.

Having the inode/directory in the desktop file causes real problems, while it's not essential.

Comment #13

Posted on Jul 17, 2012 by Grumpy Bird

Very well, removed.

Comment #14

Posted on Jul 18, 2012 by Massive Lion

Thank you.

I hope that MIME type handling on Linux will be improved some day, so using mime types such as inode/directory won't cause any problems.

Status: Fixed

Labels:
Type-Defect Priority-Low