I'm writing a script that set ups multi-head configurations, it generates an xorg.conf file and runs an xrandr command to setup the displays.

This works fine until the computer reboots and logs back in, at some point the ~/.config/monitors.xml file overwrites my xorg.conf changes. I don't particularly want to write my own monitors.xml generator so I tried just deleting it before making my xorg.conf/xrandr changes, but, the monitors.xml file appears to be auto-generated on reboot, and my settings get overridden anyway.

If I launch 'Display Settings' and click 'Apply' and save the configuration that generates a monitors.xml file which is set up correctly, but it'd be a lot better if I could do that from a script. Is it possible?

  • The easy solution is to run a set of xrandr commands a few seconds after log in, setting up your configuration correctly. – Jacob Vlijm Feb 17 '17 at 5:49
  • That solution would probably work for the current devices but we're planning on doing some multi video card set ups as well where we won't be using xrandr and we'll need the monitors.xml file working then. It's not too bad to generate the monitors.xml file but it seems like there would be a way to do it from the terminal built in. – John Conder Feb 17 '17 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.