Bug 674321

Summary: exo shouldn't take x-scheme-handler/file mimetype
Product: [Fedora] Fedora Reporter: Tomáš Bžatek <tbzatek>
Component: exoAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 15CC: awilliam, christoph.wickert, ejsheldrake, kevin, luke.hutch, mark, matt, nphilipp, rebus, tsmetana, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedNTH
Fixed In Version: exo-0.6.2-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-16 19:00:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 657621, 678916    

Description Tomáš Bžatek 2011-02-01 13:17:08 UTC
Description of problem:
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

Comment 1 Tomáš Bžatek 2011-02-01 13:22:49 UTC
Seems to be somewhat related to http://bugzilla.xfce.org/show_bug.cgi?id=6800

Comment 2 Kevin Fenzi 2011-02-04 22:22:48 UTC
So, you are running into this when logged into a gnome desktop? 

Or are you logging into Xfce here? 

That desktop file has: 

OnlyShowIn=XFCE;

But perhaps you have logged into Xfce at some point, and are using gnome now? 

In exo-preferred-applications whats your Filemanager set to?

Comment 3 Tomáš Bžatek 2011-02-07 10:34:15 UTC
It's in pure Gnome. I don't think OnlyShowIn relates to MIME database, which is usually built as a cache by `update-mime-database`. This key is taken into account only for displaying/autospawning an application itself.

