Thread: Twinview?
View Single Post
Old 10-11-02, 12:01 PM   #2
Registered User
Join Date: Sep 2002
Posts: 2,262

If the documentation says it only works on MX cards (and the GF4 Ti's, obviously), then my first guess would be that it won't work. And seeing as it doesn't work when you try it, that just backs that feeling up.

For switching between them, you can create two config files. Name them something like XF86Config-4-TV and XF86Config-4-CRT, and put them in /etc/X11, just like XF86Config-4 is. The difference is, one will be displaying to the TV, and the other will display to your monitor.

Then create a script somewhere that looks like this (call it xstart or something):


if [ $# -lt 2 ] ; then
    echo "Usage: $0 { TV | CRT } [ other X parameters ]" 1>&2
    exit 1

if [ "$1" != "TV" -a "$1" != "CRT" ] ; then
    echo "Usage: $0 { TV | CRT } [ other X parameters ]" 1>&2
    exit 1

export XF86CONFIG="XF86Config-4-$1"


startx "$@"
Basically, it goes through some error checking first (the first two if statements), sets the XF86CONFIG shell variable to the correct filename, then runs "startx" with any other parameters you passed. When X is started, it looks for a config file according to a list (documented in the "XF86Config" man page) of predefined places. You can change the filename it looks for by changing this shell variable.

Also, the CRT or TV argument must be first. It would be possible to change it so that that could come later, but it's a whole bunch of work and I doubt it'd be worth it, personally. Check man 1 getopt if you want to try.

Just run xstart TV to start up with the display on your TV, and xstart CRT for the display to go to your CRT.

It would be possible to have a default setting as well, if you want. Let me know if this is the case, and I'll see if I can hack it into this script.
Registered Linux User #219692
bwkaz is offline   Reply With Quote