https://bugs.kde.org/show_bug.cgi?id=432975

--- Comment #16 from Martin Steigerwald <[email protected]> ---
Current conclusion is that the current working directory of processes started
via traditional DBUS activation is not guaranteed to be $HOME and it would be
risky to change it¹.

So the suggestion would be to explicitly set the current working directory to
$HOME for anything in KDE that requires this for correct operation². Especially
as there are no reports of something like this happening with other current
desktop environments³.

This would be KRunner and I think also the "export GTK_USE_PORTAL=1" KDE file
dialog. And maybe others from:

% dpkg -L plasma-workspace | grep dbus-1/services/org
/usr/share/dbus-1/services/org.kde.KSplash.service
/usr/share/dbus-1/services/org.kde.LogoutPrompt.service
/usr/share/dbus-1/services/org.kde.Shutdown.service
/usr/share/dbus-1/services/org.kde.fontinst.service
/usr/share/dbus-1/services/org.kde.krunner.service
/usr/share/dbus-1/services/org.kde.plasma.Notifications.service
/usr/share/dbus-1/services/org.kde.runners.baloo.service

(Of course some of those may not care about current working directory being "/"
and thus should likely not be changed.)

Would you be willing to make such a change? Please review linked sources for
detailed explanation and justification for that conclusion.

[1] See dbus-x11: Several processes in Plasma session including krunner have /
as current working directory:
https://bugs.devuan.org/cgi/bugreport.cgi?bug=745#29 (and previous comment by
Simon)

also see proposed upstream patch:
https://gitlab.freedesktop.org/dbus/dbus/-/issues/214

[2] See dbus-x11: Several processes in Plasma session including krunner have /
as current working directory:
 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1032368#15

[3] Well this is not entirely correct, but I am at least not aware of any more
recent reports. See proposed upstream patch Drop chdir("/") in dbus-launch:

https://gitlab.freedesktop.org/dbus/dbus/-/issues/214

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to