Bug 469903

Summary: When "default browser" was set to a custom desktop file that didn't come from the browser itself, links open with KRun as an io worker e.g. "file:///home/username/.cache/kioexec/krun/11894_0/enter_bug.cgi" )
Product: [Frameworks and Libraries] frameworks-kio Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kdelibs-bugs-null, nate, nicolas.fella
Priority: NOR    
Version First Reported In: 5.106.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: chromium.desktop installed with the app
chromium (wayland).desktop created with kmenuedit

Description Patrick Silva 2023-05-17 16:52:32 UTC
STEPS TO REPRODUCE
1.  use "Report bug..." feature of Dolphin or another KDE app
2. 
3. 

OBSERVED RESULT
the default browser opens file:///home/username/.cache/kioexec/krun/11894_0/enter_bug.cgi

EXPECTED RESULT
the default browser opens the correct bugzilla url, so we can report the bug

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-05-17 19:16:52 UTC
Cannot reproduce.

This would imply that the default browser is not set up correctly.

Is this a new install? Or is it an old install, and it just started happening randomly, out of the blue?
Comment 2 Patrick Silva 2023-05-17 19:34:53 UTC
You are right. For some reason, Firefox is not available as an option in Default Applications KCM. Then I used the option "Other...' to choose
an option that runs Firefox natively on Wayland created with kmenuedit. If I choose the Firefox option automatically created when Firefox was installed instead, the bug does not occur.  I can also reproduce the bug when setting an option that runs Chromium natively on Wayland created with kmenuedit as default browser.
Comment 3 Nate Graham 2023-05-18 14:16:33 UTC
Thanks.

Can you attach the desktop file that you created whch triggers the bug, and also the desktop file that comes installed with the app, so we can see the differences between them?
Comment 4 Patrick Silva 2023-05-18 16:04:51 UTC
Created attachment 159082 [details]
chromium.desktop installed with the app
Comment 5 Patrick Silva 2023-05-18 16:06:20 UTC
Created attachment 159083 [details]
chromium (wayland).desktop created with kmenuedit
Comment 6 Nicolas Fella 2023-05-18 16:08:06 UTC
The problem is that the %U got lost from the Exec= line
Comment 7 Patrick Silva 2023-05-18 16:20:50 UTC
I have added "%U" to beginning of "Command-line arguments" field of the .desktop files in kmenuedit, saved the change and now the bug is fixed. :)
Thank you Nicolas.
Comment 8 Nate Graham 2023-05-18 16:21:57 UTC
:)