Bug 431315 - Searching for "Switch user" finds an item called "New Session"
Summary: Searching for "Switch user" finds an item called "New Session"
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.20.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
Depends on:
Reported: 2021-01-08 15:04 UTC by Nate Graham
Modified: 2022-01-31 18:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25

Wrong item found (126.14 KB, image/jpeg)
2021-01-14 05:03 UTC, Nate Graham

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-01-08 15:04:05 UTC
This is with the new Plasma 5.21 Kickoff. See attached screenshot.

Activating the item does have the same effect as "switch user", but it shows a weird dialog box.
Comment 1 Justin Zobel 2021-01-14 03:03:06 UTC
No screenshot attached. :)
Comment 2 Nate Graham 2021-01-14 05:03:49 UTC
Created attachment 134827 [details]
Wrong item found

Comment 3 Mikel Johnson 2021-01-25 07:39:59 UTC
actually this is a general krunner problem
Comment 4 Alexander Lohnau 2021-01-25 07:49:15 UTC
bool switchUser = listAll || term.compare(i18n("switch user"), Qt::CaseInsensitive) == 0 || term.compare(i18n("new session"), Qt::CaseInsensitive) == 0;

    if (switchUser && KAuthorized::authorizeAction(QStringLiteral("start_new_session")) && dm.isSwitchable() && dm.numReserve() >= 0) {
        Plasma::QueryMatch match(this);
        match.setText(i18n("New Session"));
        matches << match;

This seems intentional and has been the case since the initial import in 2014, @d_ed is there a rationale behind this? Like that switching users would in this case create a new session?
Comment 5 Nate Graham 2021-01-25 15:30:18 UTC
Seems like the intention was to match SDDM's prior behavior of creating new sessions by default instead of switching to a new one. However that default setting has since been changed, so these are now out of sync. And I think SDDM handles this itself right now, so the manual workaround is no longer needed.

(That's as I understand it at least).
Comment 6 Bug Janitor Service 2022-01-30 19:35:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1423
Comment 7 Nate Graham 2022-01-31 18:02:26 UTC
Git commit c65938f36c715771bd8deebb22dde811a6e47bd7 by Nate Graham, on behalf of Alexander Lohnau.
Committed on 31/01/2022 at 18:01.
Pushed by ngraham into branch 'master'.

sessionrunner: Change text from "New Session" to "Switch User"

This is how we call it since ~2016.

Because of the string changes, it can not get cherry-picked to stable.

M  +1    -1    runners/sessions/sessionrunner.cpp