IgnorantGuru / spacefm

SpaceFM File Manager
http://ignorantguru.github.com/spacefm/
GNU General Public License v3.0
489 stars 72 forks source link

"open with" option doesn't work adobe reader #260

Closed rsplenum closed 11 years ago

rsplenum commented 11 years ago

can't set adobe reader as default pdf viewer and when I open a pdf file from spacefm adobe reader opens but doesn't load the file but this doesn't happen in thunar or nautilus. Also all apps in the openwith all apps menu are shown twice. I love spacefm for the wide options it offers but this really bumps me out. PLEASE some help.

IgnorantGuru commented 11 years ago

can't set adobe reader as default pdf viewer and when I open a pdf file from spacefm adobe reader opens but doesn't load the file

1) Please right-click on a pdf file, go into the Open menu, and RIGHT-click on Adobe Reader. In the mime menu, enter the "/usr" submenu and click the .desktop menu item (eg adobe.desktop, or whatever the name is). That should open the /usr/share/applications desktop file for Adobe Reader in your text editor. Please paste those contents here or in pastebin or gist. Also make a note of the full path of the .desktop file (loaded in your editor).

2) Also, right-click on a pdf file, go into the Open menu, and RIGHT-click on the same Adobe Reader. If the .desktop file listed in that menu (not in the /usr menu but in the top mime menu) does NOT have "(_copy) next to it, also click on that and include those contents as well, and also note the full path. (That refers to a local copy of the desktop file in your home folder, if present.) If it DOES say (_copy), do not click it.

Repeat steps 1 and 2 above for the duplicate "Adobe Reader" listed in the Open menu, and include those result(s) separately as 3 and 4. Also make a note of the path(s) of those file(s).

Also all apps in the openwith all apps menu are shown twice.

You can read about how SpaceFM determines associated apps here. I don't think SpaceFM will list the same desktop file twice, but if there are duplicates with different names it could cause this. The above info might give a clue as to what's happening on your system to cause this.

rsplenum commented 11 years ago

Contents of /usr/share/applications/acroread.desktop

[Desktop Entry] Name=Adobe Reader 9 MimeType=application/pdf;application/vnd.fdf;application/vnd.adobe.pdx;application/vnd.adobe.xdp+xml;application/vnd.adobe.xfdf; Exec=acroread %U Type=Application GenericName=PDF Viewer Terminal=false Icon=acroread Caption=PDF Viewer X-KDE-StartupNotify=false Categories=Application;Office;Viewer;X-Red-Hat-Base; InitialPreference=9

contents of /home/rahul/.local/share/applications/arcoread.desktop

[Desktop Entry] Name=Adobe Reader 9 MimeType=application/pdf;application/vnd.fdf;application/vnd.adobe.pdx;application/vnd.adobe.xdp+xml;application/vnd.adobe.xfdf; Exec=acroread %U Type=Application GenericName=PDF Viewer Terminal=false Icon=acroread Caption=PDF Viewer X-KDE-StartupNotify=false Categories=Application;Office;Viewer;X-Red-Hat-Base; InitialPreference=9

here is a screenshot of all apps shown twice: Screenshot - 02042013 - 11:16:16 PM

IgnorantGuru commented 11 years ago

I don't see anything in those desktop files to cause a problem with opening the file, and I tested it by substituting another app for acroread. So the problem is likely something in Adobe Reader, perhaps related to the environment set when you start spacefm, but I don't use Adobe Reader. You might also run spacefm from a terminal like this to see if any info is printed to the terminal:

killall -w spacefm; spacefm

You didn't include the paths of the desktop files for the duplicate entries in the Open menu - are they the same? Seeing the contents of ~/.local/share/applications/mimeapps.list may also help.

You might try right-clicking on a duplicate and selecting Remove.

jpfleury commented 11 years ago

I too have the "duplicate entries" problem. All applications appear twice:

duplicate-entries

For comparison, I don't have this problem with Thunar:

thunar-entries

IgnorantGuru commented 11 years ago

