Hi all,
My main day-to-day computer is a Thinkpad X200s running Kubuntu 9.04 very happily. Recently, I noticed I had a spare monitor kicking around in my office at work and so started plugging that in and running a dual-monitor set-up, using xrandr to place the second monitor next to the first. (And oh wow: the first time I spun a desktop cube across two monitors I practically had to go and change my trousers.) I also need to get dual-monitor setups working smoothly as I do quite a lot of public speaking, and so need to plug into projectors.
Anyway, here's the question. I have two little bash scripts - one for turning on the second monitor with xrandr and one for turning it off. I've learnt through trial-and-error that I need to have booted up the computer to at least the KDE login screen before plugging in the second monitor, as otherwise my laptop screen gets set to the wrong resolution. So everything is now great in terms of getting the second monitor on. But I think there must be a better series of actions for removing it at the end of the day. At the moment I'm doing this:
1. Move any windows from the second monitor to the first
2. Run the script to turn off the second monitor (xrandr --output VGA --off)
3. unplug the second monitor
However, when I turn the monitor off my laptop screen tends to do something a little strange: all the windows get resized vertically. For example, a firefox window might be set to the full height of the screen but then will be reset to only half the screen height after I run xrandr to turn off the second monitor. Sure, it's pretty trivial to resize the windows back to where they should be (except my Yakuake window, which gets shrunk vertically and can't be changed grrr), but this is the sort of thing that looks bad to potential Linux converts....
If it helps, the screen section of my xorg.conf is as follows:
and my laptop monitor is 1280x800 and the second monitor 1024x768. Does anyone have any thoughts how I can turn off the second monitor without messing up all the windows on my main monitor?
My main day-to-day computer is a Thinkpad X200s running Kubuntu 9.04 very happily. Recently, I noticed I had a spare monitor kicking around in my office at work and so started plugging that in and running a dual-monitor set-up, using xrandr to place the second monitor next to the first. (And oh wow: the first time I spun a desktop cube across two monitors I practically had to go and change my trousers.) I also need to get dual-monitor setups working smoothly as I do quite a lot of public speaking, and so need to plug into projectors.
Anyway, here's the question. I have two little bash scripts - one for turning on the second monitor with xrandr and one for turning it off. I've learnt through trial-and-error that I need to have booted up the computer to at least the KDE login screen before plugging in the second monitor, as otherwise my laptop screen gets set to the wrong resolution. So everything is now great in terms of getting the second monitor on. But I think there must be a better series of actions for removing it at the end of the day. At the moment I'm doing this:
1. Move any windows from the second monitor to the first
2. Run the script to turn off the second monitor (xrandr --output VGA --off)
3. unplug the second monitor
However, when I turn the monitor off my laptop screen tends to do something a little strange: all the windows get resized vertically. For example, a firefox window might be set to the full height of the screen but then will be reset to only half the screen height after I run xrandr to turn off the second monitor. Sure, it's pretty trivial to resize the windows back to where they should be (except my Yakuake window, which gets shrunk vertically and can't be changed grrr), but this is the sort of thing that looks bad to potential Linux converts....
If it helps, the screen section of my xorg.conf is as follows:
Code:
Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" SubSection "Display" Virtual 2800 1024 EndSubSection EndSection
Comment