You are not logged in.
I have a script in /usr/local/bin that echoes a value into the display brightness node, changing it.
This echo requires sudo.
Can I somehow make it so as user I can just run the script without needing to sudo-run it, and it can still sudo-echo the brightness value, so I don't need to be sudo just to change the display brightness as a user?
I only have a very convoluted idea to make this work, which is to have a root-script running in a loop checking for some temp file eg in /tmp/brightpoll.tmp, and the /usr/local/bin/setbright.sh user script writing to said file (which is user-owned), so the command gets sort of 'piped' through that. Seems not very elegant tho =p
Last edited by millus (2024-03-30 12:26:13)
Offline
Create a relevant entry in your sudoers so that just that command can be run with sudo without needing a password.
https://wiki.archlinux.org/index.php/Sudo#Configuration
Offline
or change the permission of the file that you are trying to echo to, using an udev role: https://bbs.archlinux.org/viewtopic.php?id=260428
Last edited by saf1 (2021-01-22 14:07:52)
Offline
Or consider using some existing tool like bright.
Last edited by Mr.Elendig (2021-01-22 14:26:36)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
or change the permission of the file that you are trying to echo to, using an udev role: https://bbs.archlinux.org/viewtopic.php?id=260428
Ohh perfect, solution, I choose you!
Thanks to everyone else too
.
Offline