trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: July 2019

Re: [trinity-users] to adjust the brigtness of the screen

From: "David C. Rankin" <drankinatty@...>
Date: Wed, 24 Jul 2019 18:09:53 -0500
On 07/23/2019 11:04 AM, andre_debian@... wrote:
> The problem David,
> 
> is that in root, I receive forbidden, if I want to change the value 
> in the file :
> /sys/class/backlight/intel_backlight/brightness
> 
> changing = no possible.
> 
> The file is 664.
> 
> Regards,
> 
> Andr�

That's weird, and that tells me you are not actually running sudo (or you are
somehow running the script with UID or EUID 0.

With file permission 664 that is rw_rw_r__ meaning the owner has read/write,
group has read/write and world has read. If you have configured sudo (and the
sudoers file as discussed) then as root (under sudo) you have write permission
and you can change the file. So if you are getting "permission denied", your
sudo is failing.

Try this (if your range is 0-99 for brightness):

   sudo sh -c "echo '"50"' > '"/sys/class/backlight/intel_backlight/brightness"'

The screen brightness should change to 1/2 brightness. Then change it to 25,
it should change to 1/4 brightness, etc...

If that fails, you have a sudo problem. Now su to root and try the same thing.
If that fails, then we really have problems. Let me know. I suspect there is
an issue with the sudo config. You have to set it up as I showed you. The only
wildcard is whether you have a wheel group or whether your distro uses a group
called sudo instead. Check and let me know, we will get this sorted.



-- 
David C. Rankin, J.D.,P.E.