Detecting screen disconnection
libv at skynet.be
Sun Oct 31 07:44:08 PST 2004
On Sun, Oct 31, 2004 at 04:58:50PM +0200, Ely Levy wrote:
> I was wondering if there is a way to know when someone disconnect a screen
> from the computer. It can be very usefull for a notifying against theft
> systems and for anti users making mess with hardware systems;)
> I thought about ddcing the screen every few minutes but I'm nto sure how
> good idea that is.
> Ely Levy
It would be nice to have so that one can reattach a new monitor without
restarting X entirely (when there are bandwidth/frequency issues). X can
then revalidate modes and switchmode to get a usable display again. Or
attach a TV and see X initialise it, while reinitialising crt. That sort
of thing. From what i can see, it is not that hard a task.
Polling all outputs all the time would be dreadful though (i'm not sure
if many CRT dacs can tell you if there is anything attached, dcc might
be an option then). Maybe a switchmode event could trigger it, maybe
some sort of keycombination, xrandr too, even though it's use might be
limited if your crt is unable to display the mode :).
More information about the xorg