LCD and Keyboard Brightness on the Zipit

I created a couple of scripts to easily change the LCD and Keyboard brightness from the command line. They unfortunately need to be run as root, but with the rootnexus image, we can do some modifications to get it working as a regular user.

Gain root access from the command line:
op shell

Change directory:
cd /usr/bin

Then download the scripts:
wget http://www.mozzwald.com/sites/default/files/lcd
wget http://www.mozzwald.com/sites/default/files/keys

Make them executable:
chmod +x keys lcd

Now we need to edit the "op" config file and allow it to run as normal user:
nano /etc/op/op.conf

Add the following to the end of the file:

lcd /bin/sh -c "/usr/bin/lcd $1";
users=PRIVILEGED
environment
#
keys /bin/sh -c "/usr/bin/keys $1";
users=PRIVILEGED
environment

Press CTRL-X to save the file and quit nano. Type "exit" to quit root access. Now try it out like this:
op lcd high
op keys med

The scripts accept max, high, med, low, or a number from 1-255. You can edit the scripts to change max, high, med, and low to your preferred setting.

Thank you so much! I used


Thank you so much!

I used your instructions and they were great. I did use Aliosas userland image, which apparently doesn't come with op, so in that case you just type: apt-get install op

Idle


Anyway to lower the lcd and keys when there is no keyboard activity?

Power Management


If you're using the rootnexus image there is power management built in that shuts them off if you close the lid and turns them on when open. The script may run on another image with some tweaking. You can check out an older version of it here. The newer version has better lid detection and should be in the latest image.

You can also add this to your .xinitrc file:

xset dpms 0 0 90 &

Change the 90 to how ever many seconds before the screen goes blank.

Recent comments
Powered by Drupal, an open source content management system