You are not logged in.
Hi all,
Is there an Xfce-specific command to get the current display brightness that I can also see from the screenshot below?
Thank you! :-)
Last edited by orschiro (2019-02-20 10:32:30)
Offline
Not Xfce specific, but try:
cat /sys/class/backlight/*/brightness
Offline
You can also use xfpm-power-backlight-helper:
xfpm-power-backlight-helper --get-brightness
It will display the value for backlight interface that xfce4-power-manager is using.
You can also manipulate values. See:
xfpm-power-backlight-helper --help
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
You can also use xfpm-power-backlight-helper:
xfpm-power-backlight-helper --get-brightness
It will display the value for backlight interface that xfce4-power-manager is using.
You can also manipulate values. See:
xfpm-power-backlight-helper --help
@ToZ this is great, thanks!
Follow-up question. Is it possible to set brightness without being root?
[orschiro@x230 ~]$ xfpm-power-backlight-helper --set-brightness 3000
This program can only be used by the root user
Offline
Follow-up question. Is it possible to set brightness without being root?
Not directly, no. The backlight interface is protected by the system so that only root can write to it.
If you use sudo, you can create a no-password rule to allow you to execute the command without being prompted for a password. To do so, create the file (as root) /etc/sudoers.d/xfpm-power-backlight-helper with the following content:
%wheel ALL=(ALL) NOPASSWD: /usr/bin/xfpm-power-backlight-helper
...and call the executable still with sudo like:
sudo xfpm-power-backlight-helper --set-brightness 3000
...and you won't be asked for a password.
Notes on the /etc/sudoers.d/xfpm-power-backlight-helper file:
"%wheel" indicates any member of the wheel group can execute the command without being prompted for a password. If your distro uses the "sudo" group, replace "%wheel" with "%sudo". You can also just specify a single user to have this right. In that case, replace "%wheel" with your username (no %) - like "toz".
It assumes that the xfpm-power-backlight-helper executable is in /usr/bin. If it is in another place, change the path.
Detailed info about sudo and sudoers configuration can be found here.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
@ToZ much appreciate your help and advice. Thank you! ❤
Offline
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 535.95 KiB (Peak: 536.8 KiB) ]