在 Linux 上使用 VIA

Last

前言

  • 今日想对机械键盘进行改键,需要使用 via。该网站在 Windows 10 上运行良好,但是在 Linux 上出现了无法连接键盘的问题。

查看浏览器日志

  • 本人使用的是 Brave 浏览器,系 Chrome 的二次开发版本,故访问此页面 查看设备连接相关的日志。

  • 在其中可以看到这样一条:

    1
    2
    Failed to open '/dev/hidraw3': FILE_ERROR_ACCESS_DENIED
    Access denied opening device read-write, trying read-only.
  • 查看文件权限:

    1
    ls -l /dev/hidraw3
  • output:

    1
    crw------- root root 0 B Fri Aug  9 11:06:55 2024  /dev/hidraw3
  • 可以看到,浏览器没有权限访问该文件。

授予权限

  • 使用 chmod:

    1
    sudo chmod a+rw /dev/hidraw3
  • 回到 via 界面,刷新后即可连接设备进行改建。


  • 收回权限:

    1
    sudo chmod 600 /dev/hidraw3
  • 直接重启系统也可以重置该文件的权限。

  • Title: 在 Linux 上使用 VIA
  • Author: Last
  • Created at : 2024-08-09 11:26:47
  • Link: https://blog.imlast.top/2024/08/09/access-keyboard-with-via-on-linux/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
在 Linux 上使用 VIA