! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
exo shouldn't take x-scheme-handler/file mimetype
Status:
RESOLVED: FIXED

Comments

Description Kevin Fenzi 2011-02-08 22:42:49 CET
From downstream report: 

https://bugzilla.redhat.com/show_bug.cgi?id=674321

Basically exo causes problems for other desktops by setting up these mime types. 

From the report: 

--cut--
Something has added a "x-scheme-handler/file=exo-file-manager.desktop" record
in my ~/.local/share/applications/mimeapps.list file. This seriously messed up
overall functionality of gvfs-open (called through xdg-open). I only get a "The
location is not a folder" error (coming from Nautilus probably).

g_file_query_default_handler() is correct in this case and behaves according to
settings.

So my question is, why exo-file-manager.desktop contains this scheme handler in
a first case? Same situation with x-scheme-handler/trash.

As long as /usr/share/applications/mimeinfo.cache is composed from available
desktop files, this borked overall system functionality.

Version-Release number of selected component (if applicable):
exo-0.6.0-1.fc15.x86_64

How reproducible:
always

Steps to Reproduce:
1. install exo
2. gvfs-open /tmp/file.pdf
3. see a x-scheme-handler/file picked up before application/pdf
--cut--

So, things work fine for Xfce users, but people who switch desktops or normally run gnome or the like are getting messed up. ;( 

Not sure what the solution might be.
Comment 1 Nick Schermer editbugs 2011-04-08 22:10:13 CEST
Let Gnome users complain at bugzilla.gnome.org. They removed the on place we could influence the behaviour of gio in a decent way. So instead, knowing this would make things harder for not-fully-Xfce users, I choose to make it work for us.

Make exo-open could be a bit more intelligent, if so, I can fix that, but if Gnome decides to not care about others, I fix it the ugly way.
Comment 2 Kevin Fenzi 2011-04-10 21:44:41 CEST
Another comment from the downstream report: 

"One way to solve this for XFCE and other DEs would be (I think) having an
exo-file-scheme.desktop file which would carry "MimeType:
x-scheme-handler/file;" and an accompanying script/program which would dispatch
the call to "exo-open --launch FileManager ..." if running under XFCE or plain
"exo-open ..." if not. I checked that the latter indeed calls the appropriate
application.

Another way could be to find out if XFCE needs to have "MimeType:
x-scheme-handler/file;" defined at all, and if not, delete it."
Comment 3 Tomas Bzatek 2011-04-12 17:11:58 CEST
(In reply to comment #1)
> Let Gnome users complain at bugzilla.gnome.org. They removed the on place we
> could influence the behaviour of gio in a decent way. So instead, knowing this
> would make things harder for not-fully-Xfce users, I choose to make it work for
> us.

Could you please point me to the discussion so that we can find out the requirements?
 
> Make exo-open could be a bit more intelligent, if so, I can fix that, but if
> Gnome decides to not care about others, I fix it the ugly way.

I'm not aware of what exactly exo-open does, but the x-scheme-handler takes priority on search - how do you handle finding the appropriate application for the given type, avoiding hitting the scheme handler?
Comment 4 Tomas Bzatek 2011-04-26 16:51:19 CEST
There was a suggestion to replace "x-scheme-handler/file" with "inode/directory" to change the search priorities.
Comment 5 Nick Schermer editbugs 2011-05-02 18:26:04 CEST
See also http://bugs.gentoo.org/365711.
Comment 6 Nick Schermer editbugs 2011-05-08 23:06:44 CEST
Dropped the mime-types for all the exo-open desktop files in 2e3744b. We only use this for menus and stuff, should not be used for opening files in thunar etc.
Comment 7 Daniel Hahler 2014-05-29 13:21:13 CEST
Please re-open.

This bug was re-introduced later, see the log:
http://git.xfce.org/xfce/exo/log/exo-open/exo-file-manager.desktop.in

It looks like the suggestion from Tomas works:

> There was a suggestion to replace "x-scheme-handler/file" with "inode/directory" to change the search priorities.


diff --git i/exo-open/exo-file-manager.desktop.in w/exo-open/exo-file-manager.desktop.in
index 3d7653e..8d0a6cf 100644
--- i/exo-open/exo-file-manager.desktop.in
+++ w/exo-open/exo-file-manager.desktop.in
@@ -7,6 +7,6 @@ StartupNotify=true
 Terminal=false
 Categories=Utility;X-XFCE;X-Xfce-Toplevel;
 OnlyShowIn=XFCE;
-X-XFCE-MimeType=x-scheme-handler/file;x-scheme-handler/trash;
+X-XFCE-MimeType=inode/directory;x-scheme-handler/trash;
 _Name=File Manager
 _Comment=Browse the file system


(for reference, the bug in Launchpad/Ubuntu: https://bugs.launchpad.net/ubuntu/natty/+source/exo/+bug/956255)
Comment 8 Yves-Alexis Perez editbugs 2014-08-07 21:28:11 CEST
Nick or Jannis, could someone take a look at the last patch and maybe commit it if it sounds sane?
Comment 9 Sean Davis editbugs 2015-03-17 03:37:20 CET
Reopening to get it back on the radar.
Comment 10 Sean Davis editbugs 2015-03-18 00:47:58 CET
The patch is sane and sufficient to me, applied at http://git.xfce.org/xfce/exo/commit/?id=b74caf97642ae2bf00a7754a5fb193f695b6f3d4
Comment 11 jose1711 2019-01-28 21:59:32 CET
possible duplicate: https://bugzilla.xfce.org/show_bug.cgi?id=15046

can someone please confirm?

Bug #7257

Reported by:
Kevin Fenzi
Reported on: 2011-02-08
Last modified on: 2019-01-28

People

Assignee:
Nick Schermer
CC List:
7 users

Version

Attachments

Additional information