如何在 Linux 上设置雷蛇设备的灯光效果和其他配置
雷蛇
你有了一个闪亮的新雷蛇硬件，但你找不到 Linux 的 Razer Synapse 软件。而你最终没有正确 RGB 同步，也没有办法定制它。你会怎么做呢？


好吧，对于某些功能，比如给你的鼠标添加宏，你仍然需要（在 Windows 或 MacOS 上）访问 Razer Synapse。


但是，要调整其他一些选项，如键盘的宏，改变鼠标的 DPI，或灯光效果，你可以在 Linux 上轻松设置你的雷蛇外设。


![My Razer Basilisk V2 with lighting effect](/data/attachment/album/202106/30/160631o9o6fgjo9z6pvv5t.jpg)


这里有一些鼠标和鼠标垫的照片。这是同样的设置，但有不同的照明方案。点击图片可以看到更大的图片。


![](/data/attachment/album/202106/30/160631v5rd7a0o1r7t4p62.jpg)


![](/data/attachment/album/202106/30/160632jnyn0gn080h05mi0.jpg)


![](/data/attachment/album/202106/30/160633aa3hh0dr3asthmd3.jpg)


雷蛇 Basilisk 是一款不错的游戏鼠标。如果你想，你可以从亚马逊订购或从当地商店获得。


如果你已经拥有一个雷蛇设备，让我展示一下配置它的步骤，就像我在这里做的那样。


### 步骤 1：安装 OpenRazer


**OpenRazer** 是一个开源的驱动程序，使雷蛇硬件在 Linux 上工作。它支持几种功能来定制和控制你的设备，包括 RGB 鼠标垫。


虽然这不是官方 Linux 驱动，但它在各种设备上工作良好。


它为各种 Linux 发行版提供支持，包括 Solus、openSUSE、Fedora、Debian、Arch Linux、Ubuntu 和其他一些发行版。


