On Wed, 29 Apr 2020 16:19:29 +0000, Raffaele BELARDI wrote: > I often have the kids working on my main ~amd64 PC (XFCE, OpenRC, > -consolekit) while I ssh into it doing some maintenance from an old PC. > Often they shut it down without telling me first, so I loose part of my > stuff. Is there a way to tell XFCE/elogind/PAM/lightdm/whoever to not > allow shutdown from a regular user while another user is logged in? I > understand that logind/systemd provides the system-inhibit [1] user > command just for that, but I don't find the analogous for > OpenRC/elogind. > > Basically I'd like that: > - if there is more than one user logged in, either locally via lighdm > or remotely via SSH, the shutdown XFCE button is grayed out. Once all > users except one have logged out, the button is again available
Can you configure the shutdown/reboot command called by XFCE? If so, you can set it to a script that checks whether anyone else is logged in before either executing the shutdown or displaying a "Daddy's using the computer" dialog. -- Neil Bothwick A seminar on time travel will be held 2 weeks ago.
pgpJu6bMYXGf7.pgp
Description: OpenPGP digital signature