# HDMI connect-event, automatic action



## trutlze (Jun 15, 2011)

Hi,

I want to plug in a HDMI-cable (connected to a display of course) into my computer and want FreeBSD to do something (i.e. running a script) after I've done it.

I thought of using devd (/etc/devd.conf), but I wasn't able to figure out the "HDMI-cable-plugin"-event. I don't know where to search for this event (it's not written to dmesg).  I know that it might have something to do with devctl, but how can I see the output of this (kernel?-) process?

Thank in advance.


----------



## aragon (Jun 16, 2011)

Unfortunately devd(8) doesn't catch all events, but to check if it does:

`$ telnet /var/run/devd.pipe`

And then try cause an event.  If devd sees it, you'll get some text appearing in the telnet session.


----------



## trutlze (Jun 16, 2011)

Nice to know! But like you expected the HDMI-connect event isn't caught


----------



## wblock@ (Jun 16, 2011)

The driver would have to notify the system of a connection event.  If there's any software that can determine whether that cable is attached (maybe xrandr(1)), a shell script loop could be wrapped around it to form a crude daemon.


----------



## trutlze (Jun 19, 2011)

OK, that's one solution.
But are there other already implemented possibilities in the system (like devctl(4)() would have been) but not yet revealed?


----------

