All times are UTC-06:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Oct 14, 2011 11:11 am 
Offline

Joined: Sun Sep 18, 2011 4:39 am
Posts: 6
Hi Guys!

Did anybody came across a shell-way to alter the backlight intensity usally controlled with the F8 and F9 keys ?

I did take a look at the xmodmap and identified the XF86KbdBrightnessUp/Down event. But i don't have enough insight into xserver architecture to know where the event is handled. Does anybody have a hint ?

cheers,
Julian


Top
   
 Post subject: xdotool
PostPosted: Fri Oct 14, 2011 5:09 pm 
Offline

Joined: Thu Mar 10, 2011 9:48 pm
Posts: 13
You could "cheat" and use xdotool to fake a keypress.

edit: Wait a sec... are you trying to adjust screen brightness without x running? xdotool will certainly only apply if you're running x.


Top
   
 Post subject:
PostPosted: Sat Apr 28, 2012 6:45 pm 
Offline

Joined: Tue Apr 17, 2012 3:15 am
Posts: 44
Location: Barcelona, Spain
I'm sort of necrobumping here but I was trying to figure this out too and I've found that you can do it by writing a numeric value to /sys/class/backlight/pwm-backlight/brightness (keep in mind the max value set in the max_brightness file in the same folder).

I created two simple Bash scripts for raising and lowering the brightness via this file. I then bound the brightness keys to call those scripts when I press them (in dwm). The downside to this is that you have to change permissions on that brightness file to be writable by your normal user. Can anyone think of a safer option than that?

Edit: nevermind this solution, use mchack's solution below!

_________________
http://www.brandoninvergo.com


Last edited by jakobcreutzfeldt on Tue Dec 04, 2012 4:31 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Sun Apr 29, 2012 3:07 am 
Offline

Joined: Tue Apr 17, 2012 3:15 am
Posts: 44
Location: Barcelona, Spain
The file permissions don't survive a reboot. To make the changes permanent, add the following line to your /etc/rc.local:
Code:
chmod 666 /sys/class/backlight/pwm-backlight/brightness
*edit*: permissions should be 666, not 777 (no need to execute the file)

_________________
http://www.brandoninvergo.com


Top
   
PostPosted: Wed May 02, 2012 6:17 am 
Offline

Joined: Wed May 02, 2012 2:12 am
Posts: 1
Location: Malmö, Sweden
Quote:
Hi Guys!

Did anybody came across a shell-way to alter the backlight intensity usally controlled with the F8 and F9 keys ?
I wrote a trivial C program to handle brightness from the shell:

http://hack.org/mc/hacks/bright.c

It works without X as well.

Note, though, that you that it needs to be setuid root.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group