How to use OBS to screen record a third monitor in a multi-display setup on Linux/Ubuntu?

I need to run OBS to screen record one of three monitors (the primary stimulus presentation monitor). However, after configuring the screens via XOrgConf in Matlab, the two additional monitors are now blacked out (with an X cursor when my mouse moves into those screens). This is all good, as my experiment runs without issue and the stimuli are displayed on the two additional monitors (with the third experimenter-facing monitor showing the desktop environment and matlab command window.

The issue is that now, when I launch OBS, it only detects the experimenter-facing display and none of the other two displays as options. If I want to be able to screen-record the participant-facing display, is the solution something that has to be done in Matlab, specifically using psychtoolbox configuration, or in Linux?

see ImagingStereoDemo with the writeMovie flag

What @dcnieho says is the proper Psychtoolbox way of recording your stimuli. If you want to use OBS - and I don’t know if that will affect stimulus presentation timing - you could try launching from a terminal via DISPLAY=:0.n ; obs or something like that, settting n to the screen number, to make obs operate on that X-Screen - or search obs docs on how to capture something else than the default X-Screen 0. Never used obs, so don’t know.