Video as desktop wallpaper.

Setting a video as your desktops wallpaper is super simple & totally awesome. All you need is 2 applications, along with a config file & script.

I’m doing this on Xubuntu 18.04.5, but it should work on any Linux distro….

1. To being install mpv.

sudo apt install mpv

2. Install xwinwrap.

wget https://launchpad.net/~varlesh-l/+archive/ubuntu/ubuntu-tools/+files/xwinwrap_0.3.2git20171223_amd64.deb && sudo dpkg -i xwinwrap_0.3.2git20171223_amd64.deb

If you are on a 32 bit system change url above to the following…. https://launchpad.net/~varlesh-l/+archive/ubuntu/ubuntu-tools/+files/xwinwrap_0.3.2git20171223_i386.deb

3. Create and edit your mpv.conf file.

mkdir ~/.config/mpv/ && nano ~/.config/mpv/mpv.conf

3.1 Copy & paste the following into you mpv.conf file and then save.

[wallpaper]
fullscreen=yes
title=mpv-wallpaper
geometry=100%x100%
border=no
no-window-dragging
x11-name=mpv-wallpaper
hwdec=vaapi
aid=no
loop-file=yes
idle=no
aid=no
background="#e5b680"

Change the background color at the bottom to whatever you like, or simply remove it if you are happy with black….

4. Create a new bash script using the code below.

#!/usr/bin/env bash
#set video as wallpaper using xwinwrap and mpv - change path to your video!!

xwinwrap -ni -fs -s -st -sp -b -nf -- mpv --profile wallpaper --wid WID /home/user/linktovideo/video.mp4

4.1 Make the script executable.

chmod u+x script.sh

5. Run the script & check out your new video wallpaper.

bash ./pathtovideowallpaper.sh &

You can set the script to launch in your autostart to save you from having to manually launch it on every startup.

Stopping the script and reverting back to your standard wallpaper.

Simple run the following command in a terminal to revert back to your standard wallpaper.

killall -9 xwinwrap

Randomize wallpaper.

In mpv.conf change loop-file=yes to no and then change /home/user/linktovideo/video.mp4 to –shuffle /home/user/linktofolder/ in the script.

Related posts

Lofi

Lofi video wallpaper.

A simple video wallpaper script written in bash using mpv & xwinwrap. Includes audio…. Download the script…. wget https://raw.githubusercontent.com/furycd001/dots/master/Gucci/lofi.sh Open…