VirtualBox No backlight on CMSTORM keyboard
By:Roy.LiuLast updated:2019-08-11
This article shows you how to enable the backlight feature (Screen Lock key) on a CMSTORM keyboard.
Environment
- VirtualBox 5.1.14
- Ubuntu 16
1. Solution – Quick
To fix it quickly, run the following command in a terminal, and press the “Screen Lock key” again, the backlight should be enabled.
Terminal
$ xmodmap -e 'add mod3 = Scroll_Lock'
Note
If the VM is restarted, you need to issue the same command again!
If the VM is restarted, you need to issue the same command again!
2. Solution – Shell Script + Auto Start
The permanent solution is creating a shell script and set its auto start.
2.1 Create a shell script, and put the following content:
/home/mkyong/scripts/backlight.sh
#!/bin/bash sleep 1 xmodmap -e 'add mod3 = Scroll_Lock' xset led 3
2.2 Make above shell script executable – chmod +x backlight.sh
Terminal
$ ls -lsah total 12K 4.0K drwxr-xr-x 2 mkyong mkyong 4.0K Feb 5 10:24 . 4.0K drwxr-xr-x 17 mkyong mkyong 4.0K Feb 5 10:24 .. 4.0K -rw-r--r-- 1 mkyong mkyong 67 Feb 5 10:24 backlight.sh $ chmod +x backlight.sh $ ls -lsah total 12K 4.0K drwxr-xr-x 2 mkyong mkyong 4.0K Feb 5 10:24 . 4.0K drwxr-xr-x 17 mkyong mkyong 4.0K Feb 5 10:24 .. 4.0K -rwxr-xr-x 1 mkyong mkyong 67 Feb 5 10:24 backlight.sh
2.3 Create a /etc/xdg/autostart/backlight.desktop file and set the above shell script auto start.
Terminal
$ sudo vim /etc/xdg/autostart/backlight.desktop
/etc/xdg/autostart/backlight.desktop
[Desktop Entry] Type=Application Name=Devastator Keyboard Backlight Exec=/home/mkyong/scripts/backlight.sh X-GNOME-Autostart-enabled=true
Done. Restart VM.
References
From:一号门
Previous:VirtualBox Ubuntu slow and laggy UI
COMMENTS