2010-05-10, 17:24
I have a monitor and a projector, each with their own xorg.conf
I would like to be able to swap the xorg.confs and then restart gdm
In /etc/X11 I have two files xorg.conf and other.conf
I want to be able to
1- copy the current xorg.conf to temp.conf (overwriting if necessary)
2- copy the other.conf to xorg.conf (overwriting)
3- rename temp.conf to other.conf (overwriting)
4- restart gdm
My attempts at commands are:
cp /etc/X11/xorg.conf /etc/X11/temp.conf
cp /etc/X11/other.conf /etc/X11/xorg.conf
mv /etc/X11/temp.conf /etc/X11/other.conf
sudo /etc/init.d/gdm restart
Could a kind soul help me make this into some kind of script (i don't know if i've got the right word, basically i want a linux .bat)
The idea is to double click an icon on the desktop, or run a simple command to go from the current display (be it projector or monitor) to the other one.
Thanks for taking the time to read this.
I would like to be able to swap the xorg.confs and then restart gdm
In /etc/X11 I have two files xorg.conf and other.conf
I want to be able to
1- copy the current xorg.conf to temp.conf (overwriting if necessary)
2- copy the other.conf to xorg.conf (overwriting)
3- rename temp.conf to other.conf (overwriting)
4- restart gdm
My attempts at commands are:
cp /etc/X11/xorg.conf /etc/X11/temp.conf
cp /etc/X11/other.conf /etc/X11/xorg.conf
mv /etc/X11/temp.conf /etc/X11/other.conf
sudo /etc/init.d/gdm restart
Could a kind soul help me make this into some kind of script (i don't know if i've got the right word, basically i want a linux .bat)
The idea is to double click an icon on the desktop, or run a simple command to go from the current display (be it projector or monitor) to the other one.
Thanks for taking the time to read this.