Runit with KDE Plasma: krunner current working directory /

Lorenzo plorenzo at
Tue Feb 14 16:59:15 GMT 2023


On Tue, 14 Feb 2023 16:22:50 +0100
Martin Steigerwald <martin at> wrote:

> > My guess is that the keyboard is somehow not linked to the graphic
> > session (plasma session) so by starting program with keyboard combo
> > it's parented directly to init.
> The keyboard? Well krunner has runit as parent process. But does that 
> have to do with a keyboard? You mean it could be an issue with
> elogind?

Forget about that, was just guessing (wrong); looking at the KDE bug,
you can try to manually change the krunner.desktop file, logout &
restart the desktop and see if it fixes the issue

the file should be

and the offending commit[1] seems to change from direct exec to dbus
[Desktop Entry]
- Exec=@CMAKE_INSTALL_PREFIX@/bin/krunner
+ Exec=dbus-send --type=method_call --dest=org.kde.krunner /App

[Desktop Action RunClipboard]
- Exec=krunner -c
+ Exec=dbus-send --type=method_call --dest=org.kde.krunner /App
Name=Run command on clipboard contents
Name[az]=Əmri, mübadilə b

basically respectively use
Exec=krunner -c

if it works you can install a diversion on that file

> > Not sure if this is a bug in KDE, elogind or we are missing some
> > systemd features (user-session, cgroups?).
> What would you suggest to find out?

By looking at the above commit, the dbus activation is behaving
different because (another guess) under systemd the 'dbus-user-session'
pkg is used, while other inits are using 'dbus-X11' package.
Dbus maintainers probably know better, but if that is true, what is
missing is a 'runit-user' or 'sysv-user' integration ..
But first please confirm if changing the .desktop files works for you


> Another thing that comes to my mind is: Plasma a systemd startup
> method meanwhile, but can also work without systemd¹. Maybe the issue
> is related to using a different code path in Plasma for non-system
> startup? Ah, why didn't I think of this earlier. I just searched KDE
> bugzilla and got this:
> krunner starts applications with cwd "/" with init system other than 
> systemd (openrc, runit, ...)
> So it appears to be upstream breakage?
> [1]
> > > I tried to work around this by doing "cd $HOME" in my zshrc.
> > > However this makes open new tabs in Konsole always start at $HOME
> > > even when I
> > > open them with a tab active which has a different cwd. Yeah, I got
> > > only do "cd $HOME" if current working directory is /, but I'd
> > > rather see this fixed. However, I do not even know where to
> > > report this issue.
> > Your practical issue is that, for example, by typing 'konsole' in
> > krunner you get a console in / instead of /home/USER ( I don't have
> > that) or is something else?
> Indeed. Also the file dialog for example in kwrite / kate or okular
> would start out in "/" in that case.
> Thanks,

More information about the Debian-init-diversity mailing list