[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: switching between xorg.conf files



On Wed, 15 Mar 2006 17:01:08 -0500
kamaraju kusumanchi <raju.mailinglists@gmail.com> wrote:

> Hi
>     I have two xorg.conf files. The first one is for laptop alone ( say 
> xorg1.conf) . The second is used when laptop is connected to a projector 
> (say xorg2.conf).
> 
> I usually use xorg1.conf . But when I have to connect to a projector, I do
> 
> sudo cp xorg2.conf /etc/X11/xorg.conf

to make your life easier, you might do something like this:

1. make two xorg.conf files... name them whatever you like, I'll use xorg1.conf & xorg2.conf

2. use a symlink to whichever you want to use: ln -s /etc/X11/xorg1.conf /etc/X11/xorg.conf

3. write a really simple shell script to switch where the link points.

#! /bin/bash

if (ls /etc/X11/xorg.conf -l | grep xorg1); then
rm -f /etc/X11/xorg.conf;
ln -s /etc/X11/xorg2.conf /etc/X11/xorg.conf;
else
rm -f /etc/X11/xorg.conf;
ln -s /etc/X11/xorg1.conf /etc/X11/xorg.conf;
fi

call it something like switchmon or somesuch and chmod +x it.

then switching monitor output is easy, and it'll automatically switch from whichever is active to the other one. you can also put a startx at end i suppose too. I used this when I was configuring my mythtv system and was switching back and forth from a monitor to the tv-out trying to get the configuration right. made it nice and easy.

others have addressed, hopefully your other issues. 

A

Attachment: pgpirhicd46uL.pgp
Description: PGP signature


Reply to: