"Open With" default associations do not exist or work in SpaceFM #118

Closed
prodigalgvs opened this Issue Jul 15, 2012 · 14 comments

Projects

None yet

4 participants

@prodigalgvs

SpaceFM ignores the default associations for file types and reverts to the secondary program in the "Open With" sub menus.

Trying to set these all manually is a gigantic pain, and often does not work at all even though the command is correct and shows up in the menu. Neither does the "set as default" option work.

Interestingly, when applicable, SpaceFM does use the default when using the EDIT sub menu and not OPEN.

Xubuntu Precise ... uptodate
SpaceFM 791

@IgnorantGuru
Owner

SpaceFM ignores the default associations for file types and reverts to the secondary program in the "Open With" sub menus.

I can't reproduce this. SpaceFM doesn't have an "Open With" submenu, merely "Open". SpaceFM 0.7.8 and later uses your mimeapps.list file to determine the default app, or else reverts to using the (deprecated) defaults.list file. You can read how it's handled here.

Is the first app listed in the file list's context menu's Open submenu used when you click the file?

Interestingly, when applicable, SpaceFM does use the default when using the EDIT sub menu and not OPEN.

The Edit submenu has nothing to do with mime types nor does it open any files with any app. So again I'm not following your report.

You'll need to provide step-by-step instructions to reproduce each individual problem you encounter. You might also include your ~/.local/share/applications/mimeapps.list file. You can examine that file in a text editor to see changes that spacefm is making to it, and to see the order of preferred apps for each mime type.

@prodigalgvs

Ya, sorry about the Open vs. Open With faux paus"_

I should have stated that the issue is not totally global, just almost
:) It Opens MP3s and Vids in the correct app.

No, the default item is not listed, but the secondary one is. For
example, Gwenview is my default for pics, but they all open in Firefox.
Same with Kate and plain text files .... (ah hah! am starting to see
the KDE factor here). Same goes for K3B project files ... So ... the
issue is KDE somehow?

On 12-07-15 12:27 AM, IgnorantGuru wrote:

SpaceFM ignores the default associations for file types and reverts to the secondary program in the "Open With" sub menus.
I can't reproduce this. SpaceFM doesn't have an "Open With" submenu, merely "Open". SpaceFM 0.7.8 and later uses your mimeapps.list file to determine the default app, or else reverts to using the (deprecated) defaults.list file. You can read how it's handled here.

Is the first app listed in the file list's context menu's Open submenu used when you click the file?

Interestingly, when applicable, SpaceFM does use the default when using the EDIT sub menu and not OPEN.
The Edit submenu has nothing to do with mime types nor does it open any files with any app. So again I'm not following your report.

You'll need to provide step-by-step instructions to reproduce each individual problem you encounter. You might also include your ~/.local/share/applications/mimeapps.list file. You can examine that file in a text editor to see changes that spacefm is making to it, and to see the order of preferred apps for each mime type.


Reply to this email directly or view it on GitHub:
#118 (comment)

Gordon Van Scheik

@IgnorantGuru
Owner

mime types are handled differently by different programs. spacefm is (mostly) freedesktop mime compliant.

If you say "the default item is not listed", what makes you believe it is the default? Is it set as the default in mimeapps.list? Merely basing the default on what another program displays does not assure accuracy in that program (wrt to freedesktop specs).

If you right-click on the desired app in the Open submenu and select 'Set As Default', does it then work as you expect? (This will cause spacefm to edit mimeapps.list.)

@prodigalgvs

Yes, it/they are set as default in mimeapps.list. And show as default
in PCManFM, Thunar, and Krusader.

The issue has to be KDE vs. SpaceFM somehow.

I am an old Kubuntu user who got sick of graphical glitches and bugs and
moved to Xubuntu a couple of years ago and love it ... but I also love
Kate, Gwenview, and K3B and have yet to find better so have stuck with
them. I still use Krusader for the twin panes occasionally, but SpaceFM
has everything I need and I would love to get rid of Krusader and
PCManFM (although it isn't bad; it just isn't quite enough).

On 12-07-15 12:46 AM, IgnorantGuru wrote:

mime types are handled differently by different programs. spacefm is (mostly) freedesktop mime compliant.

If you say "the default item is not listed", what makes you believe it is the default? Is it set as the default in mimeapps.list? Merely basing the default on what another program displays does not assure accuracy in that program.

If you right-click on the desired app in the Open submenu and select 'Set As Default', does it then work as you expect? (This will cause spacefm to edit mimeapps.list.)


Reply to this email directly or view it on GitHub:
#118 (comment)

Gordon Van Scheik

@IgnorantGuru
Owner

Please paste the relevant line from mimeapps.list, and list what apps you're seeing in spacefm's Open submenu for that mime type.

Also note that if a desktop file listed in the mime type associations in mimeapps.list can't be found in the usual places (eg ~/.local/share/applications, /usr/localshare/applications, /usr/share/applications), then it is ignored. So you might want to verify where the desktop file listed in mimeapps.list is located - perhaps KDE is putting it in a non-compliant location. If so copy it to ~/.local/share/applications.

Also, if the contents of a desktop file are invalid (or cannot be parsed properly) that could cause it to be ignored as well.

For a Kate replacement I recommend Geany. For gwenview -> geeqie, and for K3B -> Brasero is decent (but not as full-featured).

@prodigalgvs

Attached is a copy of the mimeapps.list. Note that it is located in the
"~/.local/share/applications" folder. In the other folders mentioned
there is no mimeapps.list; instead there is a mimeinfo.cache file. It
is also attached.

When I use the Open menu, Coolreader3 is listed as the only app for
plain text; for images (bmp, jpg, png) Firefox is the only app listed.

If I use the CHOOSE option and enter the correct command (kate -b %U for
example) and set it as default it shows up in the menu but does not
work. However, double-clicking on the file type does open kate or gwenview.

If I use the CHOOSE option and select the app from the "All Apps" tab I
get an "Command Not Found" message. The "Associated Apps" tab is empty
unless I manually enter the command and set it as default, which as
mentioned b4, does not work.

On 12-07-15 01:14 AM, IgnorantGuru wrote:

Please paste the relevant line from mimeapps.list, and list what apps you're seeing in spacefm's Open submenu for that mime type.

Also note that if a desktop file listed in the mime type associations in mimeapps.list can't be found in the usual places (eg ~/.local/share/applications, /usr/localshare/applications, /usr/share/applications), then it is ignored. So you might want to verify where the desktop file listed in mimeapps.list is located - perhaps KDE is putting it in a non-compliant location. If so copy it to ~/.local/share/applications.

Also, if the contents of a desktop file are invalid (or cannot be parsed properly) that could cause it to be ignored as well.

For a Kate replacement I recommend Geany. For gwenview -> geeqie, and for K3B -> Brasero is decent (but not as full-featured).


Reply to this email directly or view it on GitHub:
#118 (comment)

Gordon Van Scheik

[Added Associations]
x-scheme-handler/file=exo-file-manager.desktop
x-scheme-handler/trash=exo-file-manager.desktop
x-scheme-handler/mailto=exo-mail-reader.desktop
x-scheme-handler/news=thunderbird.desktop;
x-scheme-handler/snews=thunderbird.desktop;
x-scheme-handler/nntp=thunderbird.desktop;
x-scheme-handler/feed=thunderbird.desktop;
audio/mpeg=gmusicbrowser.desktop;userapp-mediainfo-BKB7AW.desktop;mediainfo-gui.desktop;
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/ftp=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop;
text/html=firefox.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;
audio/flac=gmusicbrowser.desktop;
application/x-bittorrent=transmission-gtk.desktop;
message/rfc822=firefox.desktop;
image/png=gwenview.desktop;kde4-gwenview.desktop;
text/plain=kate.desktop;kate-usercreated-0.desktop;

