xbacklight not working on Dell Inspiron laptop
Hi,
I was working with xbacklight today. To adjust my brightness, I previously had a really simple script that 'echo'ed a number into /sys/class/backlight/intel_backlight/brightness. But that required root privleges, and I wanted to try to do it using my window manager's keybindings. So I installed xorg-xbacklight and ran this in a teminal emulator: Code:
xbacklight -set 100 I opened up tty2 and tried again. This time, it said Code:
RANDR Query Version returned error -1 Any ideas? EDIT: on the 2 other laptops I've used Arch on, the hardware buttons for backlight (Fn + F4 and F5) worked out-of-the-box, but on this laptop they don't do a thing. EDIT 2: I looked up the error, and found a bug report for Ubuntu about xbacklight not working...could that problem apply to Arch, too? |
Bug report here sounds similar however it's for Ubuntu
Quote:
Your problem might be the D-Buss --session which has to hand that off to the D-Buss --system for that to work, I've tried to fix something similar (system bell) with another user but without root access the best we could manage was intermittent functionality. |
Thanks for the reply!
Unfortunately, the 'xrandr' command in the bug report fails to work as well. And yes, I checked to see if it was a different display name than the one in the example. So I guess I'll just have to deal with it until there's a bugfix? Or will one even come, since that bug report is almost 2 years old? Thanks! |
Well, it seems all we need is the ability to have your script run with elevated privileges.
|
Yes, and I've been using sudo to run it, and it works jsut fine. However, if possible, I'd like to write a backlight-up script and a backlight-down script that I could give a keybinding with xbindkeys. If I'm correctly understanding the question you refrenced, the final script still requires the user to type the password. I'd prefer not to give myself sudo rights without the password prompt. Is there a way around this?
Thanks! |
OK, I've written the script (with the exception of the root privleges, I still need to run it with sudo). I've run into a few problems that don't make sense to me.
Code:
#!/bin/bash When I run 'sudo ./backlight higher' and 'sudo ./backlight lower' the brightness changes, but it returns a "permission denied" error on the line with the "if" statement. As a result, the "if" statement doesn't run, and if my brightness is at 10 and I run 'lower' it turns the backlight off, which I do NOT want to do. Sorry if this is a really basic question, this is one of my first attempts at bash scripting, and I just can't see why I have permission errors with variables. Thanks! |
Quote:
*effectively making your script a daemon* |
Quote:
Still, the X11 server has direct access to the hardware, can you pipe it through there? |
Quote:
I know next to nothing about D-bus, so I'll take your word for it :D How would I pipe it through X11? I'm somewhat familiar with pipes on the command line, is it similar to that? Thanks! |
Quote:
|
All times are GMT -5. The time now is 08:37 PM. |