(Wayland) Dolphin does not open files after Fedora 40 upgrade, "Invalid environment block"

Good day, recently I have upgraded my system to Fedora 40 and after I’ve done that, Dolphin stopped opening any files (and root-owned locations). Instead, it gives the “Invalid environment block” error.

Full error info:

kf.kio.gui: Failed to launch process as service: "app-mpv@1e943844d14749debb761aee2b27c440.service" "org.freedesktop.DBus.Error.InvalidArgs" "Invalid environment block."

This error does not occur in X11 session, only in Wayland.

I am running Fedora 40 with Hyprland.

Thank you.

1 Like

Did you ever solve this? I just started getting the exact same behavior on dolphin running in Hyprland. Works fine within kde. I’m using suse tumbleweed

I had the same problem this morning. Searching the web for this error message, I found posts indicating that it might have something to do with invalid environment variable names.

I had some weird ones, like BASH_FUNC_ml%%, that I didn’t recognize. They had something to with Lmod, which is something related to Lua and not something I’ve ever used. No idea why it was installed, nothing seemed to depend on it, but after removing Lmod (with dnf in my case, this is on Fedora 40) and logging out and logging in again, Dolphin worked fine again. Using Sway.

So check your environment variables, see if you see any with weird names, and try to get rid of them.

2 Likes

Thank you for the solution! :slightly_smiling_face:
Turns out I had BASH_FUNC_ml%% and BASH_FUNC_module%% that Lmod brought as well. Removing Lmod helped!

Solution above.