KDE Error: Unable to create io-slave. Cannot talk to klauncher

Thanks @jdstrand, I managed to find a workaround and it was a case of your simple answer of “don’t use klauncher”. The addition I made was to add the environment variable KDE_FORK_SLAVES: 1. With the variable set the klauncher error disappeared but a new error of being unable to find the kioslave5 binary appeared. I tried setting KF5_LIBEXEC_DIR: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libexec/kf5" but this didn’t help even though most examples I’ve seen use this variable to allow discovery of the binary. What worked for me was appending the directory to PATH, PATH: "$PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libexec/kf5"

I managed to find out about this by looking at the VLC snapcraft.yaml: https://github.com/videolan/vlc/tree/master/extras/package/snap.
They seem to set these variables in a wrapper script vlc-snap-wrapper.sh

The end result is that the native file picker works in KDE with these changes.

1 Like