grml_wallpaper: support setting wallpaper background with xwallpaper
authorMichael Prokop <mika@grml.org>
Fri, 7 Oct 2022 13:15:13 +0000 (15:15 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 7 Oct 2022 13:15:13 +0000 (15:15 +0200)
The fbsetbg binary is available only via the fluxbox package.
We temporarily switched from fluxbox to openbox (as fluxbox wasn't
available in Debian/testing for quite some time), but then we don't
get our wallpaper set as expected. The smallest working tool we could
identify to set a wallpaper background seems to be xwallpaper. If
someone replaces fluxbox with something else, setting the wallpaper is
supported, as longs as xwallpaper is available.

Relatedto https://github.com/grml/grml-desktop/issues/5

etc/skel/.xinitrc.d/grml_wallpaper

index a776b3f..1317286 100755 (executable)
@@ -11,7 +11,14 @@ if [ "$XINIT_GRML_WALLPAPER" = "false" ] ; then
 fi
 
 # set wallpaper
-[ -x /usr/bin/fbsetbg ] && [ -r /usr/share/grml/desktop.jpg ] && \
+if ! [ -r /usr/share/grml/desktop.jpg ] ; then
+  exit 0
+fi
+
+if command -v xwallpaper >/dev/null 2>&1 ; then
+  xwallpaper --maximize /usr/share/grml/desktop.jpg &
+elif command -v fbsetbg >/dev/null 2>&1 ; then
   fbsetbg -A /usr/share/grml/desktop.jpg &
+fi
 
 ## END OF FILE #################################################################