X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml-x;h=c36b04daaa29a32fa6a80a21715c599e91c8772c;hb=3256f1f7cbead262acc175f37e80bbcd8d4225c5;hp=a28a5fb283cbbdf3226ad117fee9231e2083fcfc;hpb=0b8b42c9650183d8043520731bab56edb40a94d4;p=grml-x.git diff --git a/grml-x b/grml-x index a28a5fb..c36b04d 100755 --- a/grml-x +++ b/grml-x @@ -6,13 +6,6 @@ # License: This file is licensed under the GPL v2. ################################################################################ -# 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 @@ -46,9 +39,16 @@ [ -n "$XINITRC" ] || XINITRC="$HOME/.xinitrc" # temporary files - HWINFO_TMP="/tmp/hwinfo.$$" - MONITORINFO="/tmp/monitorinfo.$$" - MOUSEINFO="/tmp/mouse.$$" + # notice: we need the unsafe option, otherwise users other than root + # can not write to HWINFO_TMP, but we don't want to run hwinfo as root + HWINFO_TMP="$(mktemp -u)" || exit 1 + MONITORINFO="$(mktemp)" || exit 1 + MOUSEINFO="$(mktemp)" || exit 1 + + if [ -z "$HWINFO_TMP" ] ; then + echo "Fatal: could not create temporary file. Exiting.">&2 + bailout 1 + fi if [ -r /etc/sysconfig/keyboard ] ; then source /etc/sysconfig/keyboard @@ -127,17 +127,16 @@ Usage: $PROGRAMNAME $PROGRAMNAME [-options] windowmanager Usage examples: - $PROGRAMNAME wmii $PROGRAMNAME fluxbox - $PROGRAMNAME openbox + $PROGRAMNAME fluxbox $PROGRAMNAME -force -nostart fluxbox $PROGRAMNAME -nosynaptics fluxbox $PROGRAMNAME -nosync fluxbox - $PROGRAMNAME -noddc wmii - $PROGRAMNAME -xinerama -composite wmii - $PROGRAMNAME -module radeon -mode 1024x768 -vsync 60 openbox - XINITRC=~/.xinitrc $PROGRAMNAME openbox - $PROGRAMNAME -display 8 openbox + $PROGRAMNAME -noddc fluxbox + $PROGRAMNAME -xinerama -composite fluxbox + $PROGRAMNAME -module radeon -mode 1024x768 -vsync 60 fluxbox + XINITRC=~/.xinitrc $PROGRAMNAME fluxbox + $PROGRAMNAME -display 8 fluxbox More information on grml-x can be found in the manual page: man grml-x @@ -681,7 +680,7 @@ 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. @@ -699,13 +698,14 @@ Section "ServerLayout" Screen 0 "Screen0" 0 0 # InputDevice "Keyboard0" "CoreKeyboard" # InputDevice "Generic Mouse" "CorePointer" + Option "AutoAddDevices" "off" # do not depend on running dbus/hal $MOUSE EndSection Section "ServerFlags" Option "AllowMouseOpenFail" "true" # allows the server to start up even if the mouse does not work Option "DontVTSwitch" "false" # allow switching between virtual terminal - # Option "DontZap" "true" # disable (server abort) + Option "DontZap" "false" # enable (server abort) # Option "DontZoom" "true" # disable / (resolution switching) EndSection @@ -852,7 +852,7 @@ EOX # writeit {{{ writeit() { - XCONFTMP="/tmp/xconfig.$$" + XCONFTMP="$(mktemp)" xconfig > $XCONFTMP # we do not want to have two CorePointers, deactivate one therefore if grep -Eq '^[[:space:]]+InputDevice[ ]+"USB Mouse"[ ]+"CorePointer"' $XCONFTMP ; then