1

Is there a way for a non-root user to hook a script on to laptop lid events (ie. opening and closing)?

  • How about sudo? I used sudo in my laptop several years ago for lid and additional buttons (vol up/down, stop/play, brightness) in KDE environment. – Yurij Goncharuk Mar 25 '18 at 14:05
  • @YurijGoncharuk, how did you access the x session from root? – Toothrot Mar 25 '18 at 14:22
  • @Toothrot I'm not sure that you'd want/need to use root to manage your x session. The xsession should be running as the logged in user, so they should be able to change it themselves as they please. – Centimane Mar 25 '18 at 15:48
0

You can also take these notifications via acp event hooks https://wiki.archlinux.org/index.php/acpid

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.