
Lockfile /home/greys/scripts/backlight/backlight.kbd found, skipping action.

HOUR 00 is rather late! Must turn on backlightĬurrent backlight 2 is different from desired backlight 3 Log file looks like this: :~/scripts $ tail backlight/backlight.log


This is what my script does when you run it as root (it won’t work if you run as regular user): No action needed" | tee -a $LOGFILEįi How My Dell Keyboard Backlight Script Works If thenĮcho "Current backlight $KBDBACKLIGHT is different from desired backlight $BACKLIGHT" | tee -a $LOGFILEįILE=`find $`Įcho "No lock file! Updating keyboard backlight" | tee -a $LOGFILEĮcho $BACKLIGHT > /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightnessĮcho "Lockfile $FILE found, skipping action." | tee -a $LOGFILEĮcho "Current backlight $KBDBACKLIGHT is the same as desired. KBDBACKLIGHT=`cat /sys/devices/platform/dell-laptop/leds/dell::kbd_backlight/brightness`Įcho "->" | tee -a $LOGFILEĮcho "HOUR $HOUR is rather late! Must turn on backlight" | tee -a $LOGFILEĮcho "HOUR $HOUR is not too late, must turn off the backlight" | tee -a $LOGFILE Bash Script for Keyboard Backlight ControlĪs I’ve written just a couple of days ago, it’s actually quite easy to turn keyboard backlight on or off on a Dell XPS in Linux (and this probably works with other Dell laptops).Īrmed with that knowledge, I’ve written the following script: #!/bin/bash I have writted a basic enough script that can be added as root cronjob for automatically controlling keyboard backlight on my Dell XPS 9380. Last night I finished a fun mini project as part of Unix Tutorials Projects.
