-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The REx_xrandr_display.py tool is hardcoded to look for a display at ":0" under the assumption that when 1 or more monitor(s) are plugged into the robot, the enumeration would start at ":0". The color # pattern is the same one printed out when echo $DISPLAY the display env var.
stretch_factory/python/tools/REx_xrandr_display.py
Lines 39 to 40 in fa0c069
| try: | |
| d = display.Display(':0') |
stretch_factory/python/tools/REx_xrandr_display.py
Lines 27 to 28 in fa0c069
| if hu.get_display() != ":0": | |
| print("Error: Cannot change resolution when the DISPLAY env var isn't set to ':0'. Try export DISPLAY=':0'") |
In reality, enumeration doesn't necessarily start at ":0". In a setup with a TV plugged into Stretch, we saw enumeration start at ":1". Modifying the tool to use ":1" instead of ":0" in the code above worked in that setup. It's not clear how a display is mapped to a colon # pattern. This will require some research.
To fix this tool, support display setups that don't enumerate starting at ":0".