The most recent version of this page is a draft.DiffThis version is outdated by a newer approved version.DiffThis version (2021/10/05 07:01) is a draft.
Approvals: 0/1

This is an old revision of the document!


Under construction, but this needs to be here as it's mentioned literally no where else.

udev Rules in Batocera

Batocera supports the use of udev rules just like any other ordinary Linux-based operating system, however the path to use it is different from most. You can transfer your udev rules over to /userdata/system/udev/rules.d/ and they will be enabled once Batocera has finished booting.

If you need something activated earlier in the boot process or something more intimate to the system, you can instead opt to use boot scripts.

For example, if you wanted to enable the Bluetooth passthrough udev rule of Dolphin for your own Bluetooth dongle (list of compatible adapters for Dolphin, not necessarily Batocera is further down that page), you would use this file:

52-dolphin.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="YOURVID", ATTRS{idProduct}=="YOURPID", TAG+="uaccess"

copy it to /userdata/system/udev/rules.d/52-dolphin.rules and reboot Batocera.

Once Batocera has booted you can view the existing udev rules for your system in /etc/udev/rules.d/. You can do this from the file manager ([F1] on the system list) and going up one level, or via SSH. You cannot access this location from the network share, as it is outside of the userdata partition.

If you find that your udev rule isn't working after reboot for any reason, you can alternatively try putting your *.rules file directly into /etc/udev/rules.d/ and running batocera-save-overlay afterward. This will call it slightly earlier in the boot process.

  • udev_rules.1633410087.txt.gz
  • Last modified: 3 years ago
  • by atari