X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-x;h=89c483eee079c0635a773f2397d851168f6d4a3a;hb=b1fc8f8aa9be5787e94fb83c3320979bacc01cb4;hp=3b2e24523d42c1aaf96eb2a637d538beca71d13b;hpb=1564d14d910e73a404b25948867d0e8dfce988e0;p=grml-x.git diff --git a/grml-x b/grml-x index 3b2e245..89c483e 100755 --- a/grml-x +++ b/grml-x @@ -4,9 +4,16 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Jul 12 01:20:47 CEST 2007 [mika] +# Latest change: Die Sep 04 01:44:19 CEST 2007 [mika] ################################################################################ +# make sure /tmp is writeable {{{ + if ! [ -w /tmp ] ; then + echo 'Fatal: /tmp is not writeable. Can not resume therefore, sorry.' >&2 + exit 1 + fi +# }}} + # debugging {{{ # usage: DEBUG=1 grml-x ..... 2>/tmp/grml-x-debug.log if [[ $DEBUG -gt 0 ]]; then @@ -120,17 +127,18 @@ usage() Usage: $PROGRAMNAME $PROGRAMNAME [-options] windowmanager -Examples: +Usage examples: $PROGRAMNAME wmii - $PROGRAMNAME pekwm $PROGRAMNAME fluxbox + $PROGRAMNAME openbox $PROGRAMNAME -force -nostart fluxbox $PROGRAMNAME -nosynaptics fluxbox $PROGRAMNAME -nosync fluxbox $PROGRAMNAME -noddc wmii - $PROGRAMNAME -module radeon -mode 1024x768 -vsync 60 wmi - XINITRC=~/.xinitrc $PROGRAMNAME ion - $PROGRAMNAME -display 8 wmii + $PROGRAMNAME -xinerama -composite wmii + $PROGRAMNAME -module radeon -mode 1024x768 -vsync 60 openbox + XINITRC=~/.xinitrc $PROGRAMNAME openbox + $PROGRAMNAME -display 8 openbox More information on grml-x can be found in the manual page: man grml-x @@ -219,12 +227,20 @@ Just press Ctrl-C to cancel operation. # now calculate Virtual size for use with Xinerama HORIZ_RES1="$(grep 'Max. Resolution:' $MONITORINFO | sed 's/ Max\. Resolution: \(.*\)x\(.*\)/\1/')" VERIZ_RES1="$(grep 'Max. Resolution:' $MONITORINFO | sed 's/ Max\. Resolution: \(.*\)x\(.*\)/\2/')" + # it might happen that we don't have a Max Resolution in hwinfo output :-/ + # fall back to a generic value then... + # TODO: check out how to get resolution of external monitor from console + if [ -z "$HORIZ_RES1" ] ; then + HORIZ_RES1="1024" + VERIZ_RES1="768" + fi - HORIZ_RES2="$(echo $FRAMEBUFFER | sed 's/ Mode 0x.*: \(.*\)x.*/\1/')" - VERIZ_RES2="$(echo $FRAMEBUFFER | sed 's/ Mode 0x.*x\(.*\) (.*/\1/')" + # get maximum of output + HORIZ_RES2="$(echo $FRAMEBUFFER | grep 'Mode 0x' | sed 's/ Mode 0x.*: \(.*\)x.*/\1/'| sort -u | head -1)" + VERIZ_RES2="$(echo $FRAMEBUFFER | grep 'Mode 0x' | sed 's/ Mode 0x.*x\(.*\) (.*/\1/' | sort -u | head -1)" - if [ -n "$HORIZ_RES1" -a -n "$VERIZ_RES1" -a -n "$HORIZ_RES2" ] ; then - if [ $(echo $VERIZ_RES1 - $VERIZ_RES2 | bc -l) -eq 0 ] ; then + if [ -n "$HORIZ_RES1" -a -n "$VERIZ_RES1" -a -n "$HORIZ_RES2" -a -n "$VERIZ_RES2" ] ; then + if [ "$(echo $VERIZ_RES1" - "$VERIZ_RES2 | bc -l)" -eq 0 ] ; then VERIZ_RESULT="$VERIZ_RES1" elif [ "$VERIZ_RES1" -gt "$VERIZ_RES2" ] ; then VERIZ_RESULT="$VERIZ_RES1" @@ -634,7 +650,7 @@ requirements() { if ! [ -x $(which hwinfo) ] ; then print "$bg[black]$fg[red]${bold_color}Error: hwinfo not found in path.${reset_color} -Note: run 'apt-get install hwinfo' on systems running debian. +Note: run 'aptitude install hwinfo' on systems running debian. Exiting.${reset_color}" exit -1 fi @@ -664,10 +680,14 @@ cat << EOX # /usr/share/doc/xserver-xorg/ and # http://wiki.x.org/wiki/Home and # http://ftp.x.org/pub/X11R7.0/doc/html/index.html for information on Xorg +# # Refer to the xorg.conf man page and to # http://ftp.x.org/pub/X11R7.0/doc/html/xorg.conf.5.html # for details about the format of this file. # +# See http://wiki.debian.org/XStrikeForce/FAQ for information +# regarding Xorg packages within Debian. +# # If you would like this file to be automatically reconfigured by debian, # run the following command: # sudo dpkg-reconfigure -phigh xserver-xorg @@ -912,8 +932,8 @@ Please exit screen and try to run $PROGRAMNAME again." get-edid | parse-edid Do you want to go the debian way of life? Run: - apt-get install x-window-system-core read-edid mdetect hwinfo xdebconfigurator - dpkg-reconfigure x-window-system-core (or xserver-xorg depending on your system) + aptitude install xorg read-edid mdetect hwinfo xdebconfigurator + dpkg-reconfigure -phigh xserver-xorg Problems with the module used for X? Try to load another one or fall back to module vesa: