Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

linux - Possible to change screen brightness with C?

Using C in Linux, would it be possible to change the brightness of the viewing screen? This isn't expected to be portable other than running on my installs of Ubuntu and Fedora. I'm asking about how I would interface with the os to change the brightness.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I'd start with selecting from the following list of ubuntu pacakges, the tool that allows you to manage your screen's brightness (hint: it depends on the brand)

nvidia-settings - Tool of configuring the NVIDIA graphics driver
smartdimmer - Change LCD brightness on Geforce cards
armada-backlight - adjust backlight of Compaq Armada laptops (E300, M500, M700)
ddccontrol - a program to control monitor parameters
eeepc-acpi-scripts - Scripts to support suspend and hotkeys on the Asus Eee PC laptop
fnfxd - ACPI and hotkey daemon for Toshiba laptops
gddccontrol - a program to control monitor parameters
spicctrl - Sony Vaio controller program to set LCD backlight brightness
tpb - program to use the IBM ThinkPad(tm) special keys
xfce4-power-manager - power manager for Xfce desktop
xfce4-power-manager-plugins - power manager plugins for Xfce panel
xvattr - Utility to change Xv attributes

Once you have selected it,

sudo apt-get build-dep <pkgname>
apt-get source --compile <pkgname> 

should get you on the right track


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...