(In reply to comment #2)
> In exo-preferred-applications whats your Filemanager set to?
Probably nautilus, which explains the error. But anyway, doing roundtrip for *every* file is not a solution.

Comment 4 Kevin Fenzi 2011-02-08 21:43:21 UTC
Filed upstream: 

http://bugzilla.xfce.org/show_bug.cgi?id=7257

Comment 5 Nils Philippsen 2011-04-07 13:54:16 UTC
Hi there,

this is still the case with up-to-date Fedora 15 if exo is installed. I haven't seen any reaction in the upstream bug (which may be due to the bogus(?) target milestone of "Exo 0.3"), but we need to do something for F-15. 

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 6 Tomáš Bžatek 2011-04-12 14:53:03 UTC
I'm somewhat disappointed to see answer like this: https://bugzilla.xfce.org/show_bug.cgi?id=7257#c1. The problem is larger than Fedora, I'm fighting this on Gentoo at home so I want this to have fixed in a nice way upstream.

Even if we make use of xdg-open in non-XFCE case, it's just another useless roundtrip to the MIME database.

Let me ask in the upstream bugreport first.

Comment 7 Tomáš Bžatek 2011-05-03 11:34:25 UTC
*** Bug 701614 has been marked as a duplicate of this bug. ***

Comment 8 Michal Ambroz 2011-05-03 12:02:34 UTC
Hello guys, 
this bug is really annoying as it effectively ruins the possibility to have both (Gnome, Xfce) desktops installed at once. 
Best regards
Michal Ambroz

Comment 9 Kevin Fenzi 2011-05-04 03:11:29 UTC
Could affected folks try: 

f16: http://koji.fedoraproject.org/koji/taskinfo?taskID=3048905
f15: http://koji.fedoraproject.org/koji/taskinfo?taskID=3048910

and provide feedback?

Comment 10 Nils Philippsen 2011-05-04 12:11:15 UTC
(In reply to comment #9)
> f15: http://koji.fedoraproject.org/koji/taskinfo?taskID=3048910

Works for me insofar as downloading then opening a PDF from chromium in GNOME starts Evince, not Nautilus. I haven't tried XFCE, though.

Comment 11 Tomáš Bžatek 2011-05-04 12:31:22 UTC
(In reply to comment #9)
> f16: http://koji.fedoraproject.org/koji/taskinfo?taskID=3048905

Seems to be working fine. Opening PDF files as well as links (http schema handler) from Evolution.

I still don't understand why Exo is associated with x-scheme-handler/http{s} (it does round-trip through XFCE subsystem only resulting in spawning your browser of choice) instead of setting proper scheme handler app directly as Gnome does... But that's not my concern now.

Comment 12 Fedora Update System 2011-05-09 00:33:22 UTC
exo-0.6.0-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/exo-0.6.0-6.fc15

Comment 13 Fedora Update System 2011-05-09 03:30:29 UTC
Package exo-0.6.0-6.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing exo-0.6.0-6.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/exo-0.6.0-6.fc15
then log in and leave karma (feedback).

Comment 14 Christoph Wickert 2011-05-09 09:59:10 UTC
Adam, please make sure this gets into final. Blocking F15-accepted.

Comment 16 Kevin Fenzi 2011-05-09 13:40:03 UTC
Yes, thats exactly whats in the above update. ;) 

Sorry for not being clear that I had moved to that from my scratch build hack version.

Comment 17 Adam Williamson 2011-05-09 15:53:07 UTC
NTH status reviewed out-of-cycle at the 2011-05-09 QA meeting. Accepted as NTH as it affects smooth functioning of various default installed apps that depend on XDG standards in Xfce (a non-blocking desktop).



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 18 Fedora Update System 2011-05-16 18:59:59 UTC
exo-0.6.0-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Christoph Wickert 2011-06-11 08:34:38 UTC
Ok, upstream has now changed the handling of default apps again in 0.6.2. "MimeType" has become "X-XFCE-MimeType". This means that Xfce and other desktops now should peacefully coexist.

Comment 20 Fedora Update System 2011-06-11 08:36:20 UTC
exo-0.6.2-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/exo-0.6.2-1.fc15

Comment 21 Tomáš Bžatek 2011-06-13 09:51:13 UTC
(In reply to comment #19)
> Ok, upstream has now changed the handling of default apps again in 0.6.2.
> "MimeType" has become "X-XFCE-MimeType". This means that Xfce and other
> desktops now should peacefully coexist.

Nice work, great to hear that!

Comment 22 Fedora Update System 2011-06-24 03:49:22 UTC
exo-0.6.2-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Matt McCutchen 2011-08-30 17:33:55 UTC
I was still seeing this problem in current Fedora 15.  Somehow I had the offending exo entries in ~/.local/share/applications/mimeinfo.list; after deleting them, the problem went away.  Commenting here for others' possible benefit.

Comment 24 Tomáš Bžatek 2011-08-31 13:06:32 UTC
(In reply to comment #23)
> I was still seeing this problem in current Fedora 15.  Somehow I had the
> offending exo entries in ~/.local/share/applications/mimeinfo.list; after
> deleting them, the problem went away.  Commenting here for others' possible
> benefit.

Right, this package only affects system desktop files, you need to manually remove corresponding lines from settings in your homedir in order the fix has full effect. It's not a rule the records will be there, but it's very often the case.

Comment 25 Edward Sheldrake 2011-12-01 16:24:31 UTC
But exo-0.6.2-3.fc16 is still taking the mime types from the X-XFCE-MimeType key and adding them to the [Added Associations] section of ~/.local/share/applications/mimeapps.list. So using X-XFCE-MimeType hasn't really helped much.

I only noticed because some part of KDE was complaining about some lists in mimeapps.list not ending with ";" - but I have now also noticed "File Manager" has indeed been added to the list of programs available for every filetype.

Comment 26 Luke Hutchison 2019-01-25 03:04:20 UTC
(In reply to Tomáš Bžatek from comment #24)
> (In reply to comment #23)
> > I was still seeing this problem in current Fedora 15.  Somehow I had the
> > offending exo entries in ~/.local/share/applications/mimeinfo.list; after
> > deleting them, the problem went away.  Commenting here for others' possible
> > benefit.
> 
> Right, this package only affects system desktop files, you need to manually
> remove corresponding lines from settings in your homedir in order the fix
> has full effect. It's not a rule the records will be there, but it's very
> often the case.

I was still seeing this problem in Fedora 29 (the problem started happening around Fedora 27, on multiple systems), so went looking for the local file entries that were causing the problem. I found the problem in ~/.local/share/applications/mimeapps.list , in the "[Added Associations]" section:

x-scheme-handler/http=exo-web-browser.desktop
x-scheme-handler/https=exo-web-browser.desktop
x-scheme-handler/file=exo-file-manager.desktop
x-scheme-handler/trash=exo-file-manager.desktop
x-scheme-handler/mailto=exo-mail-reader.desktop;

Removing these lines solves the problem immediately (no need to even restart nautilus / Thunar).

Since the bug can still be triggered, even with a patched exo, it would be nice if exo could be updated to remove these lines from mimeapps.list, if present, so that old systems can be fixed just by upgrading exo.

(In reply to Edward Sheldrake from comment #25)
> But exo-0.6.2-3.fc16 is still taking the mime types from the X-XFCE-MimeType
> key and adding them to the [Added Associations] section of
> ~/.local/share/applications/mimeapps.list. So using X-XFCE-MimeType hasn't
> really helped much.
> 
> I only noticed because some part of KDE was complaining about some lists in
> mimeapps.list not ending with ";" - but I have now also noticed "File
> Manager" has indeed been added to the list of programs available for every
> filetype.

I assume this is why this started happening around Fedora 27? The bug was definitely not fixed for good back in 2011.

Comment 27 Kevin Fenzi 2019-01-29 21:58:24 UTC
I don't think exo upstream wants to edit local user data... but you could ask I suppose. Feel free to file a bug at bugzilla.xfce.org about it. 

I have no idea why your f27 installs would have started doing this again. If you can duplicate it with a currently supported release, please open a new bug...