Logitech makes some of the most popular keyboards, but they still don’t seem to support the Linux side of things properly. It might be unofficial and not supporting all keyboards under the sun, but the g810-led project can probably help you control your Logitech keyboard’s lighting, making it useful instead of looking like a disco ball.
g810-led is available in the official repositories of most Debian-compatible distributions. Thus, if you are using something like Debian, Ubuntu, or Mint, you can install it with:
sudo apt install g810-led
If you are on Arch Linux, Manjaro or another distribution with access to Aur, you can use something like the following to bring it on board:
sudo yay -S g810-led-git
Red Hat and Fedora fans will first have to enable its repository with:
sudo dnf copr enable lkiesow/g810-led
Then, install it with:
sudo dnf install g810-led
g810-led doesn’t offer a graphical front-end, so we will need to run it via the terminal.
Note: for the rest of this tutorial we’ll be using g810-led on a Mint installation. Although everything we see should apply on Ubuntu and Debian, some things (like the location of files) may change on other distributions.
Playing with Lights
Run the program to check out the basics on how to use it:
Many Logitech keyboards insist on displaying continuously changing light shows, trying to impress with their mastery of colors. However, this can be extra-annoying when you’re trying to use them for typing.
With g810-led, to stop any color shifts, moving patterns, and set every key to white, use:
g810-led -a ffffff
What this command does is change the color of all keys on the keyboard (
-a) to white (
If you want to turn every key a bright red, you can use the command:
g810-led -a ff0000
As you can see, g810-led uses RGB color codes. You can find the color you want here.
To set every key to a bright green instead, use:
g810-led -a 00ff00
Likewise, to turn all keys to the bluest possible blue, use:
g810-led -a 0000ff
Keys and Key Groups
Let’s start with a little taste of what you can achieve by trying out the following command:
g810-led -k w ff0000
With this command, we instructed g810-led to change the color for the w key only. Repeat the command above another three times, replacing the “w” with the letters a, s, and d, and you’ll have a red-colored WASD setup to show everyone how much you love FPS games.
Thankfully, you don’t have to change every single key on its own. g810-led comes with some predefined groups that bundle many keys together. To check them out, use the command:
You can then use the
-g parameter to choose a key group for which you want to set the color. For example, to set the Fn keys to a bright yellow:
g810-led -g fkeys ffff00
You can replace “fkeys” with any of the groups g810-led reported when you used the
Make It Everlasting
The changes you made are temporary and will be lost after a reboot. To make them permanent, you will have to add them to g810-led’s default profile. The program will load when you log in to your desktop and apply this profile to your keyboard automatically.
To edit your profile, use the command:
sudo nano /etc/g810-led/profile
The profile will initially be empty. Copy the commands you used in your terminal to style your keyboard as you like and paste them into the profile. Then, remove the actual “g810-led” command and the dash before each parameter from every one of them, leaving only the parameters and values. For example, the commands:
g810-led -k w ff0000 g810-led -g fkeys ffff00
should be changed to:
k w ff0000 g fkeys ffff00
Finally, add a single
c character (without the quotation marks) on its own line after everything else to mark the end of your settings. As an example, my profile for a g512 keyboard looks like this:
a aaaaaa g fkeys 444488 g modifiers 884444 g arrows 330000 g functions 337733 g numeric 224422 c
Save your profile, and after your next reboot, your keyboard’s LED lights will automatically change to the defined colors after you log in to your desktop.
Of course, nobody stops you from using the command in your scripts. If you’re creative, the sky’s the limit. Why not take the output from programs that read your computer’s temperature sensors’ status and have some keys change from green to red as a visual indicator?
Once you have configured your keyboard lighting, you may want to start creating your own shortcut keys and automation tool in Linux.
Our latest tutorials delivered straight to your inbox