From 73f7c2886fe5b905cd4e2c72643eb48460291f6a Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Tue, 31 Jul 2001 05:52:10 +0000 Subject: resync with 8.0-12mdk --- bin/DrakWM | 2 +- bin/createbackground.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ bin/print-cups.sh | 10 ++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 bin/createbackground.sh create mode 100644 bin/print-cups.sh (limited to 'bin') diff --git a/bin/DrakWM b/bin/DrakWM index 19934fd..2af7b18 100755 --- a/bin/DrakWM +++ b/bin/DrakWM @@ -79,7 +79,7 @@ if ( $options{p} and ! -x '/usr/X11R6/bin/xsetbg') { exit(1); } else { system("xsetbg", $options{p}) if $options{p}; } if ($options{x}) { - my $xterm = $ENV{XTERM} ? $ENV{XTERM} : "xvt -bg black -fg white"; + my $xterm = $ENV{XTERM} ? $ENV{XTERM} : "xterm -bg black -fg white"; system("$xterm &"); } diff --git a/bin/createbackground.sh b/bin/createbackground.sh new file mode 100644 index 0000000..a825ff2 --- /dev/null +++ b/bin/createbackground.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# (c) 2000 - MandrakeSoft - Frederic CROZAT + +if [ $# != 2 ] ; then + echo "Usage : $0 < extension for background> ]" + exit 1 +fi + +if [ -z $DISPLAY ] ; then + echo "Must be run in an X session" + exit 1 +fi + +backgroundhome=$1 +extension=$2 + +if [ ! -d $backgroundhome ] ; then + mkdir -p $backgroundhome +fi + +# Set backgrounds +width=$(/usr/X11R6/bin/xdpyinfo | grep dimensions | cut -c 18-26 | sed "s/x.*//") +vertype=$(cat /etc/sysconfig/system | grep META_CLASS | sed "s/META_CLASS=//" | tr A-Z a-z) + + +if [ -z "$vertype" ] || [ $vertype = "powerpack" ] ; then + backgroundtype=PP +elif [ $vertype = "desktop" ] ; then + backgroundtype=DKP +else backgroundtype=PP +fi + +if [ $width ] ; then + for num in 1 2 3 4 5 6 7 ; do + file=/usr/share/pixmaps/backgrounds/linux-mandrake/$backgroundtype$num-$width.$extension + if [ -s $file ] ; then + ln -sf $file $backgroundhome/linux-mandrake-background$num.$extension ; + else + echo "File $file does not exist or is not readable" + fi + done ; +fi diff --git a/bin/print-cups.sh b/bin/print-cups.sh new file mode 100644 index 0000000..230df13 --- /dev/null +++ b/bin/print-cups.sh @@ -0,0 +1,10 @@ +#!/bin/sh +if [ -x /usr/bin/qtcups ]; then + qtcups $* +else + if [ -x /usr/bin/xpp ]; then + xpp $* + else + lpr $* + fi +fi -- cgit v1.2.1