Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 767478 - kde-plasma/plasma-workspace-5.20.5: krunner starts applications with cwd "/"
Summary: kde-plasma/plasma-workspace-5.20.5: krunner starts applications with cwd "/"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in 5.22.5-r2
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2021-01-27 17:57 UTC by Andrea
Modified: 2023-03-05 08:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
plasma-workspace-5.20.5-revert-activate-krunner.patch (plasma-workspace-5.20.5-revert-activate-krunner.patch,2.31 KB, patch)
2021-02-02 12:31 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea 2021-01-27 17:57:33 UTC
When xterm or konsole is started from krunner it starts in '/'.

ls -l /proc/*/{cwd,exe}|grep -A1 'cwd -> /$'

lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17603/cwd -> /               
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17603/exe -> /usr/bin/kwalletd5
--                                                                                    
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17615/cwd -> /               
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17615/exe -> /usr/bin/dbus-launch
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17616/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17616/exe -> /usr/bin/dbus-daemon
--                                                                                    
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17676/cwd -> /                 
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17676/exe -> /usr/lib64/libexec/kactivitymanagerd
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17683/cwd -> /                 
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17683/exe -> /usr/bin/kglobalaccel5
--
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17724/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17724/exe -> /usr/bin/pulseaudio
--
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17753/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17753/exe -> /usr/libexec/dconf-service
--
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17773/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17773/exe -> /usr/bin/ksystemstats
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17776/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17776/exe -> /usr/bin/ksysguardd
--
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17808/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17808/exe -> /usr/libexec/mission-control-5
--
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17829/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17829/exe -> /usr/libexec/bluetooth/obexd
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17839/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17839/exe -> /usr/libexec/at-spi-bus-launcher
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17844/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17844/exe -> /usr/bin/dbus-daemon
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17846/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17846/exe -> /usr/lib64/libexec/kf5/kscreen_backend_launcher
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17851/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17851/exe -> /usr/libexec/pulse/gsettings-helper
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17875/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17875/exe -> /usr/libexec/at-spi2-registryd
--
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/17960/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:38 /proc/17960/exe -> /usr/bin/krunner
--
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/18847/cwd -> /
lrwxrwxrwx 1 andrea andrea 0 Jan 27 12:44 /proc/18847/exe -> /usr/bin/konsole

Reproducible: Always

Steps to Reproduce:
1. krunner (ALT+SPACE)
2. xterm
3. pwd
Actual Results:  
/

Expected Results:  
$HOME

Hello,

This is a very minor issue but strange nevertheless and I didn't find in /etc/xdg or /etc/X11 where the cwd is changed to root or why, so I'm curious if it's intentional and maybe it's an upstream defect or maybe it's not related to kde plasma.

I'm just wondering if others noticed it.

This seem to have started after the update of bug #764200 (i.e. 5.20.5) but I'm not 100% certain of that since I cannot roll it back to verify..

It may be something else entirely in the x11 startup (I didn't try wayland).

However it appears a plasma internal issue because if I start xterm or konsole from the launcher in the bottom left corner, they get the right cwd, just krunner and a few other processes have a cwd in /.

Thanks!
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-27 18:01:17 UTC
(I'll call it Current Packages for now, but I'm not sure what base package is the issue).
Comment 2 Andrea 2021-01-27 19:00:17 UTC
(In reply to Sam James from comment #1)
> (I'll call it Current Packages for now, but I'm not sure what base package
> is the issue).

Curious, can you reproduce it or it's just me?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-01 23:29:00 UTC
(In reply to Andrea from comment #2)
> (In reply to Sam James from comment #1)
> > (I'll call it Current Packages for now, but I'm not sure what base package
> > is the issue).
> 
> Curious, can you reproduce it or it's just me?

No access to my Plasma atm but seen reports on IRC
Comment 5 Andreas Sturmlechner gentoo-dev 2021-02-02 12:31:19 UTC
Created attachment 685560 [details, diff]
plasma-workspace-5.20.5-revert-activate-krunner.patch

Please test with this patch.
Comment 6 Andreas Sturmlechner gentoo-dev 2021-02-02 12:32:44 UTC
Upstream follow-up work:
https://invent.kde.org/frameworks/kglobalaccel/-/merge_requests/11
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/609

Under those circumstances it is imo best to just revert the change in 5.20.5.
Comment 7 Larry the Git Cow gentoo-dev 2021-02-05 10:12:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57de3a3d0b6ba43351d08ea5a83e8d9203477a49

commit 57de3a3d0b6ba43351d08ea5a83e8d9203477a49
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-02-05 10:05:23 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-02-05 10:12:03 +0000

    kde-plasma/plasma-workspace: Fix krunner regression to use cwd "~"
    
    Reported-by: Andrea <andrea@cpushare.com>
    Tested-by: Marquel (in #plasma), but also myself
    Closes: https://bugs.gentoo.org/767478
    Package-Manager: Portage-3.0.14, Repoman-3.0.2
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...-workspace-5.20.5-revert-activate-krunner.patch |  56 ++++++
 .../plasma-workspace-5.20.5-r4.ebuild              | 209 +++++++++++++++++++++
 2 files changed, 265 insertions(+)
Comment 8 Andrea 2021-02-06 13:59:24 UTC
-r4 works perfectly, thanks for the quick fix.
Comment 9 Larry the Git Cow gentoo-dev 2021-04-04 13:23:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8369a03e08c0708871944fed47f3939eca024659

commit 8369a03e08c0708871944fed47f3939eca024659
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-04-04 12:33:55 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-04-04 13:19:38 +0000

    kde-frameworks/kglobalaccel: Don't make krunner run with root privs
    
    Upstream commit bbec74337b3186bc258bd5adf849b89191789535
    
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=423059
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=432975
    Bug: https://bugs.gentoo.org/767478
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...kglobalaccel-5.80.0-dont-run-w-root-privs.patch | 43 ++++++++++++++++++++++
 .../kglobalaccel/kglobalaccel-5.80.0-r1.ebuild     | 36 ++++++++++++++++++
 2 files changed, 79 insertions(+)
Comment 10 Larry the Git Cow gentoo-dev 2021-05-09 12:11:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb148e54742c0810a6abc045f12cf8415f22edae

commit cb148e54742c0810a6abc045f12cf8415f22edae
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-05-09 11:24:34 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-05-09 12:10:15 +0000

    kde-plasma/plasma-workspace: Rebase revert-activate-krunner.patch
    
    Still not fixed in 5.21.5.
    
    Bug: https://bugs.gentoo.org/767478
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...-workspace-5.21.5-revert-activate-krunner.patch | 56 ++++++++++++++++++++++
 .../plasma-workspace-5.21.5.ebuild                 |  1 +
 2 files changed, 57 insertions(+)
Comment 11 Andreas Sturmlechner gentoo-dev 2021-09-14 08:54:59 UTC
I am not in a position to continue reverting problematic changes related to this bug, so this will be a known defect with stable >=5.22.5 for non-systemd users going forward.
Comment 12 Larry the Git Cow gentoo-dev 2021-09-22 21:59:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61988d92de81544b00167a289258360b61c7261e

commit 61988d92de81544b00167a289258360b61c7261e
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-22 20:53:47 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-22 21:59:09 +0000

    kde-plasma/plasma-workspace: Fix krunner cwd, device notifications
    
    krunner starts applications with cwd "/" with init system other than systemd
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=432975
    
    Disk & Devices applet doesn't show removable devices after eject and reconnect
    Upstream commit 61e2ea2323ae63c5805c87353701ba6fb722205a
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=438874
    
    Thanks-to: Eric F. Garioud <eric-f.garioud@wanadoo.fr>
    Thanks-to: Andrea Arcangeli <aarcange@redhat.com>
    Bug: https://bugs.gentoo.org/767478
    Bug: https://bugs.gentoo.org/814284
    Package-Manager: Portage-3.0.23, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...orkspace-5.22.5-fix-hotplug-notifications.patch |  33 ++++
 ...asma-workspace-5.22.5-krunner-cwd-at-home.patch |  30 +++
 .../plasma-workspace-5.22.5-r2.ebuild              | 210 +++++++++++++++++++++
 3 files changed, 273 insertions(+)
Comment 13 Larry the Git Cow gentoo-dev 2021-11-09 13:04:00 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=fdf904d0dbe13b7f91cb00d9720bc53e4b0f53fc

commit fdf904d0dbe13b7f91cb00d9720bc53e4b0f53fc
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-22 20:53:47 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-11-09 13:01:48 +0000

    kde-plasma/plasma-workspace: Fix krunner cwd
    
    krunner starts applications with cwd "/" with init system other than systemd
    KDE-bug: https://bugs.kde.org/show_bug.cgi?id=432975
    
    Thanks-to: Andrea Arcangeli <aarcange@redhat.com>
    Bug: https://bugs.gentoo.org/767478
    Package-Manager: Portage-3.0.23, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 ...asma-workspace-5.22.5-krunner-cwd-at-home.patch | 30 ++++++++++++++++++++++
 .../plasma-workspace-5.23.49.9999.ebuild           |  5 +++-
 .../plasma-workspace/plasma-workspace-9999.ebuild  |  5 +++-
 3 files changed, 38 insertions(+), 2 deletions(-)