It would be helpful to know the desktop file path associated with each entry, per my instructions above. Where are the desktop files for these duplicated apps located on your system? You likely have more than one for each (eg /usr/share/applications and /usr/local/share/applications ?) Screenshots don't help much with this, but I'll take a look at the code in general.

SpaceFM does not prohibit two desktop files from having the same name, though it should not list desktop files with the same filename. That's why knowing the file paths is critical to determine what on your system is triggering this behavior.

The mime specs are very poorly maintained these days, so there is no well-defined proper behavior. SpaceFM follows the published spec, but you can expect different file managers and other apps to behave differently in this area. It could be another app is misconfiguring your mime files and this is why spacefm is producing these apparent duplicates on your system. You need to demonstrate that spacefm is not behaving according to spec for me to spend much time on this - otherwise one can spend endless hours trying to address these misconfigured mime problems.

IgnorantGuru commented 11 years ago

Looking at the code on this, I don't believe spacefm is listing duplicates for a given desktop filename. Perhaps you have, for example, a desktop file somewhere named "appname.desktop", and another one named "appnamex.desktop". If these two have the same "Name=" entry within them, and they're both associated with the file type, they will both be listed. This is by design and according to spec.

This could also explain why Adobe Reader isn't opening for the OP - perhaps you have an old .desktop file with an old executable name, but the same Name= key.

SpaceFM looks in the following directories for desktop files (unless your system uses unusual system dirs) in order of preference: ~/.local/share/applications/ /usr/share/applications/ /usr/local/share/applications/

The first file it finds with the filename it's looking for (eg acroread.desktop) is the one it will display.

Note that the OP listed the following paths: /usr/share/applications/acroread.desktop /home/rahul/.local/share/applications/arcoread.desktop

Note that those desktop filenames do not match (arcoread vs acroread) - thus they are treated as different entries. Even if they both contain "Name=Adobe Reader", they will each be listed.

rsplenum commented 11 years ago

Here are the files list of the directories:

  1. /usr/share/applications/

7zFM.desktop acroread.desktop assistant.desktop avahi-discover.desktop bssh.desktop bvnc.desktop catfish.desktop chromium.desktop clipgrab.desktop cups.desktop dconf-editor.desktop designer.desktop exo-file-manager.desktop exo-mail-reader.desktop exo-preferred-applications.desktop exo-terminal-emulator.desktop exo-web-browser.desktop flash-player-properties.desktop foxitreader.desktop gksu.desktop gksu-properties.desktop globaltime.desktop gmenu-simple-editor.desktop gnome-mplayer.desktop gnome-sound-recorder.desktop gparted.desktop gpicview.desktop gstreamer-properties.desktop hplip.desktop htop.desktop i3.desktop libfm-pref-apps.desktop linguist.desktop lxappearance.desktop lxde-logout.desktop lxinput.desktop lxmusic.desktop lxrandr.desktop lxtask.desktop lxterminal.desktop makemkv.desktop metacity.desktop midori.desktop midori-private.desktop mimeinfo.cache mobilemediaconverter.desktop mousepad.desktop mplayer.desktop nm-applet.desktop nm-connection-editor.desktop obconf.desktop openbox.desktop panel-desktop-handler.desktop panel-preferences.desktop pcmanfm.desktop pcmanfm-desktop-pref.desktop pidgin.desktop qtconfig.desktop qv4l2.desktop ristretto.desktop session-properties.desktop spacefm.desktop spacefm-find.desktop spacefm-folder-handler.desktop synapse.desktop Thunar-bulk-rename.desktop Thunar.desktop Thunar-folder-handler.desktop thunar-settings.desktop thunar-volman-settings.desktop tint2conf.desktop tracker-needle.desktop tracker-preferences.desktop transcoder.desktop transmission-gtk.desktop uget-gtk.desktop uxterm.desktop wine.desktop xfburn.desktop xfcalendar.desktop xfce4-about.desktop xfce4-accessibility-settings.desktop xfce4-appfinder.desktop xfce4-clipman.desktop xfce4-dict.desktop xfce4-mime-settings.desktop xfce4-mixer.desktop xfce4-notes.desktop xfce4-notifyd-config.desktop xfce4-power-manager-settings.desktop xfce4-run.desktop xfce4-screenshooter.desktop xfce4-sensors.desktop xfce4-session-logout.desktop xfce4-settings-editor.desktop xfce4-taskmanager.desktop xfce4-terminal.desktop xfce-backdrop-settings.desktop xfce-display-settings.desktop xfce-keyboard-settings.desktop xfce-mouse-settings.desktop xfce-session-settings.desktop xfce-settings-manager.desktop xfce-ui-settings.desktop xfce-wm-settings.desktop xfce-wmtweaks-settings.desktop xfce-workspaces-settings.desktop xfce-xfcalendar-settings.desktop xnoise.desktop xterm.desktop

  1. ~/.local/share/applications/

