Konsole context menu "Open File Manager" not working

When using the context menu entry “Open File Manager” in KDE’s Konsole, an error message appears:

Where <hostname> is the hostname of the machine and <path> is the console’s cwd. Not sure what is happening there or how to fix it, there seems to be no option in Konsole’s settings related to this.

Operating System: Manjaro Linux
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.3-3-MANJARO (64-bit)
Graphics Platform: X11

Hi @fonic,

I have never used the functionality and doubt I ever will. However, I’ve got to ask, I’ve got no other reason than a hunch. Do you have the have the kio and kio-fuse package(s) are installed:

pamac search --installed kio

If not, install them with:

pamac install kio kio-fuse

See if that works. If not, sorry but :man_shrugging:

Those packages are installed, here’s the full output:

audiocd-kio  24.05.0-1                                                                                                                                                                                       extra
    Kioslave for accessing audio CDs
kio5  5.116.0-1                                                                                                                                                                                              extra
    Resource and network access abstraction
kio-fuse  5.1.0-3                                                                                                                                                                                            extra
    FUSE interface for KIO
kio-extras  24.05.0-1                                                                                                                                                                                        extra
    Additional components to increase the functionality of KIO
kio  6.2.0-2                                                                                                                                                                                                 extra
    Resource and network access abstraction

I actually really depend on that context menu function, as I’m mostly working on the console (always have been) and use it to open the file manager for the current location, should the need arise.

Also tested this on a fresh, non-customized installation within a VM → same behavior, same error message.

I see you have both kio as well as kio5 installed. I don’t have any idea if this is a problem or not, but since we use Plasma 6, remove kio5:

pamac remove kio5

See if that makes any difference.

Not possible without removing a whole lot of other dependencies and/or applications. Likely tied to the whole Qt5/Plasma5 stack, which by the way is still required as there are still applications that haven’t been (fully) ported over.

I know, that’s why I said:

I removed a bunch of kio5 dependencies a few days ago after receiving error messages when opening URLs from Konsole using xdg-open. My system doesn’t seem to be missing them at all (apart from the manjaro-settings-manager icon no longer appearing in my system tray):

[2024-06-20T13:28:16+1000] [ALPM] removed kio5 (5.116.0-1)
[2024-06-20T13:28:07+1000] [ALPM] removed knotifyconfig5 (5.116.0-1)
[2024-06-20T13:27:55+1000] [ALPM] removed kshutdown (5.2-2)
[2024-06-20T13:27:39+1000] [ALPM] removed knewstuff5 (5.116.0-1)
[2024-06-20T13:27:17+1000] [ALPM] removed plasma5-integration (6.0.5-1)
[2024-06-20T13:26:50+1000] [ALPM] removed frameworkintegration5 (5.116.0-1)
[2024-06-20T13:26:20+1000] [ALPM] removed breeze5 (6.0.5-1)
[2024-06-20T13:25:56+1000] [ALPM] removed oxygen5 (6.0.5-1)
[2024-06-20T13:24:05+1000] [ALPM] removed systemd-kcm (1.2.1-6)
[2024-06-20T13:23:22+1000] [ALPM] removed kdeclarative5 (5.116.0-1)
[2024-06-20T13:22:39+1000] [ALPM] removed kcmutils5 (5.116.0-1)
[2024-06-20T13:22:39+1000] [ALPM] removed manjaro-settings-manager-kcm (0.5.7-21)
[2024-06-20T13:22:39+1000] [ALPM] removed manjaro-settings-manager-knotifier (0.5.7-22)
1 Like

i have kio5 (with manjaro-settings-manager-kcm) and no problem in konsole

@fonic

“tested this on a fresh”

very strange if is also with iso. what is retuned by pwd ? home is classic, not a systemd-home or other

test

  • with “open with…” (dolphin and others)
  • And open folder by CTRL+ left clic ?

Tested this, just to be sure, via pamac remove -c kio5 (on a VM of course), no change in behavior, same error message.

I’m not entirely sure if I fully understand what you mean there…

  • pwd prints the current directory (what else should it do?)
  • “Open with…”, then choosing Dolphin does nothing
  • “Open folder…” is only available when using bash, not when using zsh (see my post below)

I typically use Yakuake. However, out of interest I opened Konsole, only to be greeted with the same condition the OP describes.

Twice may be coincidence; but unlikely (imho).

Cheers.

1 Like

Figured it out, at least partially:

This error occurs when using zsh (which is the default for Manjaro), but it works correctly when creating a new Konsole profile and configuring it to use bash as the underlying shell instead.

Too bad, I actually kind of like zsh.

1 Like
xdg-open .
xdg-open "$PWD"

(open dolphin) ok in 2 profiles ?

(for me, default zsh all is ok) and you, you test with new install, so no reason to have a custum env

I can also confirm the OP’s workaround.

1 Like

Works, opens Dolphin for the current directory.

I’m really not sure what you mean or what you might be referring to. I’m using a fresh install of Manjaro within a VM to debug this, no configuration/customization of any kind, just the way it ships right out of the box.

Probably this issue with manjaro-zsh-profile which by the looks of it hasn’t been fixed. I don’t use zsh myself.

3 Likes

Very nice find, this is indeed the same issue. All it takes to fix this is to add:

# Konsole errors if the HOST is provided
[[ -z "$KONSOLE_VERSION" ]] || URL_HOST=""

above the line containing:

printf "\e]7;%s\a" "file://${URL_HOST}${URL_PATH}"

in /usr/share/zsh/manjaro-zsh-config.

Not sure what the modification of the printf line itself is about, as it does not seem to be required for the fix.

1 Like

One thing to add:
While this workaround/fix does generally work, it’ll break for certain scenarios, e.g. after running su - to become root (as variable KONSOLE_VERSION is not part of root’s environment).

The workaround offered by @MrLavender ; replacing the mzc_termsupport_cwd function from /usr/share/zsh/manjaro-zsh-config; originally from add workaround for directory tracking issues in Konsole; seems to solve the issue without the side-effects described:

function mzc_termsupport_cwd {
  # Percent-encode the host and path names.
  local URL_HOST URL_PATH
  URL_HOST="$(zsh_urlencode -P $HOST)" || return 1
  URL_PATH="$(zsh_urlencode -P $PWD)" || return 1

  [[ -z "$KONSOLE_PROFILE_NAME" && -z "$KONSOLE_DBUS_SESSION"  ]] || URL_HOST=""

  # common control sequence (OSC 7) to set current host and path
  printf "\e]7;file://%s%s\e\\" "${URL_HOST}" "${URL_PATH}"
}

…and, now, back to bash I go…

2 Likes