Bug 375110

Summary: Open with doesn't remember application association
Product: [Applications] digikam Reporter: Dan Dascalescu <ddascalescu+kde>
Component: Usability-OpenWithAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, laurakittyinka, metzpinguin, olena.herasym
Priority: NOR    
Version: 5.4.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.5.0
Sentry Crash Report:
Attachments: Open With doesn't remember application
The Open With dialog after I've added IrfanView as the default application
The Ubuntu Open With
I no longer see this problem in 5.5.0
open with dialog doesnt show applications to open with

Description Dan Dascalescu 2017-01-15 20:34:09 UTC
Created attachment 103432 [details]
Open With doesn't remember application

1. Right click a .jpg file
2. Choose Open With...
3. Pick an executable
4. Tick the <<Remember application association for all file of type "JPEG Image" (image/jpeg)>> box
5. Click OK
6. Right click the same file and choose Open With.

Note there is no default application anywhere. I can see the executable in the history drop-down, but there's no default, and I have to go through the selection step again and again. Open With is far less useful than I hoped.
Comment 1 Maik Qualmann 2017-01-15 21:00:50 UTC
Work here under a KF5 desktop as expected. The remembered program is the first in the "Open with" list.

Maik
Comment 2 Dan Dascalescu 2017-01-15 21:11:48 UTC
The screenshot is from running the appimage on Ubuntu. Do I need to anything else for the associations to work?
Comment 3 Barbara Scheffner 2017-01-15 23:47:31 UTC
Reproducible here with AppImage 5.5.0 under Kubuntu 16.04, Plasma 5.8.5.
Comment 4 Maik Qualmann 2017-01-16 06:56:23 UTC
This option sets only the default program to open (for example Dolphin). No changes are made in the "Open with" dialog. Only in the digiKam "Open with" context menu is this program now in the first place.

Maik
Comment 5 Dan Dascalescu 2017-01-16 15:45:34 UTC
Created attachment 103439 [details]
The Open With dialog after I've added IrfanView as the default application

@Maik:

> This option sets only the default program to open (for example Dolphin). No
> changes are made in the "Open with" dialog.

I'm not sure I understand the point of the "Open With" menu then. Is it to configure *the system's Open With*? That seems just out of scope, when there are OS or file manager -level ways of setting default applications (e.g. in Ubuntu, right click on a file in Files, go to Properties, choose Open With).

> Only in the digiKam "Open with" context menu is this program now in the first place.

When I open the Open With dialog, I see no program in any place (please refer to the first screenshot). Only if I click the drop-down, do I see a recent program, but that's cumbersome and it doesn't make opening files with an alternate application much faster.
Comment 6 Dan Dascalescu 2017-01-16 15:47:28 UTC
Created attachment 103440 [details]
The Ubuntu Open With

This attachment is of the Open With mechanism in Ubuntu's Files, which I find actually effective. Ideally I'd like a shortcut to open with the the default application, e.g. Shift+F4, since F4 is the default app (Image Editor).
Comment 7 caulier.gilles 2017-01-16 17:03:29 UTC
Open With permit to select application register in Desktop to open file.

Some desktop as KDE permit to customize it, other no.

The other way to open file with default application permit to choose an application, also registered in Desktop, to open quickly the file with preferred one.

These features are only supported under Linux. MacOS and Windows still to do.

Perhaps in the future (i hope), QDesktopService integration framework will provide an universal API for this feature. For the moment, it's relevant of KDE API, which only work of course under Linux.

Gilles Caulier
Comment 8 Dan Dascalescu 2017-01-22 06:20:54 UTC
Created attachment 103583 [details]
I no longer see this problem in 5.5.0
Comment 9 olenaherasym 2018-02-11 11:37:05 UTC
Created attachment 110532 [details]
open with dialog doesnt show applications to open with

This problem repeated in digikam 5.8.0  in debian stretch. Each time I go to open with I have dialog with empty list.
Comment 10 Maik Qualmann 2018-02-11 12:07:38 UTC
You can try to run kbuildsycoca5 from the console.

Maik
Comment 11 olenaherasym 2018-02-11 12:14:31 UTC
kbuildsycoca5  returns:
kbuildsycoca5 running...
Reusing existing ksycoca
Recreating ksycoca file ("/home/olenka/.cache/ksycoca5_en_fwE6nAJSNRQ1oW4QVBWIO8WmNg4=", version 303)
Still in the time dict (i.e. deleted files) ("apps")
kf5.kservice.sycoca: Parse error in  "/home/olenka/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line  1 , col  1 :  "unexpected end of file"
Saving

File xdg-desktop-menu-dummy.menu is empty.