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
[x] Fix display detection bug so matched DISPLAY=:10.0 doesn't set the display to 0.0
Relevant design files
None
Testing instructions
Reboot a media player 10x times, see that the display is correctly detected
OR start the media player container: cd development and docker-compose up
Bash into it: docker exec -it mediaplayer bash
Set DISPLAYS variable to the 10th start state: export DISPLAYS="DISPLAY=:0 DISPLAY=:10 DISPLAY=:10.0"
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:
[x] All acceptance criteria are met
~[ ] New logic has been documented~
~[ ] New logic has appropriate unit tests~
[ ] Changelog has been updated if necessary
~[ ] Deployment / migration instruction have been updated if required~
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
DISPLAY=:10.0
doesn't set the display to0.0
Relevant design files
Testing instructions
cd development
anddocker-compose up
docker exec -it mediaplayer bash
DISPLAYS
variable to the 10th start state:export DISPLAYS="DISPLAY=:0 DISPLAY=:10 DISPLAY=:10.0"
:10.0
using this:if [[ $DISPLAYS == *":0.0"* ]]; then echo "MATCHED"; fi;
(it will printMATCHED
if you remove the:
which demonstrates the previous bugDoD
For requester to complete: