Is it possible to run a script on an arbitrary dbus signal? Something like Upstart that runs as an unprivileged user and doesn't require root perms to modify?
I ask because I've already written a silly script that waits for bluetooth events to start my music player. Now I'd like to do something similar when my machine connects to specific networks, or other devices attach.
EDIT: My original question didn't specify this, but I meant "associate a number of scripts with one of a set of events" – so I'd have the same launcher-y thing (like Upstart) that manages a number of scripts, each of which cares about a different dbus signal. All in user space.
Best Answer
You need the
dbus-monitor
The script will look something like
Taken from stackoverflow.