Thanks so much, both of you, and yes, the discussion on parameter expansion and substring is very useful.
Here's what I ended up with:
in /etc/lightdm/lightdm.conf.d I have a file simply named "my.conf" which has the following:
Code:
[SeatDefaults]
greeter-setup-script=/etc/lightdm/lightdmxrandr.sh
This executes when the lightdm (or other) greeter starts, and after X started.
One directory up from than, in /etc/lightdm, I have the script named lightdmxrandr.sh:
Code:
#!/bin/sh
set $(xrandr -q|grep "*")
case $1 in
1600x1200) xrandr -o left ;;
*) ;;
esac
So, when the laptop boots up, xrandr -q knows which resolution it is running with (Connected to external monitor = 1600x1200, not connected = 1920x1080). My external monitor is rotated vertically, so lightdm knows whether or not to rotate itself left, thanks to this script.
Tested, works beautifully. if you see anything in my bash code that is wrong, I'd appreciate the feedback (I'm more of an OO programmer -- java, PowerBuilder -- and SQL programmer, I have a lot to learn about bash scripting).
Either way, thanks so much both of you!