Bug 270835 - x11/sddm: No shutdown and reboot buttons without sysutils/consolekit2
Summary: x11/sddm: No shutdown and reboot buttons without sysutils/consolekit2
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jason W. Bacon
URL: https://github.com/outpaddling/deskto...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-14 12:32 UTC by Jason W. Bacon
Modified: 2023-07-09 17:07 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)
grahamperrin: maintainer-feedback? (desktop)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2023-04-14 12:32:14 UTC
I have a laptop and a couple VMs under VirtualBox that run SDDM and Lumina desktop, configured by sysutils/desktop-installer.

On the laptop login screen, SDDM shows shutdown and reboot buttons.  On the VMs, it does not.

I've been trying to figure out what the difference between these systems is that causes SDDM to show the buttons on one system but not the others, but I've come up empty.  The one major difference is that the laptop (with buttons) is running 12.4-RELEASE, while the VMs are running 13.2-RELEASE.  The other obvious difference is that the laptop is real hardware and the VMs are not.  Otherwise the configurations are virtually identical.

It would be nice to get consistent behavior out of the box in all cases.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-04-15 15:57:03 UTC
(In reply to Jason W. Bacon from comment #0)

> … the difference between these systems …

I guess, membership of the operator group. 

I should add something to the quick start. (Whilst the issue is not specific to KDE Plasma, a hint about operator will be useful.)

<https://docs.freebsd.org/en/books/faq/> might benefit from a hint, when the page is revamped. 

In the meantime: 

<https://docs.freebsd.org/en/books/handbook/book/#users-groups> (the warning)

<https://docs.freebsd.org/en/books/handbook/book/#boot-shutdown>

(I found those only because I already know about operator. I guess, it could be better documented.)
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2023-04-15 16:05:46 UTC
Sorry, paying closer attention: 

(In reply to Jason W. Bacon from comment #0)

> … login screen, …

I had the symptom there a few months ago. 

Is deskutils/plasma5-sddm-kcm installed? 

(Sorry, I can't test for myself at the moment. VirtualBox unusable on CURRENT.)
Comment 3 Jason W. Bacon freebsd_committer freebsd_triage 2023-04-16 12:47:06 UTC
Thanks, but sddm is not a member of operator on either system and plasma5-sddm-kcm is installed on neither system.

Adding sddm to the operator group makes no difference.

Adding plasma5-sddm-kcm did help, but this is an 88-package workaround.

I then ran "pkg info | awk '{ print $1 }'" on both systems and diffed the output looking for suspects.  By trial-and error, I found that installing consolekit2 enables the buttons.  It was installed as an indirect dependency for globalprotect-openconnect via pulseaudio on the laptop.

Maybe consolekit2 should be a dependency for sddm?  In any case, I'll install it via desktop-installer when sddm is selected.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-04-16 13:25:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35c0952fb382a2a5249db10d5522826ce24a3a3c

commit 35c0952fb382a2a5249db10d5522826ce24a3a3c
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2023-04-16 13:21:25 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2023-04-16 13:21:25 +0000

    sysutils/desktop-installer: Update to 0.8.0.3

    Remove deprecated transcode install
    Fix xdmshutdown buttons location for multiple monitors
    Install consolekit2 with sddm to enable shutdown/reboot buttons

    PR:             270835

 sysutils/desktop-installer/Makefile | 5 +++--
 sysutils/desktop-installer/distinfo | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2023-04-16 13:49:36 UTC
Apologies for taking you off-track earlier. 

(In reply to commit-hook from comment #4)

I'm surprised that it was not automatically installed. 

root@fuji:~ # pkg query %ro consolekit2
x11/plasma5-plasma-workspace
security/plasma5-kscreenlocker
x11/mate-session-manager
audio/pulseaudio
root@fuji:~ #
Comment 6 Jason W. Bacon freebsd_committer freebsd_triage 2023-04-16 14:23:37 UTC
(In reply to Graham Perrin from comment #5)

No worries.  It was worth checking.

Why are you surprised?  I don't see sddm in the reverse-depends list you posted.
Comment 7 Graham Perrin freebsd_committer freebsd_triage 2023-07-01 03:52:36 UTC
(In reply to Jason W. Bacon from comment #6)

> … Why are you surprised? …

Sorry … ignore my comment 5.

(A mental block at the time. After years of using SDDM with Plasma, I repeatedly failed to visualise use of SDDM _without_ Plasma.)

----

consolekit2 added to the FreeBSD/Setup quick start in the KDE Community Wiki: 

* <https://community.kde.org/FreeBSD/Setup#KDE_and_the_rest>

* <https://community.kde.org/index.php?title=FreeBSD%2FSetup&type=revision&diff=97067&oldid=95568> 
  with reference to 
  <https://github.com/freebsd/freebsd-ports/commit/35c0952fb382a2a5249db10d5522826ce24a3a3c>.
Comment 8 Graham Perrin freebsd_committer freebsd_triage 2023-07-01 04:20:36 UTC
desktop@ (sysutils/consolekit2) 
kde@ (x11/sddm)

Re: <https://www.freshports.org/sysutils/consolekit2/#requiredby>

Should consolekit2 additionally become a requirement for x11/sddm?

    <https://cgit.freebsd.org/ports/tree/x11/sddm/Makefile>

Or, should we solely (without the requirement) document the benefits of consolekit2 in contexts such as SDDM?

The FreeBSD Handbook does not yet mention consolekit2. 

<https://www.freshports.org/x11/sddm/#message> will benefit from a mention. 

----

For what it's worth: I lean towards requirement, however I can not estimate whether it would spark a chorus of disapproval.
Comment 9 Jason W. Bacon freebsd_committer freebsd_triage 2023-07-01 15:41:10 UTC
What drawback is there to making consolekit2 a requirement?

From my perspective, it's a small dependency that enables features in SDDM that most users want, and is already a requirement for many desktop environments and other display managers.

FreeBSD coral.acadix  bacon ~ 1004: port-grep consolekit2 -l
/usr/ports/audio/pulseaudio/Makefile
/usr/ports/deskutils/elementary-calendar/Makefile
/usr/ports/ports-mgmt/packagekit/Makefile
/usr/ports/security/plasma5-kscreenlocker/Makefile
/usr/ports/sysutils/seatd/Makefile
/usr/ports/www/gnome-user-share/Makefile
/usr/ports/x11-wm/lxsession/Makefile
/usr/ports/x11-wm/xfce4-session/Makefile
/usr/ports/x11/cinnamon-session/Makefile
/usr/ports/x11/gdm/Makefile
/usr/ports/x11/gnome-session/Makefile
/usr/ports/x11/lightdm/Makefile
/usr/ports/x11/mate-session-manager/Makefile
/usr/ports/x11/budgie-desktop/Makefile
/usr/ports/x11/plasma5-plasma-workspace/Makefile
/usr/ports/x11/slim/Makefile

If anyone complains because they really doesn't want it, it could be made an option, or better yet we could provide package builds with and without.
Comment 10 Jason W. Bacon freebsd_committer freebsd_triage 2023-07-09 17:07:11 UTC
I'm content to handle this in desktop-installer.  I'll leave it to others to decide if consolekit should be a dep for SDDM.