handle DISPLAY :x and :x.0 idem

Patch originally provided by Francesco Poli to Debian

BUG: 1052
This commit is contained in:
Thomas Lübking 2016-08-28 20:54:52 +02:00 committed by Mathias Gumz
parent 2cfffee19b
commit e8021e3697

View file

@ -47,6 +47,7 @@
wpsetters="${wpsetters:=Esetroot wmsetbg feh hsetroot chbg display qiv xv xsri xli xsetbg}" # broken icewmbg' wpsetters="${wpsetters:=Esetroot wmsetbg feh hsetroot chbg display qiv xv xsri xli xsetbg}" # broken icewmbg'
lastwallpaper="${HOME}/.fluxbox/lastwallpaper" lastwallpaper="${HOME}/.fluxbox/lastwallpaper"
DISPLAY=${DISPLAY%.0}
WHOAMI=`whoami` WHOAMI=`whoami`
[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin [ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
@ -167,7 +168,7 @@ message() {
} }
remembercommand() { remembercommand() {
grep -vs "|${DISPLAY}$" ${lastwallpaper} > ${lastwallpaper}.tmp grep -vs "|${DISPLAY}$\||${DISPLAY}\.0$" ${lastwallpaper} > ${lastwallpaper}.tmp
mv -f ${lastwallpaper}.tmp ${lastwallpaper} mv -f ${lastwallpaper}.tmp ${lastwallpaper}
if [ "$option" = fbsetroot ]; then if [ "$option" = fbsetroot ]; then
echo $option"|$wallpaper|$style|"$DISPLAY >> $lastwallpaper echo $option"|$wallpaper|$style|"$DISPLAY >> $lastwallpaper