Xorg: set provider source output in xorg.conf

multi-monitorx11xorgxrandr

I've configured quad screen with xrandr commands:

xrandr --setprovideroutputsource 1 0

xrandr --output DVI-0 --auto --right-of DVI-1
xrandr --output DVI-1-2 --auto --left-of DVI-1
xrandr --output DVI-1-3 --auto --left-of DVI-1-2

I would like those commands to be auto-applied on X start.
I've tried this xorg.conf:

Section "Monitor"
  Identifier "DVI-0"
  Option "Primary" "true"
EndSection

Section "Monitor"
  Identifier "DVI-1"
  Option "LeftOf" "DVI-0"
EndSection

Section "Monitor"
  Identifier "DVI-1-2"
  Option "LeftOf" "DVI-1"
EndSection

Section "Monitor"
  Identifier "DVI-1-3"
  Option "LeftOf" "DVI-1-2"
EndSection

But DVI-1-* are not initialized on Xorg start up, they appear only after I do xrandr --setprovideroutputsource 1 0.

How do I tell xorg.conf to do the same?

Best Answer

On a recent Debian system, put a shell fragment in /etc/X11/Xsession.d/10custom_initialise_xrandr. It will be executed as soon as you've logged in.

Related Question