# Switching displays between laptop and CRT

## Namor

I'm setting up my laptop with KDE 3.1 right now. I was wondering if there is a nice and easy way to set things up so I can easily switch between my laptop display/touchpad when at home and my CRT/mouse when at work?

I don't suppose there is any way for that to be auto-detected?

----------

## cyfred

Just have two mouse sections in /etc/X11/XF86Config one for each different type of mouse. 

In regards to the screens, you will need to have two different screens sections in XF86Config, provided this is supported by your video drivers. All I do is have a single screen and export it to both the VGA out port and the TFT the only draw back is that the laptop screen is used then, but if you have a working method of turning the TFT screen off then you're set.

----------

## BlackBart

note, newer laptops allow you to use two screens, the laptop and a crt. You might want to look into this.

----------

## green sun

Does the laptop have a key combination to switch between LCD & external monitor? Have you tried it? Is it a resolution issue between the LCD & monitor?

Just curious.. I've never tried...

----------

## Cyclone

I havn't actually tried to use the screen switching on my Toshiba 2415, but my impression is that you can get support for the key switching, it just takes some work (and REALLY depends on your laptop).  

Also, for my laptop, whenever my LCD screen totally shuts down, X has some serious display issues when it comes back up.

----------

## BlackBart

on most toshibas fn+f5 does the switching, I think it is a hardware thing, at least it is on the older computers.

----------

## byronm

I use a docking station and had this same problem, my monitor wouldn't work because it was using the laptops display.

I've basically created  rc script that looks my  my scsi port and if it sees it, it then copies XFree86.docked to XFree86 config.   SCSI port is on the docking station, so alot of times you can look for a 2nd nic card, external sound interface or something similar.

The Linux-Laptop-HOWTO i think has an example of this.

----------

## fruers

I have three config files to work with X on Dell C600. One for standalone laptop which supports two pointing devices and LCD display, one for docked at home with CRT display and usb mouse and one for docked at work with flat panel and ps2 mouse. I just symlink the required config to /etc/X11/XF86config with an alias command in .bashrc:

alias home='ln -sf /etc/X11/XF86Config.home /etc/X11/XF86Config'

alias laptop='ln -sf /etc/X11/XF86Config.laptop /etc/X11/XF86Config'

alias work='ln -sf /etc/X11/XF86Config.work /etc/X11/XF86Config'

Automatic activation based on byronm's method above looks like the best option.

----------

