How can I make xrandr changes persist?
I created the following file:
/etc/X11/Xsession.d/45custom_xrandr-settings
and placed this line into it:
xrandr --output DFP6 --primary
This had the effect of making the correct monitor the primary one, and it launches on login.
Since this is the fglrx
driver, you can use the aticonfig
command to generate an xorg.conf
file. From your xrandr
output I'm guessing the command you need is this:
sudo aticonfig --initial=dual-head --screen-layout=left
If this doesn't give you what you want, aticonfig
will automatically back up your xorg.conf
file (with a .fglrx-x
extension), so you can easily restore the original configuration.
If you don't have any luck with aticonfig
, there is a GUI tool configuring xorg.conf
called amdcccle
(should be in the fglrx-control
package).
Run it with a boot script.
Part 1:
Create a directory for scripts... this can be anything and anywhere, just remember the location if you deviate so you can substitute it in.
mkdir ~/Scripts
You can use any text editor you are comfortable using for the next part
gedit ~/Scripts/setoutput.sh
Add these to the script #!/usr/bin/env sh xrandr --auto
I use "xrandr -s 1440x900" Save/close the file. Finish up by running the following commands:
chmod +x ~/Scripts/setoutput.sh
sudo ln -s ~/Scripts/setoutput.sh /etc/X11/Xsession.d/45setoutput
reboot
"reboot" may need replaced with "shutdown -r now"
When the system boots, your settings should have run, making them now persistent as long as the script exists.
Thanks in part to "xenopeek" for their post on Tue Nov 01, 2011 7:02 am at Linuxmint which provided directions for doing this with "xrandr --output VGA-0 --primary". Same base concept/script even if the command changed slightly.