xrandr is the easiest way to make a multiple display configuration work in Linux. Lightdm is my current display manager. This file explains how to make lightdm run an arbritrary script (in this case an xrandr script) on startup.
Here's the command we need:
#!/usr/bin/env bash
xrandr --output DVI-0 --mode 1920x1080 --left-of VGA-0
Obviously you can modify that to fit your specific setup. Any valid command works here.
sudo cat > /usr/share/multiple-monitors.sh << EOF
#!/usr/bin/env bash
xrandr --output DVI-0 --mode 1920x1080 --left-of VGA-0
EOF
sudo chmod +x /usr/share/multiple-monitors.sh
Open up /etc/lightdm/lightdm.conf
and change the following line from:
#display-setup-script =
To:
display-setup-script=/usr/share/multiple-monitors.sh
Restart everything as appropriate. Check in /var/log/lightdm/lightdm.log for errors.
One thing I had issues with was using a bash script to config xrandr for monitors that were connected. It failed no matter where I put it. Others have reported success with your method. However I found the culprit to be xfce reverting any settings I made with lightdm before login. I run xfce with Debian 8 on a vaio laptop, with HDMI as well as VGA monitors connected; usually leaving the laptop lcd closed in a dock while the HDMI and VGA running in extended mode . XFCE in particular has display configs in ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml. Those work great on xfce systems that keep the number of monitors static. If not what worked for me was either using the GUI Startup Applications settings menu and placing my script there or alternatively /etc/X11/Xsession.d/99dpconfig (dpconfig was a symlink to my script in /usr/local/bin and) However the secret sauce, for me at least was putting something along the lines of at the beginning.
until [ xrandr ]; do sleep 1 done