I've been running SuSE for 12 years. So, when I got my standard issue Dell Latitude E64xx I installed OpenSuSE 11.4. It runs great except when it's time to plug or unplug it from the docking station in my office. Then it's a pain because of the display switching issues.
Ever switch to the laptop I've wished I could hotplug it into the Dell docking station and have the displays switch; either just to the monitor attached to the docking station or to a dual head configuration. Unfortunately, this is doesn't happen out of the box and since I've been so busy my lazy work around has been to reboot all the time. After living with this for months I finally decided to do something today.
After some research I discovered xrandr configuration utility that comes with X.Org. Using this utility and a little bash scripting I put together a script that lets me easily switch between different modes of operation: laptop only, dock monitor only, or dual head.
If I've been using the laptop in a meeting and return to my office I put the machine to sleep (suspend to RAM), seat it in the dock, and rouse it from it's sleep (resume). When it wakes up I'm presented with a log in screen on the laptop display. After logging in I run my script (tweakdisp) to switch to the desired mode (dual head or dock monitor).
If I've been using the laptop in the dock and I need to bring it to a meeting I switch to laptop only mode using my script and then put the machine to sleep (suspend to RAM). Then I remove the machine from the dock and go on my way.
In the future I may attempt to automate things with another script that will put the machine in laptop mode just before going to sleep and another one that execute when the machine is resumed to check if the machine is docked and put it into dual head mode.
For now this works for me.
I've attached the my tweakdisp script so you can see how I have things working. If you've got improvements please let me know by posting a comment.