3

I have script running from non-privileged user. It is important, so systemd-inhibit is a good idea. But I get error when trying to inhibit from that user

systemd-inhibit sleep 10
Failed to inhibit: Access denied

This user not so trusted to put him in "wheel" group. How can I grant permission to that user to run systemd-inhibit? (PolicyKit?)

1 Answer 1

0

If you're trying to inhibit suspension, you can use systemd-inhibit --what=idle as a normal user to prevent the machine from suspending due to system idleness. Other locks require elevated privileges (credits to Aeyoun's answer).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .