Launcher opens Trash with wrong apps, because it uses xdg-open

Bug #958833 reported by Edward Donovan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ayatana Design
Fix Released
Undecided
Unassigned
One Hundred Papercuts
Fix Released
Undecided
Unassigned

Bug Description

When I click on the Launcher's Trash icon, the image viewer opens, with the message "No images found in 'trash:///'." At other times totem has been chosen to open the directory. (Once, when the trash was full of large files, totem's efforts to open them all locked up the machine.)

What I expected was: the Trash folder opened with the file manager.

This is my penance, for the sin of having opened a directory, in Nautilus, with an app that it suggested. 'eog' and totem are the applications I have chosen in the past.

[I note, in Precise in early April now, that Nautilus only seems to suggest 'open folder' specifically. Otherwise it's "Find more applications". For me, that's what I want to do, and as long as any user can make that choice, I think this report applies.]

I have figured out how to find and edit the mimeapps.list file, and remove lines like this:

  [Added Associations]
  inode/directory=eog.desktop;totem.desktop;

But I really don't want to do that! I still find those entries useful, in Nautilus' context menu. Of course, many people, like the rest of my family, would not dig into that, but start to think that Ubuntu doesn't get along very well with them.

This is senselessly confusing behavior, and I'm going to try nominating it as a papercut. There's at least one way it can be solved simply; whatever the maintainers choose, I would love to see it solved for Precise.

The simplest fix I can see is to call Nautilus directly, and that seems very reasonable to me. The associations in mimeapps.list only get involved because we call

  xdg-open trash:///

in TrashLauncherIcon.cpp, at line 94.

Unity doesn't try to integrate other choices of file manager, as far as I can see. The options for default applications (when I eventually found them! ;) , don't include a choice of file manager.

It looks like Nautilus is Unity's file manager. Can't the Launcher call it directly, and not leave some users off in the weeds?

Thanks.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity 5.6.0-0ubuntu4

Revision history for this message
Edward Donovan (edward.donovan) wrote :

Well, as of some recent upgrade, my Nautilus no longer offers "Open With", for directories. So that route to the problem is closed, for the moment.

I haven't found the changelog for that yet, or discussion about it.

If that's gone, I'm gonna miss that feature, and if I got it back, this bug might still be an issue. Maybe I can do a wishlist bug for that, but I'll wait and see what's happening. 'Til after Precise, anyway.

So I'll see what happens in the next few weeks of development before changing this bug status, I guess.

Revision history for this message
Edward Donovan (edward.donovan) wrote :

Ah, we're back. ;-)

The disappearance of "open with" was a regression, not a plan, apparently. Bug #964186.

So, the problem I described is still in place. I know there are other bugs dealing with broader issues of .desktop files for folders. I think that this problem, Trash opened with wrong apps, does not need to wait on their resolution. As far I can tell, we seem better off just calling Nautilus instead of xdg-open. Thanks.

Revision history for this message
Edward Donovan (edward.donovan) wrote :

Here's a patch to replace 'xdg-open' with 'nautilus', when clicking the Launcher's Trash icon. It's a one-liner.

description: updated
tags: added: patch
tags: added: file-associations
summary: - Launcher opens Trash with wrong apps, via xdg-open
+ Launcher opens Trash with wrong apps, because it uses xdg-open
Revision history for this message
Jan Claeys (janc) wrote :

I think calling xdg-open is the right thing to do (otherwise it will break for people who don't (want to) use nautilus), but maybe there should/could be some way to open the "trash" differently than "real" folders...?

I also think you should set the *default* application for folders to something sane. ;)
(I have multiple apps associated with folders, but leave nautilus as the default one.)

Revision history for this message
Edward Donovan (edward.donovan) wrote :

Jan, thanks for taking a look. I went over this again, to think about it some more, and respond. In the process, I finally got to the point where I can't reproduce it.

I removed all the .desktop files, from ~/.local/share/applications, that apps had left in the past -- I had never touched them manually. There was a version of nautilus-folder-handler.desktop, that was different from the one under /usr/share... Perhaps that was the one.

At any rate, the bug is gone for me. When I use Nautilus to open a folder with eog or totem, that no longer screws up Nautilus opening the trash. So a user on a new install would, hopefully, have no problems. And a user with old cruft like my system has, can clean out the ~/.local/share/applications/ directory. There do not seem to be any others clamoring about this, anyway. :)

I can't tell for sure if Nautilus and the system .desktop files have changed to fix this for me, or if I just finally cleaned out enough cruft from old versions. So I'm gonna mark it 'Invalid', rather than 'Fix Released' -- probably not that important. Thanks.

Changed in ayatana-design:
status: New → Invalid
Changed in hundredpapercuts:
status: New → Invalid
Revision history for this message
Edward Donovan (edward.donovan) wrote :

Now I think I'd call it a dupe of bug 797000. Which is fixed now, and I'm going to mark it so. And dupe this one. Adios, hopefully.

Changed in ayatana-design:
status: Invalid → Fix Released
Changed in hundredpapercuts:
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.