I've purchased a USB driven external display for my laptop. I've gotten it working by adding a xorg.conf file, however when the usb monitor isn't plugged in I want the xorg.conf to disappear so that xrandr works normally. I use my laptop on its own, with the usb display, and docked to dual external displays.
I figure I just need to find a good way to move the xorg.conf back and forth based on detecting the usb display. Since it seems to come up sa /dev/fb0 and /dev/fb1 I figured I could get lightdm to check in it's init.d script perhaps? That seems a bit unmaintainable though as upgrades/etc happen.
Is there a better way to manage this? Since it's displaylink it can't be hot swapped, the monitor has to be plugged in and ready at boot. So I need something before lightdm gets going I think to set this up.
Thanks for any tips and ideas.
edit: Bonus points for something that "undoes" itself on shutdown automatically so I don't have to worry about the xorg.conf being there on the next boot.