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
- from the ssh shell the command would be always available (root or normal 
user, I don't care)
- permanently disabling the shutdown for the kids is not optimal, they should 
be able to stop the machine if he/she is the only user

Thanks,

raffaele

[1] https://www.freedesktop.org/software/systemd/man/systemd-inhibit.html

Reply via email to