First of all, I was in the process of learning Ubuntu system, found that my keyboard backlight can never open, (through scroll Lock);
So the Internet Baidu a method, through a script command to control the keyboard backlight, (first contact script)
1. First step open terminal Create a script file named led.sh directly with the VIM command (the default reader will vim)
Copy the script code in the following section
- #!/bin/bash-
- #===============================================================================
- #
- # FILE:ledctrl.sh
- #
- # USAGE:./ledctrl.sh
- #
- # DESCRIPTION:
- #
- # OPTIONS:---
- # REQUIREMENTS:---
- # BUGS:---
- # NOTES:---
- # Author:richard
- # ORGANIZATION:
- # created:2014-12-04 21:56:37 CST
- # REVISION:---
- #===============================================================================
- Status=/tmp/keyboard_led_status
- if [[${1} = = "on"] | | [[!-e ${status}]]; Then
- Xset led named ' Scroll Lock ' && echo "on" > ${status}
- Else
- Xset-led named ' Scroll Lock ' && rm-f ${status}
- Fi
2. Cannot be run immediately after creation, or you will find insufficient authority
chmod +x./led.sh #使脚本具有执行权限./led.sh #执行脚本
That's OK.
3. But it's stupid to run the script manually every time you turn on the backlight.
Enter the settings-"keyboard-" Shortcut-"custom shortcut keys, and then set the name and command, the command is the script file, my address below is not right, should be the script address you created
Then select it and set the shortcut key is usually scroll lock,
Ubuntu next script about keyboard backlight on