Last active
July 12, 2023 04:07
-
-
Save ThinGuy/7d113d6efc4afbf1471e639f1dc4afee to your computer and use it in GitHub Desktop.
udev rules for dolphin emulator on ubuntu - looks for mayflash devices, bluetooth dongles/radios, and logitech usb microphones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You can just paste this in a terminal rather than run it as a script. | |
# Up to you... | |
export RFILE=/etc/udev/rules.d/55-dolphin-emu.rules | |
[[ -f ${RFILE} ]] && { sudo rm -f ${RFILE}; } | |
sudo install -o0 -g0 -m 0644 /dev/null ${RFILE} | |
(for i in $(lsusb|awk 'BEGIN{IGNORECASE=1}/mayflash|logitech usb mic|bluetooth dongle|bluetooth radio/{print $6}');do | |
(printf "SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", ATTRS{idVendor}==\"${i%%:*}\", ATTRS{idProduct}==\"${i##*:}\", MODE=\"0666\", TAG+=\"uaccess\"\n"; | |
printf "SUBSYSTEM==\"hidraw*\", ATTRS{idVendor}==\"${i%%:*}\", ATTRS{idProduct}==\"${i##*:}\", MODE=\"0666\", TAG+=\"uaccess\"\n"); | |
done|sort -uVr)|sudo tee -a ${RFILE} | |
sudo udevadm control --reload-rules && sudo udevadm trigger |
Author
ThinGuy
commented
Jul 12, 2023
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment