How to use animated gif as wallpaper

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dlpr

How to use animated gif as wallpaper

Post by dlpr »

ello, and hapy new year.

For my little daughter (my life.com), I want to use and animated gif I created as wallparer. Is it possible ? If yes, how ?

Thanks a lot.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
merlwiz79
Level 8
Level 8
Posts: 2418
Joined: Wed Apr 04, 2007 1:50 pm
Location: Here again :)

Re: How to use animated gif as wallpaper

Post by merlwiz79 »

Download and install
removed/app/xwinwrap
apt install gifsicle
Open a text editor and paste this in it.

Code: Select all

#!/bin/sh
# Uses xwinwrap to display given animated .gif in the center of the screen

if [ $# -ne 1 ]; then
    echo 1>&2 Usage: $0 image.gif
    exit 1
fi

#get screen resolution
SCRH=`xrandr | awk '/current/ { print $8 }'`
SCRW=`xrandr | awk '/current/ { print $10 }'`
SCRW=${SCRW%\,}

#get gif resolution
IMGHW=`gifsicle --info $1 | awk '/logical/ { print $3 }'`
IMGH=${IMGHW%x*}
IMGW=${IMGHW#*x}

#calculate position
POSH=$((($SCRH/2)-($IMGH/2)))
POSW=$((($SCRW/2)-($IMGW/2)))

xwinwrap -g ${IMGHW}+${POSH}+${POSW} -ov -ni -s -nf -- gifview -w WID $1 -a

exit 0
Now save the file as gifbg.sh
Run this in terminal

Code: Select all

chmod +x gifbg.sh
Now run

Code: Select all

./gifbg.sh /path/to/animated.gif
Image
Locked

Return to “MATE”