Linux Dual Screen Support

To set up Cortex with dual displays on the same linux device, we run two different instances of the Cortex player on the device, each inside their own Docker container that points to a different display.

To set this up on Ubuntu 16.04 with HWE Kernel:

  • Install Docker
  • Install X on host machine
sudo apt install xserver-xorg xserver-xorg-video-intel x11-utils x11-xserver-utils x11-apps make
  • Update X Config in /etc/X11/xorg.conf to support dual monitors. 
    • Sample Config for two monitors attached to same device over HDMI
  • Start X server on host and leave it running
    • You should be able to run GUI applications separately on each screen. You can test using xeyes. The below commands should run xeyes on each screen.
      $ DISPLAY=:0.0 xeyes
      $ DISPLAY=:0.1 xeyes
  • Use the below Dockerfile and bash script as a starting point to launch the Cortex player using Docker

Dockerfile

Cortex.sh

  • Use the following docker command to run a single instance of the player.
    The fields in bold should be different for each of the two instances of the player. Display ID should correspond to 0.0 or 0.1 and the Cortex Home directory should be where you plan to keep your Cortex files on the host machine.
docker run -ti --rm -e DISPLAY=:<display ID> --privileged \

                --device=/dev/dri:/dev/dri:rw \

                --ipc host \

                -v /var/run/dbus:/var/run/dbus \

                -v /tmp/.X11-unix:/tmp/.X11-unix:rw \

                -v  <cortex home dir>:/home/cortex/.cortex \

                cortex/player

Note: Running multiple instances of the player on the same device may require native video playback and no support for transitions. 

Was this article helpful?
0 out of 0 found this helpful