6

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.

Rick
  • 3,727

1 Answers1

3

Have you considered writing an init script that will check for those fb devices and copy the xorg.conf into place if they exist, then remove it when it shuts down? You could add it to the boot order before X or lightdm actually starts up but after the DisplayLink adapter has been detected and the device created. An init script is pretty simple, so that should solve your problem.

deej
  • 401