You are not logged in.
Pages: 1
Hello,
I'm trying to create a udev rule that allows me to run pulseaudio-equalizer enable when my bluetooth headset connects automatically.
So I create this:
# cat /etc/udev/rules.d/10-local.rules
ACTION == "add", SUBSYSTEM == "bluetooth", ATTRS {address} == "my:mac:address", RUN + = "/usr/bin /pulseaudio-equalizer enable"
I reloaded the rules:
Udevadm control --reload-rules
But during a devadm monitor I do not see any trace of my rule.
I missed something?
Offline
As a start I would remove all the extra spaces you have added there and try again.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Sorry my rule is (space because copy/paste to vim):
cat /etc/udev/rules.d/10-local.rules
ACTION=="add", SUBSYSTEM=="bluetooth", ATTRS{address}=="16:01:04:27:09:4F", RUN+="/usr/bin/pulseaudio-equalizer enable"
Offline
You want pulseaudio-equalizer to affect the pulseaudio instance running under your user? If yes that's not going to work, udev rules run as root.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Thank you for these clarifications, I modified as follows:
RUN+="/bin/su julien -c /home/julien/sys/script/pulse.sh"
But still no effect. The command works well as root.
Last edited by lolop (2016-12-13 14:52:21)
Offline
Are you sure the executable is named pulseaudio-equalizer? I don't seem to find anything like that in the official repositories. Is it a package from the AUR?
If I'm not mistaken, running things from udev rules is a bit special, so it is not the same as running them from a terminal. I don't have more ideas, let others chime in on this and maybe someone else can spot the problem.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
The binary is called much more audiodio-equalizer. It comes from the package: aur/pulseaudio-equalizer-ladspa.
Starting with udev would be a good solution, you have to find the right rule. This is particular udev. If one of you knows.
Anyway thanks for your attention
Offline
For the record. "phys" is used instead of "address". (And there is no phys/address of the controller available in udev, strange.)
> udevadm --version
234
> udevadm info -a -p /sys/class/input/mouse2 | grep phys
ATTRS{phys}=="00:1a:7d:da:71:06"
Offline
Pages: 1