Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
Last active June 5, 2025 05:30
Show Gist options
  • Save ThinGuy/7d113d6efc4afbf1471e639f1dc4afee to your computer and use it in GitHub Desktop.
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
#!/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
@luisB001
Copy link

luisB001 commented Jun 5, 2025

I'm very new and wanna use my dolphin bar on my laptop. I'm not sure I'm doing things right. I've been all over the internet must circle back to around here I haven't tried the bottom code but I'm mostly trying to make this work on retro arc. Idk if they're similar. But I haven't had any success. Thanks for any consideration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment