Package: videogen
Version: 0.32-3
Severity: normal
Tags: patch
This script doesn't seem to be updated very frequently. There are a few
issues which are fixed in the attached patch:
* a reference to XF86Config(-4)
* it fails silently when dialog, whiptail, and gdialog aren't installed
* the DEF_MINSYNC variable is ignored
* the logic to check for MINSYNC out of range is wrong and incomplete
* spelling mistake (choosen)
* inconsistent command indentation
Not fixed here: Most recent LCD monitors support reduced blank modes
which can be generated with the cvt(1) command. They may be needed
instead of the modes produced by videogen to obtain good refresh rates
with high resolution modes on low end video cards. It would be nice
if it were also packaged and this script could call it too.
-- System Information:
Debian Release: 4.0
APT prefers oldstable
APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.27.28
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968)
(ignored: LC_ALL set to C)
Versions of packages videogen depends on:
ii bc 1.06-20 The GNU bc arbitrary precision cal
ii libc6 2.3.6.ds1-13etch9 GNU C Library: Shared libraries
videogen recommends no packages.
-- no debconf information
The patch:
--- /usr/bin/some_modes 2006-08-23 06:35:16.0 -0700
+++ some_modes 2009-09-09 16:47:00.0 -0700
@@ -1,7 +1,7 @@
#!/bin/bash
# +---+
# | |
-# | use this script to generate some mode lines automatically |
+# | Use this script to generate some mode lines automatically |
# | with videogen.|
# | |
# | (c) Szabolcs Rumi, 1997-2001 |
@@ -11,6 +11,7 @@
# you may change this to the location of the videogen program
VIDEOGEN=${VIDEOGEN=videogen} -f=/dev/null
+
# set this to the maximum dot clock your video card can generate [MHz]
DOTCLOCK=225
DEF_DOTCLOCK=$DOTCLOCK
@@ -27,34 +28,40 @@
MINSYNC=0.5
DEF_MINSYNC=0.5
+# set this to emit mode lines compatible with the non-free NVidia driver
NVIDIA=yes
-# load our settings
+
+# load your previous settings
if test -f ~/.videogenrc ; then
-. ~/.videogenrc
+ . ~/.videogenrc
fi
if test -z $DIALOG ; then
which dialog/dev/null DIALOG=dialog
which whiptail /dev/null DIALOG=whiptail
- which gdialog /dev/null DIALOG=gdialog
+ which gdialog /dev/null DIALOG=gdialog
+fi
+if test -z $DIALOG ; then
+ echo $0: no dialog program found, unable to continue 12
+ exit 1
fi
# The dialog part
-#DIALOG=${DIALOG=whiptail}
tempfile=`tempfile 2/dev/null` || tempfile=/tmp/test$$
trap rm -f $tempfile 0 1 2 5 15
$DIALOG \
- --title GENERAL WARNING --clear--yesno \
+ --title GENERAL WARNING --clear --yesno \
WARNING! WARNING! WARNING!
THE USE OF THIS PROGRAM CAN CAUSE PERMANENT DAMAGE TO YOUR MONITOR AND/OR
VIDEO CARD. IF YOU ARE NOT SURE WHAT YOU ARE DOING, HIT 'NO' NOW, OTHERWISE,
HIT 'YES' TO CONTINUE.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
SOFTWARE AUTHOR(s) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22
70 || exit 1
-
-$DIALOG --title HINTS --clear --msgbox \
+
+$DIALOG \
+ --title HINTS --clear --msgbox \
There are no perfect modelines for all monitors.
There are many monitors that can be damaged by using wrong and non-standard
modes, so better make sure that it will power-off if an invalid mode is tried.
@@ -63,55 +70,55 @@
$DIALOG \
--title INPUT BOX --clear \
---inputbox Please enter the maximum dot clock your video card can
generate [MHz]. (default: $DEF_DOTCLOCK) 10 51 $DOTCLOCK 2 $tempfile
+ --inputbox Please enter the maximum dot clock your video card can generate
[MHz]. (default: $DEF_DOTCLOCK) 10 51 $DOTCLOCK 2 $tempfile
retval=$?
case $retval in
0)
-read DOTCLOCK $tempfile ;;
+read DOTCLOCK $tempfile || exit 1;;
*)
exit 1;;
esac
$DIALOG \
--title INPUT BOX --clear \
---inputbox Please enter the maximum horizontal refresh rate of your
monitor [kHz]. (default: $DEF_HORIZ) 10 51 $HORIZ 2 $tempfile
+ --inputbox Please enter the maximum horizontal refresh rate of your monitor
[kHz]. (default: $DEF_HORIZ) 10 51 $HORIZ 2 $tempfile
retval=$?
case $retval in
0)
-read HORIZ $tempfile ;;
+read HORIZ $tempfile || exit 1;;
*)
exit 1;;
esac
$DIALOG \
--title INPUT BOX --clear \
-