ACMILabs / media-player

A playlist media player prototype.
Mozilla Public License 2.0
12 stars 3 forks source link

#144 Fix display detection #145

Closed sighmon closed 3 years ago

sighmon commented 3 years ago

Resolves #144

Be more specific about display detection, :0.0 instead of just 0.0 so we don't match :10.0 and set the DISPLAY variable to the wrong display.

Acceptance Criteria

Relevant design files

Testing instructions

  1. Reboot a media player 10x times, see that the display is correctly detected
  2. OR start the media player container: cd development and docker-compose up
  3. Bash into it: docker exec -it mediaplayer bash
  4. Set DISPLAYS variable to the 10th start state: export DISPLAYS="DISPLAY=:0 DISPLAY=:10 DISPLAY=:10.0"
  5. Note that the new fix doesn't match :10.0 using this: if [[ $DISPLAYS == *":0.0"* ]]; then echo "MATCHED"; fi; (it will print MATCHED if you remove the : which demonstrates the previous bug

DoD

For requester to complete: