--- /usr/X11R6/lib/X11/susewm/bin/susewmif.orig	2003-03-18 12:46:04.000000000 +1200
+++ /usr/X11R6/lib/X11/susewm/bin/susewmif	2003-05-03 14:29:17.000000000 +1200
@@ -8,9 +8,34 @@
 # subscripts of this script are found in ../startcmd
 #
 
+## Volker's changes fix these problems:
+# *) Only the first 5 arguments would be passed on
+# *) Arguments to xterm are defined through config variables
+# *) The size of the tiny window asking for the root password is increased
+#    such that it fits both shell prompts containing user@host and SuSE's
+#    greeting string
+# *) Use of the same options to xterm is more consistent
+# *) For root xterms there is a scrollbar
+# 19 Jan, 17 Mar 2003, SuSE 8.1
+# 03 May 03, SuSE 8.2
+
 export START_DIR=/usr/X11R6/lib/X11/susewm/startcmd
 
+## xterm args
+termargs="-vb +sb"  # SuSE 8.1
+termargs="+vb +sb -sl 1000"  # Volker (visual bell turns off audible bell, want
+    	    	    	     # audible, and more scroll history)
+termargsshell="-sb" 	     # for shells, have scrollbar
+# The user may have changed the foreground and background colours for xterm
+# in ~/.Xresources. If we set the background colour explicitly here, we must
+# also do so for the foreground colour.
+termargs2="-bg LightGoldenRod -fg black -fn 9x15"
+# tiny size must be big enough to hold user's larger shell prompt
+# + SuSE's greeting!!!
+termsizetiny="-geometry 60x3"
+
 CMD=$1
+shift
 case "$CMD" in
 
 	#
@@ -18,13 +43,13 @@
 	#
 	background|editrc|howto|xlock|xmessages|zview) 
 		shift 1
-		exec ${START_DIR}/$CMD "$@"
+		exec ${START_DIR}/$CMD "$CMD" "$@"
 	;;
 
 	#
 	# multiple argument, no shifting
 	#
-	run|sdb|tartan|xray)  exec ${START_DIR}/$CMD "$@";;
+	run|sdb|tartan|xray)  exec ${START_DIR}/$CMD "$CMD" "$@";;
 
 	#
 	# check functions
@@ -34,7 +59,7 @@
 	#
 	# start functions
 	#
-	kernel|netscape)      shift; exec ${START_DIR}/$CMD start "$@";;
+	kernel|netscape)      shift; exec ${START_DIR}/$CMD start "$CMD" "$@";;
 
 	#
 	# others
@@ -45,42 +70,42 @@
 	kill)                 exec killall -9 tail;;
 
 	xpdf)       test -x /usr/X11R6/bin/freetemp && freetemp
-		        xterm -fn 9x15 -geometry 40x3 \
+		        xterm $termargs $termargs2 $termsizetiny \
                           -T "xpdf-starter" -name "xpdf-starter" \
                           -e ${START_DIR}/xpdf;;
 
-	xcdroast)   xterm -bg LightGoldenRod -fn 9x15 -geometry 30x2 \
+	xcdroast)   xterm $termargs $termargs2 $termsizetiny \
                           -T "xcdroast-starter" -name "xcdroast-starter" \
                           -e ${START_DIR}/xcdroast;;
        yast)
            case "$LANG" in
                [Kk]o*)
                    exec /usr/X11R6/bin/hanterm -geometry 80x25 \
-                         -vb +sb -T YaST -n YaST \
+                         $termargs -T YaST -n YaST \
                          -e su - -c yast;;
                [Jj]a*)
                    exec /usr/X11R6/bin/kterm -geometry 80x25 \
-                         -vb +sb -T YaST -n YaST \
+                         $termargs -T YaST -n YaST \
                          -e su - -c yast;;
                *)
-                   exec xterm -bg LightGoldenRod -fn 9x15 -geometry 80x25 \
-                           -wf -vb +sb -T YaST -n YaST \
+                   exec xterm $termargs $termargs2 -geometry 80x25 \
+                           -wf -T YaST -n YaST \
                            -e su - -c "env TERM=xterm yast";;
            esac
             ;;
 
-	ROOT_TERM)  exec xterm -bg LightGoldenRod -fn 9x15 -geometry 80x25 \
-                          -wf -vb +sb -T "root permission" \
-                          -e su - -c "$2 $3 $4 $5 $6";;
-
-	ROOT_X11)   exec xterm -bg LightGoldenRod -fn 9x15 -geometry 30x2 \
-                          -vb +sb -T "root permission" \
-                          -e sux -c "/usr/bin/env LANG=${LANG} $2 $3 $4 $5 $6";;
-
-	ROOT_SHELL) exec xterm -bg LightGoldenRod -fn 9x15 -geometry 80x25 \
-                          -vb +sb -T "root permission" \
-                          -e sux -c "/usr/bin/env LANG=${LANG} $2 $3 $4 $5 $6";;
+	ROOT_TERM)  exec xterm $termargs $termargsshell $termargs2 \
+	    	    	  -geometry 80x25 -wf -T "root permission" \
+                          -e su - -c "$@";;
+
+	ROOT_X11)   exec xterm $termargs $termargsshell $termargs2 \
+	    	    	  $termsizetiny -T "root permission" \
+                          -e sux -c "/usr/bin/env LANG=${LANG} $*";;
+
+	ROOT_SHELL) exec xterm $termargs $termargsshell $termargs2 \
+	    	    	  -geometry 80x25 -T "root permission" \
+                          -e sux -c "/usr/bin/env LANG=${LANG} $*";;
 
-	*)	echo "susewmif: wrong argument '$1'!"
+	*)	echo "susewmif: wrong argument '$CMD'!"
 		exit 1;;
 esac

