Wrong Login Screen Resolution
You can make a script for this (source LightDM Resolution).
- Firstly we need to find out what your monitors identifier is. Open up a terminal, start typing
terminal
in your unity dash to see the option or press Ctrl+Alt+T Type/copy this command to show your display details:
xrandr -q
If you only have one monitor you will see a line in the output like the following (probably with some different values, its the identifier at the start we are after):
DVI-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
The screen identifier is DVI-0 in this case
Open up your favourite text editor, lets use gedit for this example, press Alt+F2 and type
gedit
Type/copy this in:
#!/bin/sh xrandr --output DVI-0 --primary --mode 1440x900
Save this on your desktop as
lightdmxrandr.sh
You may want to test the script before we put it into practice. Back in the terminal navigate to where we just saved it:
cd ~/Desktop
Now we need to make it executable:
chmod a+rx lightdmxrandr.sh
Now run it:
./lightdmxrandr.sh
(If your screen automatically auto-corrects after log in you probably won't see a difference so you may want to use a test resolution that is different but you know works while testing)
Now lets move the little script we made:
sudo mv ~/Desktop/lightdmxrandr.sh /usr/share/.
If you don't use
sudo
you may get a permission error (I use this folder out of personal preference)We need to now run this in lightdm, navigate to the correct folder:
cd /etc/lightdm
Open up the lightdm conf file:
sudo gedit lightdm.conf
Now add the the instruction to run your script after the last line and save:
display-setup-script=/usr/share/lightdmxrandr.sh
Now reboot and that should set the correct resolution on your lightdm log in screen.
(these instructions might look long but they don't take long at all)
I found a very simple workaround that works perfectly for me running 13.04. (update: now 13.10) on a laptop with a 24" external screen that is not permanently connected.
I'll just copy from here
- log in
- use xrandr or the Displays control utility to configure your monitors how you'd like them to be configured in the login screen
- copy ~/.config/monitors.xml to /var/lib/lightdm/.config
Since I already had my monitors configured properly I just had to do step 3.
Some other answers given here worked for me but only in a specific scenario while running risk of an unusable system in other scenarios (LOW GRAPHICS MODE ERROR). For example with the external monitor permanently connected (accepted answer by @captain_G) or with always the same device connected to the output used for the external monitor (script by @Axlrod). It seems that @MarcoV's answer is the most generic solution, however it does still involve scripting rules.
You can instead of creating script, just add to file /etc/lightdm/lightdm.conf
a line like this:
display-setup-script=xrandr --output default --mode 1280x720
Before inserting make sure that command works, because with wrong command, lightdm will not start.