SUMMARY When I'm using the terminal to navigate between LaTeX files (opened in a TUI program) and the output PDF (opened in Okular/firefox), I'm using the `xdg-open` command a lot. However it (and the `kde-open` command it calls underneath) do not accept relative paths that go outside of the current working directory's direct children, no matter the depth. STEPS TO REPRODUCE 1. Open a terminal, and navigate to any directory, let's say `~/Documents`. 2. Invoke `kde-open .` (or `xdg-open`, it should give the same result). It should open Dolphin/your filesystem browser without issues. 3. Invoke `kde-open ../foo` where foo is any directory under `~` . It should prompt an error message stating the unit is not configured properly and the operation is not permitted. OBSERVED RESULT Whenever supplying an "invalid" URI/path, it outputs a message with the following template: ``` kf.kio.gui: Failed to launch process as service: "app-org.kde.dolphin@<hash>.service" "org.freedesktop.DBus.Error.AccessDenied" "Unit app-org.kde.dolphin@<hash>.service failed to load properly, please adjust/correct and reload service manager: Operation not permitted" Unit app-org.kde.dolphin@<hash>.service failed to load properly, please adjust/correct and reload service manager: Operation not permitted ``` EXPECTED RESULT It should open the file/directory without issues. SOFTWARE/OS VERSIONS Qt Version: 6.7.2 Kernel Version: 6.9.11-200.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics Memory: 30.7 GiB of RAM Graphics Processor: AMD Radeon 780M Manufacturer: Framework Product Name: Laptop 13 (AMD Ryzen 7040Series) System Version: A7 ADDITIONAL INFORMATION - It works perfectly fine if the command `gio open ../problematic/relative/path` is used instead of `[xdg|kde]-open` ! - The workflow defined above worked just fine a few weeks ago. I'm not able to pinpoint it more specifically than that, sorry. - The commands perform as expected if an absolute path to the "problematic" paths are used instead. - Since it is mentioned nowhere on the system info, I'm running the KDE spin of Fedora, and the "full" version information of the `kde-cli-tools` package is `6.1.3-2.fc40`.
In the steps to reproduce section, on item 3 it should be noted any path will error out if outside of the child of the CWD. No matter if the thing you're trying to open is a directory or a file.
Works fine here using Tuxedo OS and current git master. This looks like a permission problem involving dbus. Are you using flatpaks or snaps of any of the involved applications? Is maybe SELinux involved?
I am using a few Flatpak-installed applications, but this problem happens no matter where I instantiate the command from. It happens when using it from WezTerm (installed via Flatpak) and Konsole (installed by-default by the KDE spin of Fedora, not through Flatpak). As far as I'm aware, I haven't made any modifications to my DBus setup, other then what Fedora provides as default. For SELinux, it seems to be enabled on my machine yes (`sestatus` prints 'Current mode: enforcing') but as explained in my original post, it didn't seem to happen a few weeks ago.
I can reproduce this on base Fedora in a VM, just installation and full upgrades, no other changes. It doesn't happen on Tuxedo OS with the same version. It might be something Fedora specific, or a kde bug that only appears with newer system packages than what Tuxedo provides. You may want to report a bug on Fedora's bug tacker just in case.
When opening relative urls from the parent, I get the error ``` kf.kio.gui: Failed to launch process as service: "app-org.kde.dolphin@5bc014e857b84d0c97016e4c0c9bca8d.service" "org.freedesktop.DBus.Error.InvalidArgs" "WorkingDirectory= expects a normalized path or '~'" ``` I think this is happening due to the recent change in systemd: https://github.com/systemd/systemd/commit/14631951cea807de2d482a430841c604c2040718
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1679
Git commit 851dbcab4e59bac477346160a04faa1861b8ad2a by Yifan Zhu. Committed on 12/08/2024 at 13:36. Pushed by fanzhuyifan into branch 'master'. gui/kprocessrunner: normalize working directory systemd requires working directory to be normalized since https://github.com/systemd/systemd/commit/14631951cea807de2d482a430841c604c2040718. M +2 -1 src/gui/kprocessrunner.cpp https://invent.kde.org/frameworks/kio/-/commit/851dbcab4e59bac477346160a04faa1861b8ad2a