1

I'm planning a new project tha would probably involve the manipulation of screen outputs on Linux systems. The idea is to use a camera to detect a person standing in front of a projector and remove that part of the image that would be projected onto the person. (So that at least the person is not blinded).

So basically, I need a man-in-the-middle attack for a secondary monitor. I found XvfB which (as far as I understand it) can simulate a screen. My idea is now to set up such a simulated screen, modify the content of the image and then send the new image to the real projector.

Has someone done something like this or has a completely different approach?

FooTheBar
  • 818
  • 1
  • 9
  • 20
  • Just a very practical note on this one. The person standing in the screen will be blinded regardless. You can try yourself by moving a black window where your head is. – ypnos Aug 05 '15 at 21:37
  • But black is at least much darker than white ;) – FooTheBar Aug 06 '15 at 06:44

2 Answers2

0

I would use the Composite extension to do this. You can take a simple composite manager, like compton as a base.

The composite manager receives all other X11 client windows as framebuffers. It can then render them in whatever fashion it likes on its own fullscreen window.

In your case, the composite manager would deviate from its usual behaviour by masking out a specific region. It seems to be a rather small change to do on existing codebase.

Note that the window managers of the big desktops (KDE, Gnome, Unity…) all have a composite manager included. In this case, you cannot run your own but need to patch the composite module of the respective window manager.

For your purpose however I guess it doesn't hurt to much to change to a simpler window manager + your custom composite manager solution.

ypnos
  • 50,202
  • 14
  • 95
  • 141
0

You could use X SHAPE extension: http://www.x.org/releases/X11R7.7/doc/xextproto/shape.html

Using that, you can create windows with irregular shapes. (Like program xeyes does.) You could create a black fullscreen bordeless always-on-top window that will continuously change shape based on the mask you give it.

michalsrb
  • 4,703
  • 1
  • 18
  • 35