Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I used this workaround to sort my resolution at the login screen when using multiple monitors with Lightdm.


XCOM0=`xrandr -q | grep 'VGA1 connected'`
XCOM1=`xrandr --output LVDS1 --primary --auto --output VGA1 --auto --right-of LVDS1`
XCOM2=`xrandr --output LVDS1 --primary --auto`
# if the external monitor is connected, then we tell XRANDR to set up an extended desktop
if [ -n "$XCOM0" ] || [ ! "$XCOM0" = "" ]; then echo $XCOM1
# if the external monitor is disconnected, then we tell XRANDR to output only to the laptop screen
else echo $XCOM2

exit 0;

Found Here: How to force Multiple Monitors correct resolutions for LightDM?

It works great.

However, now when I am on my login screen, the login box seems to jump to between the two displays. Any advice as to how I could make it stay on one display?


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.