XRandr adaptive mirrored screens

Prunk Dump prunkdump at gmail.com
Mon Apr 9 16:25:03 UTC 2018


Hi Xorg Team !

I'm the network administrator of a French High school and I'm face of
a new problem since the integration of XRandr in Debian Stretch.

Many of my Debian Stretch stations are teacher's desktop. Each of them
are connected to a screen and to an interactive projector. I would
like that the displays are mirrored with the best common resolution.
But the problem is that :
-> Not all station are the same model. So XRandr does not give always
the same name to the outputs.
-> The screen and the projector are not always connected to the same
display ports (VGA, HDMI, ... )
-> The screen and projector sizes varies. So Xrandr don't always
select the same resolution by default.
-> Not all graphic cards support the same display resolutions.

So actually I need to make a custom Xorg config file for all my
stations individually. For each station :
-> I need to identify the output's name of the screen and of the projector
-> I need to list the supported resolutions for each output
-> I need to choose the best match resolution
-> And finally I need to I add a config file like this :

Section "Monitor"
    Identifier  "HDMI-1"
    Option      "Primary" "true"
    Option "PreferredMode" "1280x1024"
EndSection

Section "Monitor"
    Identifier  "VGA-1"
    Option "Position" "0 0"
    Option "PreferredMode" "1280x1024"
EndSection

Is there a way to make Xorg mirror screens by default and choose
itself the best resolution ? Ideally a config file that I can deploy
in all my teacher's station.

If someone can help me !

Thanks !

Baptiste.


More information about the xorg mailing list