i stole this from here : http://www.dotkam.com/2007/06/02/swi..._ubuntu_linux/
while in single monitor mode do:
Code:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.single
get into dual monitor mode by whatever means possible then do
Code:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.dual
write the 2 scripts
Code:
echo "#/bin/sh \
# restart gdm with single monitor support \
sudo cp /etc/X11/xorg.conf.single /etc/X11/xorg.conf; sudo /etc/init.d/gdm restart" > ./singledisplay
Code:
echo "#/bin/sh \
# restart gdm with dual monitor support \
sudo cp /etc/X11/xorg.conf.dual /etc/X11/xorg.conf; sudo /etc/init.d/gdm restart" > ./dualdisplay
move the 2 scripts so all you have to do it type the script name
Code:
sudo mv ./dualdisplay /usr/bin/dualdisplay
Code:
sudo mv ./singledisplay /usr/bin/singledisplay
make the both executable
Code:
sudo chmod +x /usr/bin/singledisplay
Code:
sudo chmod +x /usr/bin/dualdisplay
now all you have to do it open a terminal and type "sudo dualdisplay" or "sudo singledisplay" and everything should be automated.
Im sure there is a way to do this with one script instead of 2 and also a launcher but this should make your life a little easier - sorry i didnt have dual displays to test the thing
Bookmarks