Saving monitor settings?
Is there a way to save my monitor settings? I have an external monitor at work, but each morning i have to plug it in, rearrange the windows from being side by side to being on top of each other. Can I just save this?
Long story short (that is: do what Nicolas Bernaerts suggests, but I spare you the details): monitors configuration is actually saved in ~/.config/monitors.xml
, but it's not applied at startup/login.
The steps to overcome this are:
Log in with the wrong monitors configuration.
Remove current monitor configuration:
cd .config
mv monitors.xml{,.bak}
Use the Displays application to arrange the monitors as you wish (I have one side monitor rotated counterclockwise).
Once you press Apply, a new monitors.xml
is created.
Now, download and make executable the script and the launcher that force the monitor configuration based on the newly created config file:
$ sudo wget -O /usr/local/sbin/update-monitor-position https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/ubuntugnome/update-monitor-position
$ sudo chmod +x /usr/local/sbin/update-monitor-position
$ sudo wget -O /usr/share/applications/update-monitor-position.desktop https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/ubuntugnome/update-monitor-position.desktop
$ sudo chmod +x /usr/share/applications/update-monitor-position.desktop
At this point, the monitors' configuration can be fixed by launching the update monitor position application.
If you want this to be automatic, simply add a startup application, with the following entries:
- Name:
Update Monitors Position
- Command:
update-monitor-position 5
- Comment:
Force monitors position 5 seconds after login
Configuration for all your monitors - hot-plugged or not - should be stored in $HOME/.config/monitors.xml
by the xrandr
plugin for gnome-settings-daemon
, which is what actually applies the configuration you make in the Monitors capplet.
Since it seems that this isn't working properly for everyone, there's clearly a bug somewhere. Urgh.