Bug 433300 - kio-fuse makes man: and info: unusable in Firefox
Summary: kio-fuse makes man: and info: unusable in Firefox
Status: RESOLVED FIXED
Alias: None
Product: kiofuse
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.0.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: a.saoutkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-20 08:33 UTC by Tomas Trnka
Modified: 2021-02-22 15:31 UTC (History)
3 users (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 Tomas Trnka 2021-02-20 08:33:45 UTC
SUMMARY
Recently, kio-fuse got installed on my system by an OS update (Fedora 33). Since then, opening man: (and also info:) URLs no longer works with my default browser set to Firefox (I assume the same might apply to any non-KIO browser).

STEPS TO REPRODUCE
1. Set your default browser (or association for text/html) to Firefox
2. Bring up KRunner using Alt+F2 and enter "man:bash" OR run "xdg-open man:bash" in a terminal OR run "kioclient exec man:bash" in a terminal
3. Observe Firefox opening a completely blank page

OBSERVED RESULT
Firefox navigates to file:///run/user/500/kio-fuse-EzPluU/man/bash, which is a nonexistent file. There is just one file in /run/user/500/kio-fuse-EzPluU/ called "man" (it's not a directory). This file contains the top-level index of manual sections, with links to URLs like "man:(1)". Attempting to open one of these links fails just like the "bash" example.

EXPECTED RESULT
A HTML rendering of the requested manual page opens in Firefox, with working hyperlinks to other manual pages (man: urls; this requires associating man: in Firefox with /usr/bin/xdg-open). Disabling kio-fuse (systemctl --user mask kio-fuse.service) makes this work like before: The man kioslave produces a temporary HTML file in ~/.cache/kioexec/krun/8312_0/bash, which is then opened by the browser.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Comment 1 Bug Janitor Service 2021-02-21 20:59:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/kio-fuse/-/merge_requests/51
Comment 2 Fabian Vogt 2021-02-21 21:10:43 UTC
(In reply to Tomas Trnka from comment #0)
> OBSERVED RESULT
> Firefox navigates to file:///run/user/500/kio-fuse-EzPluU/man/bash, which is
> a nonexistent file. There is just one file in /run/user/500/kio-fuse-EzPluU/
> called "man" (it's not a directory). This file contains the top-level index
> of manual sections, with links to URLs like "man:(1)".

Yeah, that's the problem. According to KIO::stat, "man:/" is a regular file
(you can "kioclient5 cat man:"), but listDir is also implemented. It's not
really possible to support that in kio-fuse, so the MR linked above detects
that behaviour and causes mounting to fail, triggering a fallback to the
kioexec copy.
Comment 3 Fabian Vogt 2021-02-22 15:31:08 UTC
Git commit b1dfbaa60b3f38e0890cc4c17b0fd9d663e6eedd by Fabian Vogt.
Committed on 21/02/2021 at 21:02.
Pushed by asaoutkin into branch 'master'.

Error out when ioslaves state that / is a regular file

Reject mounting slaves with this incompatible behaviour, it can't be mapped
to FUSE semantics completely.

M  +11   -0    kiofusevfs.cpp
M  +20   -0    tests/fileopstest.cpp

https://invent.kde.org/system/kio-fuse/commit/b1dfbaa60b3f38e0890cc4c17b0fd9d663e6eedd