Live Linux Wallpaper

09-24-2021 Written by: otter-admin


This is a short, non security related how to. I saw some folks on r/unixporn showing off their live wallpapers and wanted to install my own. After struggling for a bit I finally got it to work. Here's how I did it. 

I have a ~/bin folder where I clone git repos, so if you have something like that head over there and clone this repo: https://github.com/ujjwal96/xwinwrap.git

Once that's done go through the regular motions of installing xwinwap.

cd xwinwrap

make sudo

make install

make clean

Also make sure you have "mpv" installed. If not you can install via pacman -S mpv

Once all that's done download your favorite .mp4 wallpaper and type this into your terminal:

xwinwrap -ov -ni -fs -- mpv -vo x11 -wid WID --keepaspect=no --loop

After --loop type your file path and name of live wallpaper. If you are interested here are the definitions of these options used. You can access these via xwinwrap -h.

-ov: Set override_redirect flag (For seamless desktop background integration in non-fullscreenmode)

-ni: Ignore Input

-fs: Full screen

-vo: Video output type

-wid: On X11, the ID is interpreted as a Window on X11.

Don't forget to set this command to run during startup. I did mine like this. 

Create a file called xwinwap.desktop with these contents:

[Desktop Entry]

Exec=xwinwrap -ov -ni -fs -- mpv -vo x11 -wid WID --keepaspect=no --loop ~/Downloads/mylivewallpapers.com-Futuristic-Game-Room.mp4

Icon=dialog-scripts

Name=xwinwrap

X-KDE-AutostartScript=true

Save this file into the path ~/.config/autostart/

That should be it. Enjoy the live wallpaper.


    -otter