[Default Applications]
x-scheme-handler/mailto=thunderbird.desktop
x-scheme-handler/news=thunderbird.desktop
x-scheme-handler/snews=thunderbird.desktop
x-scheme-handler/nntp=thunderbird.desktop
x-scheme-handler/feed=thunderbird.desktop
audio/mpeg=gmusicbrowser.desktop
image/png=kde4-gwenview.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
audio/flac=gmusicbrowser.desktop
application/x-bittorrent=transmission-gtk.desktop
application/x-shellscript=kate.desktop;
application/octet-stream=kde4-kate.desktop
text/plain=kde4-kate.desktop
image/jpeg=kde4-gwenview.desktop
image/bmp=kde4-gwenview.desktop
image/png=kde4-gwenview.desktop

@prodigalgvs

Here is what I did to get the correct items to show in the SpaceFM menu:

  1. Copied the corresponding ".desktop" files from the
    '/usr/share/applications/kde4' folder to the '/usr/share/applications/'
    folder.
  2. Edited the mimeapps.list and removed the 'kde4-' prefix from the
    corresponding entries.
  3. Backed up and then deleted the corresponding '.desktop' files from
    '/usr/share/applications/kde4' folder (so they would not show up twice
    in other apps).

I think the fix for this in SpaceFM is a simple matter of allowing for
the 'kd4-' that is prefixed to the mimeapps.list corresponding entries.

As for now, things are working the way they should.

On 12-07-15 01:14 AM, IgnorantGuru wrote:

Please paste the relevant line from mimeapps.list, and list what apps you're seeing in spacefm's Open submenu for that mime type.

Also note that if a desktop file listed in the mime type associations in mimeapps.list can't be found in the usual places (eg ~/.local/share/applications, /usr/localshare/applications, /usr/share/applications), then it is ignored. So you might want to verify where the desktop file listed in mimeapps.list is located - perhaps KDE is putting it in a non-compliant location. If so copy it to ~/.local/share/applications.

Also, if the contents of a desktop file are invalid (or cannot be parsed properly) that could cause it to be ignored as well.

For a Kate replacement I recommend Geany. For gwenview -> geeqie, and for K3B -> Brasero is decent (but not as full-featured).


Reply to this email directly or view it on GitHub:
#118 (comment)

Gordon Van Scheik

@prodigalgvs prodigalgvs reopened this Jul 20, 2012
@IgnorantGuru
Owner

Thanks for the info - still planning on at least taking a look at this to see if its part of the mime spec or kde's extension.

@stewie
stewie commented Oct 30, 2012

From wrestling with problem(s) similar to what you've described, I suspect it is the result of KDE nonsense (and gnome does the same). Using xdg-compliant xfce desktop, you expect the .desktop files in a given path "control" what's what. Noooo... for KDE-native apps, you need to track down whether a separate KDE or GnOmE -specific override exists (globally, and/or within the user's $HOME/.config/)

In other words:
This is probably NOT a spacefm bug

@prodigalgvs

No it is not a S_FM bug. Did you see my work-around? S_FM could
however, very easily make the issue non-existent and IG and said he
would think about it.

On 12-10-29 06:25 PM, stewie wrote:

From wrestling with problem(s) similar to what you've described, I
suspect it is the result of KDE nonsense (and gnome does the same).
Using xdg-compliant xfce desktop, you expect the .desktop files in a
given path "control" what's what. Noooo... for KDE-native apps, you
need to track down whether a separate KDE or GnOmE -specific override
exists (globally, and/or within the user's $HOME/.config/)

In other words:
This is probably NOT a spacefm bug


Reply to this email directly or view it on GitHub
#118 (comment).

Gordon Van Scheik

@SanskritFritz

@prodigalgvs Thank you for the solution! Works perfectly.

@prodigalgvs

You are welcome :)

On 12-12-03 06:19 AM, SanskritFritz wrote:

@prodigalgvs https://github.com/prodigalgvs Thank you for the
solution! Works perfectly.


Reply to this email directly or view it on GitHub
#118 (comment).

Gordon Van Scheik

@IgnorantGuru
Owner

This may now be handled with changes in 2393e17 and fbb79a6 (currently in desktop branch, shortly due in next branch, and due in 0.8.7 release).

@IgnorantGuru
Owner

Closing this due to inactivity. If the problem is not resolved, please add comments below (even though the issue is closed, and I can reopen it if needed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment