Bug 493568 - Using the RMB menu "Open with..." action always fails to launch the app with an error dialog, when clicking on text that ends in a colon
Summary: Using the RMB menu "Open with..." action always fails to launch the app with ...
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: general (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-24 08:21 UTC by Oded Arbel
Modified: 2024-09-24 08:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oded Arbel 2024-09-24 08:21:23 UTC
Running Neon noble unstable, with Konsole package version 4:24.08.1+p24.04+vunstable+git20240922.1531-0. Konsole identifies itself as version 24.11.70

SUMMARY
When the terminal shows a list of files with colons at the end of them (as is common for output from `git grep` or just `grep` with various options) when right clicking a file path in the terminal output and choosing "Open with..." from the menu (or "Open With" -> "Other application"), the XDG portal "Choose Application" dialog opens. Then - no matter which application is selected - an error dialog box appears with the text:

WorkingDirectory= expects an absolute path or '~'

I have reviewed the .desktop files of the applications I'm trying to launch (most are default installed .desktop files) and none of them have the `WorkingDirectory` setting.

STEPS TO REPRODUCE
1. Open Konsole
2. Execute the following repro command: ls | sed 's,$,:,'
3. Right click any file name and choose "Open with"
4. In the dialog box that opens, choose any application

OBSERVED RESULT
An error dialog pops up and the file isn't opening

EXPECTED RESULT
The file should be opened with the specific application, or - probably more correct - the path including the colon will be sent as the argument to the application that will likely show its own error.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-45-generic (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics

ADDITIONAL INFORMATION
The problem can be worked around by going into the profile setting, the "Mouse" section and removing the colon character from the field "Word characters".

I think that having a colon as a word character for mouse selection, by default, is probably not a good idea, but removing it doesn't fix the problem that there's a surprising Konsole error dialog if it is set like that.