You are not logged in.

#1 2020-04-01 19:43:53

aretheybackfrom711yet
Member
Registered: 2019-07-01
Posts: 14

[SOLVED] light command requires sudo now; this breaks my scripts.

Both of these work:

sudo chmod +s /usr/bin/light

and also, I gather is the proper fix:

echo "$USER ALL=(ALL) NOPASSWD: /bin/systemctl restart NetworkManager" >> /etc/sudoers.d/$USER

----------

light

now requires sudo to run, after my last update.

This is annoying because it breaks my sway scripts to change my backlight.

Is there a way around having to use sudo for light, or is there an altrnative I can use?

Thank you!

Last edited by aretheybackfrom711yet (2020-04-01 23:44:36)


Thinkpad E485 | Ryzen 5 2500U + Vega 8
wayland | sway | waybar

Offline

#2 2020-04-01 19:47:02

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

You can still use sudo - just put an entry in your sudoers file so that running light doesn't require a password...

https://bbs.archlinux.org/viewtopic.php?id=254162


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2020-04-01 20:42:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,700

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

sudo chmod +s /usr/bin/light

Now your scripts should work

Last edited by ewaller (2020-04-01 20:42:46)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2020-04-01 20:44:13

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

@ewaller - Won't that break every time the light package is updated?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2020-04-01 21:40:44

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

The big change in the new version was https://github.com/haikarainen/light/pull/109/files

Why doesn't udev work, though? https://github.com/haikarainen/light#permissions


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2020-04-01 22:13:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,512
Website

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

And guess what's in the light PKGBUILD.

Just add your user to the video group.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2020-04-01 22:15:48

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

Trilby wrote:

Just add your user to the video group.

I was attempting to give the OP the benefit of the doubt, since supposedly it worked before this update. Though maybe that is what the security update fixed -- users outside of the needed group having the ability to use it anyway.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2020-04-01 23:40:13

aretheybackfrom711yet
Member
Registered: 2019-07-01
Posts: 14

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

Thanks guys, got two good answers


Thinkpad E485 | Ryzen 5 2500U + Vega 8
wayland | sway | waybar

Offline

#9 2021-01-02 11:00:29

Simaryp
Member
Registered: 2018-04-28
Posts: 153

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

Hi, I am digging that thread out since in my newest attempt to switch to sway I stumbled over the same issue.

Light used to work without sudo and now it doesn't.

Since the last comment mentioned it should be sufficient to just add the user to group video I am a bit confused as my user is already in group video but that didn't helped.

EDIT:
I'm sorry, nevermind. After a reboot it worked. Maybe some reload command would have been sufficient too.

Last edited by Simaryp (2021-01-02 11:19:33)

Offline

#10 2021-01-02 14:19:36

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] light command requires sudo now; this breaks my scripts.

Closing this old solved topic.

Offline

Board footer

Powered by FluxBB