在这里，我将重点介绍在任何基于 Ubuntu 的发行版上安装它的步骤，对于其他发行版，你可能想参考 [官方说明](https://openrazer.github.io/#download)。


你需要在 Ubuntu 上 [使用 PPA](https://itsfoss.com/ppa-guide/) 安装 OpenRazer，下面是如何做的：



```
sudo apt install software-properties-gtk
sudo add-apt-repository ppa:openrazer/stable
sudo apt update
sudo apt install openrazer-meta

```

它也提供了一个 [守护进程](https://itsfoss.com/linux-daemons/)，你可以选择让它工作，你要把你的用户加入到 `plugdev` 组，它给了设备的特权访问：



```
sudo gpasswd -a $USER plugdev

```

我不需要用上述命令中配置/添加一个守护程序，但我仍然可以很好地使用这些设备。守护进程主要是确保驱动保持活跃。


* [下载 OpenRazer](https://openrazer.github.io/)


### 步骤 2：安装一个 GUI 来管理和调整选项


现在驱动已经安装完毕，你所需要的是一个图形用户界面 （GUI） 来帮助你定制你的雷蛇硬件。


你可以找到一些可用的选择，但我将推荐安装 [Polychromatic](https://polychromatic.app)，它提供了一个有吸引力的用户界面，而且运行良好。


![](/data/attachment/album/202106/30/160633rmrlj987tq7wl77w.png)


Polychromatic 是我能推荐的最接近 Razer Synapse 的应用，而且效果不错。


对于基于 Ubuntu 的发行版，你需要做的就是使用 PPA 安装它：



```
sudo add-apt-repository ppa:polychromatic/stable
sudo apt update
sudo apt install polychromatic

```

对于 Arch Linux 用户，你可以在 [AUR](https://itsfoss.com/aur-arch-linux/) 中找到它。关于更多的安装说明，你可以参考[官方下载页面](https://polychromatic.app/download/)。


* [下载 Polychromatic](https://polychromatic.app/)


你会得到不同设备的不同选项。在这里，我试着改变 DPI，自定义颜色周期，以及我的雷蛇 Basilisk v2 鼠标的轮询率，它完全正常。


![Customization options for a mouse](/data/attachment/album/202106/30/160634wcg5ff8f8fggjsjd.png)


如果你知道你想做什么，它还为你提供了轻松重启或停止 [守护进程](https://itsfoss.com/linux-daemons/)、改变小程序图标和执行高级配置选项的能力。


另外，你可以试试 [RazerGenie](https://github.com/z3ntu/RazerGenie)、[Snake](https://github.com/bithatch/snake) 或 [OpenRGB](https://itsfoss.com/openrgb/) （用于改变颜色）来调整鼠标的颜色或任何其他设置。


### 总结


现在你可以轻松地定制你的雷蛇硬件了，希望你能玩得开心！


虽然你可能会找到一些其他的选择来配置你的雷蛇设备，但我没有找到任何其他效果这么好的选择。


如果你遇到了一些有用的东西，值得在这里为所有的雷蛇用户提一下，请在下面的评论中告诉我。




---


via: <https://itsfoss.com/set-up-razer-devices-linux/>


作者：[Ankush Das](https://itsfoss.com/author/ankush/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

You have a shiny new Razer hardware, but you cannot find the Razer Synapse software for Linux. And you end up with no proper RGB sync and do not get to customize it. What do you do?

Well, for certain functionalities, like adding macros to your mouse, you will still need access to Razer Synapse (on Windows or macOS).

But, to tweak a few other options like macros for the keyboard, changing the DPI of your mouse, or lighting effects, you can easily set up your Razer peripherals on Linux.

![razer basilisk v2](https://itsfoss.com/content/images/wordpress/2021/06/Razer-Basilisk-V2.jpg)

Here are some pictures of both the mouse and the mouse pad. It’s the same setup but with different lighting schemes. Click on the images to see bigger images.

![razer mouse pad lighting effect 3 com](https://itsfoss.com/content/images/wordpress/2021/06/razer-mouse-pad-lighting-effect-3-com.jpg)

Razer Basilisk is a good gaming mouse. If you want you can order it from [Amazon](https://www.amazon.com/dp/B081QXJLDN?tag=chmod7mediate-20&linkCode=osi&th=1&psc=1&keywords=razer+basilisk+v2&ref=itsfoss.com) or get it from your local store.

If you already own a Razer device, let me show the steps to configure it, just like what I did here.

## Step 1: Install OpenRazer

**OpenRazer** is an open-source driver to make Razer hardware work on Linux. It supports several functionalities to customize and control your devices, including RGB mousemats.

While this is not an official driver for Linux, it works quite well for a wide range of devices.

**It offers support for a variety of Linux distributions that include Solus, openSUSE, Fedora, Debian, Arch Linux, Ubuntu, and a few others.**

Here, I will be focusing on the steps to install it on any Ubuntu-based distro, you may want to refer to the [official instructions](https://openrazer.github.io/?ref=itsfoss.com#download) for other distros.

You need to install OpenRazer [using a PPA](https://itsfoss.com/ppa-guide/) on Ubuntu, here’s how to do that:

```
sudo apt install software-properties-gtk
sudo add-apt-repository ppa:openrazer/stable
sudo apt update
sudo apt install openrazer-meta
```


It also offers a [daemon](https://itsfoss.com/linux-daemons/) as well, you can choose to make it work, you will be adding your user to the **plugdev** group — which gives privileged access to the device:

`sudo gpasswd -a $USER plugdev`


I did not need to configure/add a daemon using the above command, but I can still use the devices just fine. The daemon mostly ensures that the driver stays active.

## Step 2: Install a GUI to Manage and Tweak Options

Now that the driver has been installed, all you need is a graphical user interface (GUI) to help you customize your Razer hardware.

You can find a few options available out there, but I will recommend installing [Polychromatic](https://polychromatic.app/?ref=itsfoss.com), which offers an attractive UI and works well as well.

![polychromatic app](https://itsfoss.com/content/images/wordpress/2021/06/polychromatic-app-1.png)

Polychromatic app is the closest I could recommend to Razer Synapse, and it works good.

For Ubuntu-based distros, all you need to do is install it using PPA:

```
sudo add-apt-repository ppa:polychromatic/stable
sudo apt update
sudo apt install polychromatic
```


You can find it listed in [AUR](https://itsfoss.com/aur-arch-linux/) for Arch Linux users. For more installation instructions, you can refer to the [official download page](https://polychromatic.app/download/?ref=itsfoss.com).

While you will get a distinct set of options for various devices. Here, I tried changing the DPI, customizing the color cycle, and the polling rate of my Razer Basilisk v2 mouse, and it worked completely fine.

![razer basilisk polychromatic](https://itsfoss.com/content/images/wordpress/2021/06/razer-basilisk-polychromatic.png)

It also offers you the ability to easily restart or stop the [daemon](https://itsfoss.com/linux-daemons/), change the applet icon, and perform advanced configuration options if you know what you want to do.

Alternatively, you can try [RazerGenie](https://github.com/z3ntu/RazerGenie?ref=itsfoss.com), [Snake](https://github.com/bithatch/snake?ref=itsfoss.com), or [OpenRGB](https://itsfoss.com/openrgb/) (meant for changing the colors) to tweak the mouse color or any other settings.

## Wrapping Up

Now that you can easily customize your Razer hardware, hope you have fun!

While you may find some other options to configure your Razer devices, I did not find any other options that work very well.

If you have come across something that works and that deserves a mention here for all the Razer users, let me know in the comments below.