From e8021e36974bb81720d4d5658a69e2d9711d702c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 28 Aug 2016 20:54:52 +0200 Subject: handle DISPLAY :x and :x.0 idem Patch originally provided by Francesco Poli to Debian BUG: 1052 --- util/fbsetbg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/fbsetbg b/util/fbsetbg index fb6f3af..1b3e1d9 100644 --- a/util/fbsetbg +++ b/util/fbsetbg @@ -47,6 +47,7 @@ wpsetters="${wpsetters:=Esetroot wmsetbg feh hsetroot chbg display qiv xv xsri xli xsetbg}" # broken icewmbg' lastwallpaper="${HOME}/.fluxbox/lastwallpaper" +DISPLAY=${DISPLAY%.0} WHOAMI=`whoami` [ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin @@ -167,7 +168,7 @@ message() { } remembercommand() { - grep -vs "|${DISPLAY}$" ${lastwallpaper} > ${lastwallpaper}.tmp + grep -vs "|${DISPLAY}$\||${DISPLAY}\.0$" ${lastwallpaper} > ${lastwallpaper}.tmp mv -f ${lastwallpaper}.tmp ${lastwallpaper} if [ "$option" = fbsetroot ]; then echo $option"|$wallpaper|$style|"$DISPLAY >> $lastwallpaper -- cgit v0.11.2