falconer pretty much nailed it but I'd like to point out a simplification.
You can put an
xrandr command directly in
/etc/lightdm/lightdm.conf as a system hook. You don't need to create a shell command to call a separate script containing a shell command (though of course you can if you see a reason to do so). Also, there's no mention of
man lightdm and I didn't have either this or
lightdm.conf on my system. So, although I'm sure it probably does work as suggested by Stephen, again, you don't need to do this.
So, if it doesn't exist already, something along the lines of the following in
sudo, obviously) should work just fine:
display-setup-script=xrandr --output DVI-1 --auto --rotate left
man xrandr for configuration options.
BTW: I could probably have got away with comments/edits here but I don't have the rep and I did want to add the sources for this information.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS