Bug 476275 - kde-open opens mistyped files as URLs
Summary: kde-open opens mistyped files as URLs
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.24.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-29 04:43 UTC by armando.sano
Modified: 2023-10-29 04:43 UTC (History)
1 user (show)

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 armando.sano 2023-10-29 04:43:48 UTC
SUMMARY
When `kde-open` is called on an incomplete or mistyped file name, it attempts to open it as a URL

STEPS TO REPRODUCE
In Konsole, write `kde-open incomplete_filename`, where incomplete_filename is any incomplete or mistyped filename (and not a string containing 'http').

OBSERVED RESULT
Launches the default web browser and attempts to open the URL  `http://incomplete_filename`

EXPECTED RESULT
Write an error message and don't leave Konsole prompt.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04 (live USB)
(available in About System)
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
This situation occurs e.g. after partial auto-completion in terminal, when several files in a directory have the same base name but different extensions, as common with computer code, latex files etc. I'd like to be presented with an error message in terminal so I can complete the filename without the detour by Firefox, so to me this is a significant nuisance. 

`xdg-open` in KDE uses `kde-open`, so this behaviour is reproduced by `xdg-open` in KDE, but is absent in non-KDE distributions (i.a. Xubuntu). Developers of `xdg-utils` would like to know if this is expected behaviour from KIO (in which case they would fix it their end), or if this should be fixed in KIO. To me it sounds like the latter is more sensible as we shouldn't presume URLs that don't look like URLs?

I initially asked this on https://askubuntu.com/questions/1490165/prevent-xdg-open-to-open-mistyped-files-as-urls and then filed a bug at `xdg-utils` https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/233.

I tried this on a live Kubuntu 22.04 USB too, so the behaviour is independent of my configuration.

Thanks!