acroread.desktop cxassoc-cxoffice-0:application_x-crossover-cxarchive::restore.desktop cxassoc-cxoffice-0:application_x-crossover-exe::install.desktop cxassoc-cxoffice-0:application_x-crossover-exe::run.desktop cxassoc-cxoffice-0:application_x-crossover-lnk::run.desktop cxassoc-cxoffice-0:application_x-crossover-msi::install.desktop cxassoc-cxoffice-1:application_x-crossover-c4p::install.desktop cxassoc-cxoffice-1:application_x-crossover-tie::install.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword::open.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel::open.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme::open.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme::show.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::new.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::open.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::show.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.presentation.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.presentation::show.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slide.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slide::show.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slideshow.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.template.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.template::open.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.template::show.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.sheet.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.template.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.template::open.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.document.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.template.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.template::open.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-dothtml.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-pothtml.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-ppthtml.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-xlshtml.desktop cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-xlthtml.desktop cxmenu-cxoffice-0-29ra4ke-Install+Windows+Software.desktop cxmenu-cxoffice-0-29ra4ke-Manage+Bottles.desktop cxmenu-cxoffice-0-29ra4ke-Preferences.desktop cxmenu-cxoffice-0-29ra4ke-Register+and+Unlock+this+Demo.desktop cxmenu-cxoffice-0-29ra4ke-Run+a+Windows+Command.desktop cxmenu-cxoffice-0-29ra4ke-Terminate+Windows+Applications.desktop cxmenu-cxoffice-0-29ra4ke-Uninstall+CrossOver+Linux.desktop cxmenu-cxoffice-0-29ra4ke-User+Documentation.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-0g8j70m-Digital+Certificate+for+VBA+Projects.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-0g8j70m-Microsoft+Clip+Organizer.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-0g8j70m-Microsoft+Office+2007+Language+Settings.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-0g8j70m-Microsoft+Office+Diagnostics.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-0g8j70m-Microsoft+Office+Document+Imaging.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-0g8j70m-Microsoft+Office+Document+Scanning.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-0g8j70m-Microsoft+Office+Picture+Manager.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-1qv24ea-Microsoft+Office+Excel+2007.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-1qv24ea-Microsoft+Office+PowerPoint+2007.desktop cxmenu-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76-1qv24ea-Microsoft+Office+Word+2007.desktop defaults.list mimeapps.list mimeinfo.cache

  1. /usr/local/share/applications/ is EMPTY.

The contents of the three files in ~/local/share/applications namely defaults.list, mimeapps.list,mimeinfo.cache are pasted below,

i. defaults.list

