Plasma 5 Plasma-desktop 5.4.1-2 Arch Linux Okular 0.23.1 If I right-click on a picture and change the file association to Gwenview, Okular still opens the images. If I check the associations, they were reset. Even if I go to systemsettings5, they don't hold my settings for Gwenview, Okular, and images. Reproducible: Always Steps to Reproduce: 1. Change file type association for .png for example to open with Gwenview 2. Open image 3. Okular still opens up the image Actual Results: The file type associations for images (and only for images from what I've noticed) reset to open with Okular Expected Results: My settings should not reset n/a
can you attach your .local/share/applications/mimeapps.list and a screenshot of the systemsettings page where you saved it what does "xdg-open /path/to/some.png" open with? finally can you see if running: update-desktop-database .local/share/applications changes anything
update-desktop-database is a wrong hint, we don't use that in KDE. Better test kde-open than xdg-open (which might end up calling kde-open or something else depending on the type of session etc.). But yes the main thing is, did mimeapps.list get updated correctly. And then, does running `kbuildsycoca5` help? (although systemsettings is supposed to do that already anyway)
Created attachment 94832 [details] Contains mimeapps.list and screenshots of my settings
Here are the commands I used, and what happened after denoted by `#->` ... [john@john-archlinux ~]$ xdg-open /$HOME/Downloads/1.png #-> Opened with Okular [john@john-archlinux ~]$ update-desktop-database .local/share/applications [john@john-archlinux ~]$ xdg-open /$HOME/Downloads/1.png #-> Opened with Okular [john@john-archlinux ~]$ kbuildsycoca5 Could not find drkonqi at /usr/lib/drkonqi kbuildsycoca5 running... Reusing existing ksycoca Recreating ksycoca file ("/home/john/.cache/ksycoca5", version 303) Still in the time dict (i.e. deleted files) ("apps") Parse error in "/home/john/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line 1 , col 1 : "unexpected end of file" Menu "applications-kmenuedit.menu" not found. Saving Emitting notifyDatabaseChanged ("apps") [john@john-archlinux ~]$ xdg-open /$HOME/Downloads/1.png #-> Opened with Okular ... In mimeapps.list, I noticed these lines: image/png=org.kde.gwenview.desktop;kde4-kolourpaint.desktop;shotwell-viewer.desktop;gimp.desktop; # image/png=org.kde.gwenview.desktop; # image/png=kde4-okularApplication_kimgio.desktop;kde4-okularApplication_kimgio.desktop;
Comment on attachment 94832 [details] Contains mimeapps.list and screenshots of my settings Please try kde-open5 rather than xdg-open. Where is org.kde.gwenview.desktop installed? Does this command find it? `qtpaths --locate-file GenericDataLocation applications/org.kde.gwenview.desktop` What does this show? `ktraderclient5 --mimetype image/png | grep DesktopEntryPath`
Here is my output: [john@john-archlinux ~]$ kde-open5 /$HOME/Downloads/1.png #-> opens with Okular [john@john-archlinux ~]$ qtpaths --locate-file GenericDataLocation applications/org.kde.gwenview.desktop /usr/share/applications/org.kde.gwenview.desktop [john@john-archlinux ~]$ ktraderclient5 --mimetype image/png | grep DesktopEntryPath Request for unknown property "UntranslatedGenericName" Request for unknown property "UntranslatedGenericName" Request for unknown property "UntranslatedGenericName" Request for unknown property "UntranslatedGenericName" Request for unknown property "X-GIO-NoFuse" Request for unknown property "X-GNOME-FullName" Request for unknown property "X-GNOME-Gettext-Domain" DesktopEntryPath : '/usr/share/applications/kde4/okularApplication_kimgio.desktop' DesktopEntryPath : '/usr/share/applications/org.kde.gwenview.desktop' DesktopEntryPath : '/usr/share/applications/kde4/kolourpaint.desktop' Request for unknown property "UntranslatedGenericName" Request for unknown property "X-GNOME-Bugzilla-Bugzilla" Request for unknown property "X-GNOME-Bugzilla-Component" Request for unknown property "X-GNOME-Bugzilla-OtherBinaries" Request for unknown property "X-GNOME-Bugzilla-Product" Request for unknown property "X-GNOME-Bugzilla-Version" DesktopEntryPath : '/usr/share/applications/shotwell-viewer.desktop' DesktopEntryPath : '/usr/share/applications/gimp.desktop'
So mimeapps.list looks good, but the trader query returns okular on top. I tried to reproduce this here but it all works here. There must be something else we're missing. Do you set $XDG_DATA_HOME? Does `qtpaths --locate-files GenericDataLocation applications/mimeapps.list` return other mimeapps.list files? Same with applications/kde-mimeapps.list, just in case (I expect "no such file or directory"). An even safer way to find out which files are being used is `strace -e open kbuildsycoca5 |& grep mimeapps` Does the same happen if you temporarily move away mimeapps.list? After all the InitialPreference in org.kde.gwenview.desktop is 8 while the InitialPreference in okularApplication_kimgio.desktop is 1, so it should even work out of the box. But of course I still want to track down the bug, this is just an additional data point. You still have okularApplication_kimgio.desktop in [Removed Associations], right? In that case it shouldn't even be anywhere in the trader results (and this is the case for me here). Any chance for recompiling kservice with the two debug statements in KMimeAssociations::parseRemovedAssociations enabled?
I don't know what $XDG_DATA_HOME is. Log: [john@john-archlinux ~]$ qtpaths --locate-files GenericDataLocation applications/mimeapps.list /home/john/.local/share/applications/mimeapps.list [john@john-archlinux ~]$ qtpaths --locate-files GenericDataLocation applications/kde-mimeapps.list [john@john-archlinux ~]$ strace -e open kbuildsycoca5 |& grep mimeapps I removed the mimeapps.list and set the default app for .png, Okular still opened. kularApplication_kimgio.desktop is in [Removed Associations]. "Any chance for recompiling kservice with the two debug statements in KMimeAssociations::parseRemovedAssociations enabled?" I'll try that later.
OK I see KMimeAssociations::parseRemovedAssociations listed here: http://api.kde.org/frameworks-api/frameworks5-apidocs/kservice/html/kmimeassociations_8cpp_source.html Are you referring to the if / else statement? Also, how would I go about this in Arch, or in general?
OK I installed kservice with the debug statements uncommented. In the meantime, I open a .png file with Gwenview in terminal and got this: "Could not find drkonqi at /usr/lib/drkonqi KSambaShare: Could not find smb.conf!" Next, I decided to use the "Open with:" dialog and "remember" the application association. Here is a screenshot: https://i.imgur.com/9RizzHL.png The filetype associations are now respected, but only if I set them using the Open With dialog.
I noticed that after registering these file associations using this workaround, there are now two entries for Gwenview: gwenview and Gwenview Screenshots: https://i.imgur.com/8L6gHdE.png https://i.imgur.com/MMXJ9sn.png
After using the workaround in Comment 10, I get errors when trying to open images, with Gwenview. Screenshot: https://i.imgur.com/mBMRRrk.png The system looks confused listing because it is listing gwenview and Gwenview. After remembering Gwenview to open a filetype through the Open With menu, two gwenview entries are shown, and now Gwenview is unable to open anything.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!