• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Plasma 5 shutdown/reboot/etc. buttons missing

stratacast1

Active Member

Thanks: 19
Messages: 152

#1
Just got Plasma 5 installed and running well, and there's a couple things missing, 1 I can probably cope with (easy audio device switching), but the one I really am at a loss with is the missing shutdown/reboot buttons. I thought I'd just have to be in the operator group, but I guess not? I'm new to this sort of stuff here (first FreeBSD desktop)...how can I enable users to do shutdown/reboot operations?
 

lebarondemerde

Daemon

Thanks: 553
Messages: 1,270

#2
Not using plasma for a while but IIRC you have to enable one of the *kit (polkit, consolekit[2], etc.).
 

abishai

Aspiring Daemon

Thanks: 126
Messages: 538

#3
--with-ck-launch or display manager like sddm will bring you reboot and shutdown. No idea how to enable suspend though.
 

stratacast1

Active Member

Thanks: 19
Messages: 152

#4
--with-ck-launch or display manager like sddm will bring you reboot and shutdown. No idea how to enable suspend though.
I can live without suspend. I have sddm enabled. I'm such a noob with GUI's, I've spent all these years relying on out-of-the-box GUIs on Linux, where would I apply that --with-ck-launch line?
 

Minbari

Active Member

Thanks: 105
Messages: 217

#5
where would I apply that --with-ck-launch line?
In .xinitrc.
e.g. exec startkde --with-ck-launch

Also you need to install consolekit2/polkit package.
 

abishai

Aspiring Daemon

Thanks: 126
Messages: 538

#7
I can live without suspend. I have sddm enabled. I'm such a noob with GUI's, I've spent all these years relying on out-of-the-box GUIs on Linux, where would I apply that --with-ck-launch line?
It should work with sddm out of the box. Probably, your installation is outdated https://svnweb.freebsd.org/ports/he.../files/patch-plasma.desktop.cmake?view=markup
Check this file and edit it manually or upgrade. You may find this file under /usr/local/share/xsessions/
 

stratacast1

Active Member

Thanks: 19
Messages: 152

#8
It should work with sddm out of the box. Probably, your installation is outdated https://svnweb.freebsd.org/ports/he.../files/patch-plasma.desktop.cmake?view=markup
Check this file and edit it manually or upgrade. You may find this file under /usr/local/share/xsessions/

Looking at /usr/local/share/xsessions/plasma.desktop, the configs are identical to what has been added/removed in the link you shared. I also have the most up to date packages and still nothing. And as Minbari pointed out, I do also have consolekit2/polkit installed

/usr/local/etc/polkit-1/rules.d/50-default.rules contents:

Code:
polkit.addAdminRule(function(action, subject) {

    return ["unix-group:wheel"];

});
And my user is in wheel
 

b6s6d6

New Member

Thanks: 3
Messages: 11

#9
How did you install Plasma? For instance the kde5 meta port (apparently) mistakenly pulls x11/plasma5-plasma-desktop instead of x11/plasma5-plasma, so sysutils/plasma5-powerdevil and some other plasma dependencies don't get installed. Besides, you need sysutils/upower for suspend support.

In my case, this is what I did:
1) Install some missing packages: sudo pkg install plasma5-powerdevil upower
Or if you prefer to have the whole pack: sudo pkg install plasma5-plasma upower
2) Now create 'org.freedesktop.upower.policy' sudo touch /usr/local/share/polkit-1/actions/org.freedesktop.upower.policy
Make it look like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>
  <vendor>The UPower Project</vendor>
  <vendor_url>http://upower.freedesktop.org/</vendor_url>
  <icon_name>system-suspend</icon_name>

  <action id="org.freedesktop.upower.suspend">
    <description>Suspend the system</description>
    <message>Authentication is required to suspend the system</message>
    <defaults>
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

</policyconfig>
3) Also create 'org.freedesktop.upower.pkla' sudo touch /usr/local/etc/polkit-1/localauthority/50-local.d/org.freedesktop.upower.pkla
Make sure it has the following:
Code:
[Local Users]
Identity=unix-group:operator
Action=org.freedesktop.upower.suspend
ResultAny=yes
ResultInactive=yes
ResultActive=yes
That's it!! Hope it works
 

abishai

Aspiring Daemon

Thanks: 126
Messages: 538

#11
No dice I'm afraid...still missing all the power options, and I have those packages installed as you specified
Here is all prime-origins (though edited as I made them in poudriere with custom options) I have on my laptop for some java developing. I'm totally confident that I have Reboot and Power Off buttons without any polkit config editing.
Code:
sysutils/accountsservice
archivers/ark
sysutils/beadm
security/doas
graphics/drm-stable-kmod
www/firefox
devel/git
java/intellij-ultimate
math/kcalc
x11/kde5
security/keepassxc
textproc/kompare
x11-fm/krusader2
net-p2p/ktorrent
misc/mc-light
multimedia/mpv
deskutils/nextcloudclient
ports-mgmt/pkg
x11-themes/plasma5-breeze-gtk
x11-themes/plasma5-kde-gtk-config
x11-themes/plasma5-oxygen
deskutils/plasma5-sddm-kcm
sysutils/plasma5-user-manager
sysutils/powerdxx
multimedia/qt5-phonon4-gstreamer
x11/sddm
graphics/spectacle
net-im/telegram-desktop
mail/thunderbird
sysutils/upower
x11/xorg-apps
x11-drivers/xorg-drivers
 

abishai

Aspiring Daemon

Thanks: 126
Messages: 538

#12
2) Now create 'org.freedesktop.upower.policy' sudo touch /usr/local/share/polkit-1/actions/org.freedesktop.upower.policy
3) Also create 'org.freedesktop.upower.pkla' sudo touch /usr/local/etc/polkit-1/localauthority/50-local.d/org.freedesktop.upower.pkla
No need for this, kde ships polkit configuration in /usr/local/share
 
Top