[Default Applications] x-content/win32-software=cxassoc-cxoffice-0:application_x-crossover-exe::install.desktop application/x-crossover-exe=cxassoc-cxoffice-0:application_x-crossover-exe::install.desktop application/x-ms-dos-executable=cxassoc-cxoffice-0:application_x-crossover-exe::install.desktop application/x-ms-shortcut=cxassoc-cxoffice-0:application_x-crossover-lnk::run.desktop application/x-crossover-lnk=cxassoc-cxoffice-0:application_x-crossover-lnk::run.desktop application/x-win-lnk=cxassoc-cxoffice-0:application_x-crossover-lnk::run.desktop application/x-ms-win-installer=cxassoc-cxoffice-0:application_x-crossover-msi::install.desktop application/x-msi=cxassoc-cxoffice-0:application_x-crossover-msi::install.desktop application/x-crossover-msi=cxassoc-cxoffice-0:application_x-crossover-msi::install.desktop application/x-crossover-cxarchive=cxassoc-cxoffice-0:application_x-crossover-cxarchive::restore.desktop application/x-crossover-c4p=cxassoc-cxoffice-1:application_x-crossover-c4p::install.desktop application/x-crossover-tie=cxassoc-cxoffice-1:application_x-crossover-tie::install.desktop application/rtf=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop application/x-crossover-wbk=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop text/vnd.graphviz=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop text/rtf=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop application/msword=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop application/vnd.ms-word=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop application/x-msword=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop application/msword-template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop application/vnd.ms-excel=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop application/msexcel=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop application/x-msexcel=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop application/vnd.openxmlformats-officedocument.wordprocessingml.document=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.document.desktop application/x-crossover-dothtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-dothtml.desktop application/vnd.openxmlformats-officedocument.wordprocessingml.template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.template.desktop application/vnd.ms-powerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop application/powerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop application/x-mspowerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop application/x-crossover-pwz=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop application/mspowerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop text/x-pot=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop application/x-crossover-pothtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-pothtml.desktop application/vnd.openxmlformats-officedocument.presentationml.template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.template.desktop application/vnd.openxmlformats-officedocument.presentationml.slideshow=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slideshow.desktop application/x-crossover-ppthtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-ppthtml.desktop application/vnd.openxmlformats-officedocument.presentationml.presentation=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.presentation.desktop application/vnd.openxmlformats-officedocument.presentationml.slide=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slide.desktop application/x-crossover-thmx=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme.desktop application/vnd.ms-officetheme=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme.desktop application/x-crossover-xlshtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-xlshtml.desktop application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.sheet.desktop application/x-crossover-xlthtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-xlthtml.desktop application/vnd.openxmlformats-officedocument.spreadsheetml.template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.template.desktop

ii. mimeapps.list

[Added Associations] x-scheme-handler/http=exo-web-browser.desktop;chromium.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 text/plain=mousepad.desktop; video/x-flv=mplayer.desktop; application/pdf=foxitreader.desktop;acroread.desktop; audio/mpeg=gnome-mplayer.desktop;mplayer.desktop; image/x-xcursor=mousepad.desktop; application/x-rar=7zFM.desktop; video/x-matroska=mplayer.desktop; video/mp4=mplayer.desktop;

[Default Applications] application/pdf=acroread.desktop application/x-rar=7zFM.desktop video/x-matroska=mplayer.desktop x-scheme-handler/http=chromium.desktop

iii. mimeinfo.cache

