You are not logged in.

#1 2009-04-08 16:42:57

normman
Member
Registered: 2009-04-07
Posts: 26

Specify xorg.conf

Hi,
   I have a laptop which I sometimes use with an external monitor using twinview, and other times I do not.  I have one xorg.conf that has my twinview settings, and one that has my normal settings.  When I do startx, is it possible to set which xorg.conf I want to use, depending on whether I want twinview or not? Or is there a much easier way of doing this?

Thanks.

Offline

#2 2009-04-08 17:21:41

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Specify xorg.conf

Hmmm - maybe something like this ...
Make a shell-script like the one below, name eg. 'mystartx' and invoke your xsession with:
bash $ mystartx twin  #twinview mode
or just
bash $ mystartx   # normal mode

#!/bin/sh
xorgfile=xorg.conf.normal
test $# -gt 0 && {
   case `echo $1 | tr '[A-Z]' '[a-z]'` in
      twin*) xorgfile=xorg.conf.twinview ;;
      norm*) ;;
      *) echo "usage: $0 [twin] >&2"
          exit 1 ;;
   esac
}
cp /etc/X11/$xorgfile /etc/X11/xorg.conf
startx

I might well be doing something wrong here - and I haven't tried it!
Proceed with caution ... ;-)


[edit]
On 2nd thought - you _can_ specify the '-f {xorg.conf}' to the server, so maybe this will do:

startx -- -f /etc/X11/xorg.conf.twinview

Last edited by perbh (2009-04-08 17:38:01)

Offline

#3 2009-04-08 17:27:42

normman
Member
Registered: 2009-04-07
Posts: 26

Re: Specify xorg.conf

Thanks.  I've been doing something similar where I aliased startx1 and startx2.  Startx1 copies a xorg.conf backup without twinview as xorg.conf, while startx2 copies a xorg.conf backup with twinview as xorg.conf and does startx.  I was hoping there would be a cleaner way to do it but I guess not?

Last edited by normman (2009-04-08 17:29:49)

Offline

#4 2009-04-08 17:31:19

palobo
Member
From: Leiria, Portugal
Registered: 2009-03-21
Posts: 68

Re: Specify xorg.conf

I have a similar problem and have started looking into it. I still don't have a dfinitive solution, but try and look into this


" If it aint broke... Then you're not trying hard enough! "

Offline

#5 2009-04-08 17:34:37

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Specify xorg.conf

*chuckles* I guess not - unless my2nd suggestion works, in which case you could use an alias - but in reality, it boils down to the same thing.

Offline

Board footer

Powered by FluxBB