1

I have a console (C) program.

Usually I let it run in a console-window, it runs continously, and polls the keyboard, to change parameters. This is running on a raspberry Pi

The program have the option to open a X-window showing the contents of a camera with some zones drawn on top of the image; those zones are for motion detect and can be moved by the keystrokes I mentioned above.

How to dockerize this? One option is to include a vnc environment into the container, but won't that be a huge image then?

Other options?

Can a program running inside a container create a window on the X-server outside? (in x-terminology the screen is the server and the program using it is the client)

To send keystrokes to the running program I will do "docker attach "

Leif Neland
  • 1,416
  • 1
  • 17
  • 40
  • Possible duplicate of [why can i not run a X11 application?](https://stackoverflow.com/questions/57733715/why-can-i-not-run-a-x11-application) – masseyb Oct 25 '19 at 14:23
  • You can share the hosts x-server with the container process by mounting the server socket, setting the correct DISPLAY in your container and ensuring that your x-server accepts the connection - check out this [answer](https://stackoverflow.com/a/57733922/1423507). – masseyb Oct 25 '19 at 14:28

0 Answers0