[MIME Cache] application/msexcel=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop; application/mspowerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::show.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::new.desktop; application/msword=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword::open.desktop; application/msword-template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword::open.desktop; application/pdf=acroread.desktop; application/powerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::show.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::new.desktop; application/rtf=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop; application/vnd.adobe.pdx=acroread.desktop; application/vnd.adobe.xdp+xml=acroread.desktop; application/vnd.adobe.xfdf=acroread.desktop; application/vnd.fdf=acroread.desktop; application/vnd.ms-excel=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop; application/vnd.ms-officetheme=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme::show.desktop; application/vnd.ms-powerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::show.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::new.desktop; application/vnd.ms-word=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword::open.desktop; application/vnd.openxmlformats-officedocument.presentationml.presentation=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.presentation::show.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.presentation.desktop; application/vnd.openxmlformats-officedocument.presentationml.slide=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slide::show.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slide.desktop; application/vnd.openxmlformats-officedocument.presentationml.slideshow=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.slideshow.desktop; application/vnd.openxmlformats-officedocument.presentationml.template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.template::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.template::show.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.presentationml.template.desktop; application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.sheet.desktop; application/vnd.openxmlformats-officedocument.spreadsheetml.template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.template::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.spreadsheetml.template.desktop; application/vnd.openxmlformats-officedocument.wordprocessingml.document=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.document.desktop; application/vnd.openxmlformats-officedocument.wordprocessingml.template=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.template::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.openxmlformats-officedocument.wordprocessingml.template.desktop; application/x-crossover-c4p=cxassoc-cxoffice-1:application_x-crossover-c4p::install.desktop; application/x-crossover-cxarchive=cxassoc-cxoffice-0:application_x-crossover-cxarchive::restore.desktop; application/x-crossover-dothtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-dothtml.desktop; application/x-crossover-exe=cxassoc-cxoffice-0:application_x-crossover-exe::run.desktop;cxassoc-cxoffice-0:application_x-crossover-exe::install.desktop; application/x-crossover-lnk=cxassoc-cxoffice-0:application_x-crossover-lnk::run.desktop; application/x-crossover-msi=cxassoc-cxoffice-0:application_x-crossover-msi::install.desktop; application/x-crossover-pothtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-pothtml.desktop; application/x-crossover-ppthtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-ppthtml.desktop; application/x-crossover-pwz=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop; application/x-crossover-thmx=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-officetheme::show.desktop; application/x-crossover-tie=cxassoc-cxoffice-1:application_x-crossover-tie::install.desktop; application/x-crossover-wbk=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop; application/x-crossover-xlshtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-xlshtml.desktop; application/x-crossover-xlthtml=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_x-crossover-xlthtml.desktop; application/x-ms-dos-executable=cxassoc-cxoffice-0:application_x-crossover-exe::run.desktop;cxassoc-cxoffice-0:application_x-crossover-exe::install.desktop; application/x-ms-shortcut=cxassoc-cxoffice-0:application_x-crossover-lnk::run.desktop; application/x-ms-win-installer=cxassoc-cxoffice-0:application_x-crossover-msi::install.desktop; application/x-msexcel=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop; application/x-msi=cxassoc-cxoffice-0:application_x-crossover-msi::install.desktop; application/x-mspowerpoint=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::show.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::new.desktop; application/x-msword=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop; application/x-win-lnk=cxassoc-cxoffice-0:application_x-crossover-lnk::run.desktop; text/csv=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop; text/rtf=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop; text/vnd.graphviz=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_msword::open.desktop; text/x-comma-separated-values=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop; text/x-csv=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-excel.desktop; text/x-pot=cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::open.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint.desktop;cxassoc-cxoffice-ba93de82-7c9a-4a4f-ab9e-443bfdc1fd76:application_vnd.ms-powerpoint::show.desktop; x-content/win32-software=cxassoc-cxoffice-0:application_x-crossover-exe::install.desktop;

I can't right click on those duplicated entries so don't know where they lie. Also I don't know whether I should ask this or not but can you please include a search bar in spacefm, I know there is a search app under file menu but having it in the main windows would be more convinient.

IgnorantGuru commented 11 years ago

I can't right click on those duplicated entries so don't know where they lie.

Why can't you right-click on them? If you're using an old version of spacefm, that could be the problem. If you're not seeing the mime menu when you right click on apps in the Open menu, you're probably using a version of spacefm before the mime handling was rewritten. If so you simply need to upgrade. Please run

spacefm --version

Also:

grep -r '^Name *= *Adobe Reader' /usr/share/applications ~/.local/share/applications

I don't see anything in those files that would create this behavior, so its likely you have multiple desktop files with different filenames but the same Name= key in them. Perhaps whatever created all of those application_x-crossover-lnk files created this problem. As yet I see nothing to indicate spacefm out of spec.

Also note that the [Default Applications] section in mimeapps.list is erroneous - it doesn't belong in that file according to mime specs, so some app on your system is not behaving correctly. As I said this is common and the specs are poorly maintained, but this should not be the cause of the duplicate names in SpaceFM.

IgnorantGuru commented 11 years ago

