| 1 | #!/bin/bash |
1 | #!/bin/bash |
| 2 | # Copyright 1999-2004 Gentoo Technologies, Inc. |
2 | # Copyright 1999-2004 Gentoo Technologies, Inc. |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | # $Header: /var/cvsroot/gentoo/src/livecd-tools/x-setup,v 1.6 2005/02/03 15:22:36 wolf31o2 Exp $ |
4 | # $Header: /var/cvsroot/gentoo/src/livecd-tools/x-setup,v 1.7 2005/02/03 20:59:03 wolf31o2 Exp $ |
| 5 | |
5 | |
| 6 | # Check for an xorg.conf |
6 | # Check for an xorg.conf |
| 7 | if [ ! -e /etc/X11/xorg.conf ] |
7 | if [ ! -e /etc/X11/xorg.conf ] |
| 8 | then |
8 | then |
| 9 | echo "ERROR: /etc/X11/xorg.conf cannot be found! Exiting" |
9 | echo "ERROR: /etc/X11/xorg.conf cannot be found! Exiting" |
| … | |
… | |
| 63 | /usr/sbin/opengl-update-livecd $GLTYPE |
63 | /usr/sbin/opengl-update-livecd $GLTYPE |
| 64 | else |
64 | else |
| 65 | opengl-update $GLTYPE |
65 | opengl-update $GLTYPE |
| 66 | fi |
66 | fi |
| 67 | |
67 | |
| 68 | if [ ! -e /etc/sysconfig/mouse ] |
|
|
| 69 | then |
|
|
| 70 | echo "A mouse could not be detected; aborting." |
|
|
| 71 | echo "Please make sure a mouse is attached to your system." |
|
|
| 72 | exit 1 |
|
|
| 73 | fi |
|
|
| 74 | source /etc/sysconfig/mouse |
|
|
| 75 | |
|
|
| 76 | VERTREFRESH="\`ddcxinfo-knoppix -vsync\`" |
|
|
| 77 | if [ "$VERTREFRESH" = "0-0" ] |
|
|
| 78 | then |
|
|
| 79 | echo "No DDC information detected; assuming reasonable defaults." |
|
|
| 80 | VERTREFRESH=50-80 |
|
|
| 81 | HORIZSYNC=30-70 |
|
|
| 82 | else |
|
|
| 83 | HORIZSYNC="\`ddcxinfo-knoppix -hsync\`" |
|
|
| 84 | fi |
|
|
| 85 | |
|
|
| 86 | sed -i -e "s:##MOUSEPROTO##:${XMOUSETYPE}:" \ |
|
|
| 87 | -e "s:##MOUSEDEV##:${DEVICE}:" \ |
|
|
| 88 | -e "s:##VERTREFRESH##:${VERTREFRESH}:" \ |
|
|
| 89 | -e "s:##HORIZSYNC##:${HORIZSYNC}:" \ |
|
|
| 90 | -e "s:DefaultColorDepth 16:DefaultColorDepth 24:" \ |
|
|
| 91 | /etc/X11/xorg.conf |
|
|
| 92 | |
|
|
| 93 | #exec /usr/X11R6/bin/xinit |
68 | #exec /usr/bin/xinit |