Ubuntu – Apply display settings to all user accounts

14.04displaygraphicslightdm

I spent some time getting my settings correct for multiple monitors, and that is working fine when I am logged in, but is not right at the login screen or for other users.

How do I set the display settings globally for all users and the login screen?

Best Answer

Depending on the way you've set up your system, it might be as easy as copying the monitors.xml file from the correctly set-up user to all users:

To test this for one user:

cp --preserve=timestamps /home/CorrectUser/.config/monitors.xml /home/TestUser/.config/

then log off TestUser if already logged in, log back on and see whether everything is correct.

The command for all users:

cp /home/CorrectUser/.config/monitors.xml /tmp/
for szUser in /home/* ; do sudo cp --preserve=timestamps /tmp/monitors.xml $szUser/.config/ ; done

The command for the login screen:

sudo cp --preserve=timestamps /home/CorrectUser/.config/monitors.xml /var/lib/lightdm/.config/

The command for all future users¹:

sudo mdkdir -p /etc/skel/.config
sudo cp --preserve=timestamps /home/CorrectUser/.config/monitors.xml /etc/skel/.config/

Note¹: All users you'll be creating in the future