Context: Ubuntu 14.04 (trusty), 3.19.0-26-generic (#28~14.04.1-Ubuntu SMP Wed Aug 12 14:09:17 UTC 2015), Xorg 1.17.1 (13 May 2015 04:35:05AM), Toshiba Satellite L750
I am trying to write a script to control the brightness of my screen.
#!/bin/bash
#
BRIGHTNESS=`zenity --scale --text="Dim screen" --min-value=1 --max-value=9 --step-value=1 --value=9`
#xrandr --output VGA1 --brightness 0.$BRIGHTNESS
(xrandr is deliberately commented out at this point.)
I had initially thought zenity would work with floating point numbers so I had --min-value
as 0.0
and --max-value
of 2.0
and a --step-value
of 0.1
. I got an error (the same as I'm getting now) so I changed to integers and changed the xrandr --brightness
value to 0.$BRIGHTNESS
.
It doesn't seem to matter what I do. I get the following error:
bugmagnet@bugmagnet-Satellite-L750:~/bin$ ./brightness
** (zenity:6095): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-3jrfy88FSO: Connection refused
This option is not available. Please see --help for all possible usages.
I'm fairly sure that my syntax is okay. So where am I going wrong?
--step
rather than--step-value
: seezenity --help-scale
.