Use Vial in Linux Without Configuring udev (and Remain Secure)

Last updated on April 6, 2025

Vial is a GUI program that can configure QMK input devices in real time. In Linux, the default configuration usually stops Vial from accessing the input devices. The official document suggests configuring udev rules. For someone who doesn't frequently configure via Vial, this seems to be overkilling and a bit insecure. After all, it opens up the access to the input devices to the user indefinitely, which may be exploited by malicious software.

In this post, I discuss a method that uses Vial in Linux without configuring udev. I believe this method is more secure than configuring udev. Furthermore, this method is arguably more convenient if you only use Vial occasionally.

With the Vial Web App

First, visit the Vial web app in a supported Chromium-based browser. Click "Start Vial" and the web app now should hang, due to insufficient permissions to access the input device. Open a new browser tab and visit chrome://device-log/. You'll see a line like the following:

Failed to open '/dev/hidrawN': FILE_ERROR_ACCESS_DENIED

Where N is a number. This is saying that the browser is unable to access the device /dev/hidrawN, which represents the QMK input device in Linux.

Then grant yourself with the read and write permissions to this input device with the following command:

sudo setfacl -m "u:${USER}:rw" /dev/hidrawN

Refresh the Vial page and try again. You should be able to access the device now.

After configuring, to remove the permissions, simply unplug and plug the input device back in, or execute the following command:

sudo setfacl -x "u:${USER}" /dev/hidrawN

Or, if you are OK with leaving the permissions in place for a while, you can do nothing and the permissions will be gone the next time you reboot or unplug the input device.

With the Vial Desktop App

So far I couldn't find out a way to figure out the device file (/dev/hidrawN) from the Vial desktop app. I would recommend following the steps in the previous section to figure out the device file that represents the input device and grant permissions, and then use the Vial desktop app to access the input device.

Leave a Reply

Your email address will not be published. Required fields are marked *