Nothing has been presented here to indicate SpaceFM is out of spec. Feel free to add further comments below or add the output of the commands I asked you to run, and I can reopen this issue if needed.

jpfleury commented 11 years ago

Screenshots don't help much with this

Yes, sorry, I was too tired to write a useful comment, then I put it aside. Anyway, if I have anything new about that, I'll write here. Thanks.

jpfleury commented 11 years ago

The "duplicate entries" problem occurs with XFCE. I've tested on virtualbox with a fresh install of XFCE, then a fresh install of SpaceFM. There's no custom config (all is the default config), and SpaceFM is still listing duplicate entries.

Note that I don't have the "duplicate entries" problem in the "Open menu", nor in the "Associated Apps" list, but only in the "All Apps" list.

Folders ~/.local/share/applications/ or /usr/local/share/applications/ don't exist:

$ locate /applications/
/usr/share/applications/Thunar-bulk-rename.desktop
/usr/share/applications/Thunar-folder-handler.desktop
/usr/share/applications/Thunar.desktop
/usr/share/applications/abiword.desktop
/usr/share/applications/alacarte.desktop
/usr/share/applications/apport-gtk-mime.desktop
/usr/share/applications/blueman-manager.desktop
/usr/share/applications/catfish.desktop
/usr/share/applications/debian-uxterm.desktop
/usr/share/applications/debian-xterm.desktop
/usr/share/applications/defaults.list
/usr/share/applications/evince.desktop
/usr/share/applications/exo-file-manager.desktop
/usr/share/applications/exo-mail-reader.desktop
/usr/share/applications/exo-preferred-applications.desktop
/usr/share/applications/exo-terminal-emulator.desktop
/usr/share/applications/exo-web-browser.desktop
/usr/share/applications/file-roller.desktop
/usr/share/applications/firefox.desktop
/usr/share/applications/gcalctool.desktop
/usr/share/applications/gcr-prompter.desktop
/usr/share/applications/gcr-viewer.desktop
/usr/share/applications/gigolo.desktop
/usr/share/applications/gksu.desktop
/usr/share/applications/globaltime.desktop
/usr/share/applications/gmusicbrowser.desktop
/usr/share/applications/gnome-sudoku.desktop
/usr/share/applications/gnomine.desktop
/usr/share/applications/gthumb-import.desktop
/usr/share/applications/gthumb.desktop
/usr/share/applications/gucharmap.desktop
/usr/share/applications/hplj1020.desktop
/usr/share/applications/ibus-setup.desktop
/usr/share/applications/ibus.desktop
/usr/share/applications/im-switch.desktop
/usr/share/applications/language-selector.desktop
/usr/share/applications/leafpad.desktop
/usr/share/applications/mimeinfo.cache
/usr/share/applications/nm-applet.desktop
/usr/share/applications/nm-connection-editor.desktop
/usr/share/applications/onboard-settings.desktop
/usr/share/applications/onboard.desktop
/usr/share/applications/panel-desktop-handler.desktop
/usr/share/applications/panel-preferences.desktop
/usr/share/applications/parole.desktop
/usr/share/applications/pavucontrol.desktop
/usr/share/applications/pidgin.desktop
/usr/share/applications/python2.7.desktop
/usr/share/applications/python3.2.desktop
/usr/share/applications/ristretto.desktop
/usr/share/applications/screensavers
/usr/share/applications/shares.desktop
/usr/share/applications/simple-scan.desktop
/usr/share/applications/software-properties-gtk.desktop
/usr/share/applications/spacefm-find.desktop
/usr/share/applications/spacefm-folder-handler.desktop
/usr/share/applications/spacefm.desktop
/usr/share/applications/system-config-printer.desktop
/usr/share/applications/thunar-settings.desktop
/usr/share/applications/thunar-volman-settings.desktop
/usr/share/applications/thunderbird.desktop
/usr/share/applications/time.desktop
/usr/share/applications/transmission-gtk.desktop
/usr/share/applications/ubuntu-software-center.desktop
/usr/share/applications/update-manager.desktop
/usr/share/applications/users.desktop
/usr/share/applications/xchat.desktop
/usr/share/applications/xfburn.desktop
/usr/share/applications/xfcalendar.desktop
/usr/share/applications/xfce-backdrop-settings.desktop
/usr/share/applications/xfce-display-settings.desktop
/usr/share/applications/xfce-keyboard-settings.desktop
/usr/share/applications/xfce-mouse-settings.desktop
/usr/share/applications/xfce-session-settings.desktop
/usr/share/applications/xfce-settings-manager.desktop
/usr/share/applications/xfce-ui-settings.desktop
/usr/share/applications/xfce-wm-settings.desktop
/usr/share/applications/xfce-wmtweaks-settings.desktop
/usr/share/applications/xfce-workspaces-settings.desktop
/usr/share/applications/xfce-xfcalendar-settings.desktop
/usr/share/applications/xfce4-about.desktop
/usr/share/applications/xfce4-accessibility-settings.desktop
/usr/share/applications/xfce4-appfinder.desktop
/usr/share/applications/xfce4-dict.desktop
/usr/share/applications/xfce4-mime-settings.desktop
/usr/share/applications/xfce4-notes.desktop
/usr/share/applications/xfce4-notifyd-config.desktop
/usr/share/applications/xfce4-power-manager-settings.desktop
/usr/share/applications/xfce4-run.desktop
/usr/share/applications/xfce4-screenshooter.desktop
/usr/share/applications/xfce4-session-logout.desktop
/usr/share/applications/xfce4-settings-editor.desktop
/usr/share/applications/xfce4-taskmanager.desktop
/usr/share/applications/xfce4-terminal.desktop
/usr/share/applications/xscreensaver-properties.desktop
/usr/share/applications/yelp.desktop
/usr/share/applications/screensavers/antspotlight.desktop
/usr/share/applications/screensavers/fiberlamp.desktop
/usr/share/applications/screensavers/fuzzyflakes.desktop
/usr/share/applications/screensavers/glblur.desktop
/usr/share/applications/screensavers/glcells.desktop
/usr/share/applications/screensavers/glmatrix.desktop
/usr/share/applications/screensavers/glschool.desktop
/usr/share/applications/screensavers/glslideshow.desktop
/usr/share/applications/screensavers/gltext.desktop
/usr/share/applications/screensavers/hypertorus.desktop
/usr/share/indicators/messages/applications/pidgin
/usr/share/indicators/messages/applications/thunderbird
/usr/share/xubuntu/applications/Thunar-bulk-rename.desktop
/usr/share/xubuntu/applications/Thunar.desktop
/usr/share/xubuntu/applications/debian-uxterm.desktop
/usr/share/xubuntu/applications/debian-xterm.desktop
/usr/share/xubuntu/applications/defaults.list
/usr/share/xubuntu/applications/xfce4-terminal.desktop
/usr/share/xubuntu/applications/xfhelp4.desktop

It seems that duplicate entries really references the same desktop file. See these steps:

Result 1: the desktop file is located on /usr/share/applications/*.desktop.

Result 2: there are no duplicate entries in the "Open menu". The application set as default is listed only once, but maybe

Result 3: the desktop file is located on /usr/share/applications/*.desktop. The path is the same as the result 1, so it seems that the same file is listed twice.

Also, here's another test: if I delete a file in /usr/share/applications/, for example /usr/share/applications/xfce4-about.desktop, then I update the database, this entry is no longer listed in any menu by SpaceFM. Again it seems that the same file is listed twice in the "All Apps" list.

IgnorantGuru commented 10 years ago

This behavior may have changed with the fix for #405. That also adds tooltips so if there are duplicates listed, you'll now see why.

Also see #392 for a possible explanation of why Adobe Reader is affected (has an invalid desktop file that uses %U instead of %F?)

jpfleury commented 10 years ago

This behavior may have changed with the fix for #405.

Yes, I confirm that the next branch solves my "duplicate entries" problem.