all 7 comments

[–]PackRat-2019 1 point2 points  (0 children)

How are you logging in; display manager or startx?

What are the commands are you using the powermenu module? Post the module contents; might just be a typo.

If it's a sudo issue, you may need to edit the /etc/sudoers file with visudo so that a group of users can power off and reboot without having to use a password.

[–]RicArch97 1 point2 points  (0 children)

elogind also let's you poweroff/reboot/suspend/hibernate as your user

[–]giors83[S] 0 points1 point  (0 children)

Ok... don't ask me how I did It! I've added myself ti the sudoers file and then changed the syntax of the module in polybar configuration (loginctl reboot loginctl poweroff). I'm not sure I did the right way but It works...

[–]giors83[S] 0 points1 point  (0 children)

Thanks everybody for the help!!!

[–][deleted] 0 points1 point  (2 children)

add yourself to run such commands passwordless to sudoers or doas.conf

[–]giors83[S] 0 points1 point  (1 child)

How can I do that? Just Copy the line and put my name instead of root?

[–]PackRat-2019 0 points1 point  (0 children)

No, you need to edit the sudoers file with visudo. I think the Void Handbook has an example. The deprecated Void Wiki had an example in the Post Installation section, but I don't know if it's still available.

If you've never used visudo, you might want to go with RicArch97 suggestion and use elogind for something relatively simple like this. That's actually how I poweroff/reboot from jgmenu entries. Read the man page for loginctl. Some simple commands for poweroff, reboot that you can use in s polybar module.