There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

ReversalHatchery ,

On systemd systems the systemd-inhibit command is supposed to make this possible. You can “inhibit” suspending, shutting down, restarting, the lid closed action itself, etc.

However, it has a fatal flaw. It only honors inhibits of the root user. There’s more: when you inhibit sleep as root, instead of locking the screen and turning it off, it will just pop up a polkit password dialog to request permission to sleep. The screen will still drain your battery, and your account will stay opened up.

You can work around the first issue by either
a) creating a one liner bash script in /usr/local/bin that runs the inhibit command, and setting up sudo so that running that script does not require a password b) creating a non-script program in the same place that runs this command, setting the owner of this program file to root, and the setuid bit on it

If you are more creative, you could also find the way to change the lid close action from a program of yours, and make a program that places some kind of UI element (maybe a taskbar widget?) on the screen with which you can quickly toggle between sleeping or just locking the screen.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines