I have a couple of executables that I need to call, and within them some OpenCV functions are called, requiring camera access. If I run the executable locally on Terminal from my machine, everything works as expected because I have given Terminal camera access. However if I run the same executable through ssh, or within a tmux window, then the OpenCV function fails as it is not given camera access. It is the same for other command line programs that need camera access, like for example imagesnap.
I have noticed that if I run a "screen" or "tmux" session on my machine locally, and then access it remotely over ssh, the camera access works, but if I create the session over ssh, and afterwards access it locally, it does not. In tmux, on the other hand, it does not work in both cases.
Is it possible to give tmux/screen/ssh camera access?
There was some talk about this here - How can I permit SSH connection terminal programs to access Camera? - but in the end the proposed solution didn't actually fix the problem, and it was just a workaround that works in specific cases.