Skip to content

REx_xrandr_display.py doesn't support display ":1" #94

@hello-binit

Description

@hello-binit

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.

try:
d = display.Display(':0')

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".

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions