Want to play a video or animated GIF as desktop background? Here’s how to do the trick in Ubuntu or Debian Linux while having low CPU usage.
NOTE: This tutorial is tested and works in Ubuntu 20.04 and Debian 11 GNOME with Xorg. It works on Wayland (defaults in Ubuntu 21.10+) but will use more CPU resource. So, it’s better to switch back Xorg session for better performance.
Step 1: Install GPU video wallpaper:
There are a few open-source apps for Linux desktop to enable animated wallpaper. Though, it’s mostly too heavy for this simple functionality.
GPU Video Wallpaper is a new open-source project to the this job while taking less system resources. As its name indicates, it uses GPU for rending the video playback. The app features:
- Multiple monitor support.
- GPU hardware acceleration (low CPU usage)
- For Ubuntu & DebianLinux.
- Runs on Xorg session (works in Ubuntu 20.04 Wayland in my case but lacks hardware acceleration).
1. Firstly, open terminal either by pressing Ctrl+Alt+T on keyboard or by searching ‘terminal’ from start menu. When it opens, run command to grab the source:
git clone https://github.com/ghostlexly/gpu-video-wallpaper.git
Install 'git' via sudo apt install git
if you don't have it.
2. After downloaded the source, navigate to that folder and run the installer script:
cd gpu-video* && ./install.sh
The command will start downloading and installing the following dependency packages (will ask for password authentication):
- xwinwrap – to stick video player as background.
- mpv – for video playback.
- Other dependencies: python3-pyqt5, xrandr, pcregrep.
Step 2: Set a Video as Wallpaper:
After installing the tool, run the command below in terminal to set a video wallaper:
gpu-video-wallpaper /PATH/TO/Video-File
TIP: Drag video file into terminal will input the PATH automatically.
For example, set ‘BernardBear.mp4’ file under user Videos folder as wallpaper, use command:
gpu-video-wallpaper ~/Videos/BernardBear.mp4
To set the video wallpaper that runs automatically on startup, use command:
gpu-video-wallpaper --startup ~/Videos/BernardBear.mp4
And, to stop the animated wallpaper at any time using command:
gpu-video-wallpaper --stop
That’s all. Enjoy!
Recent Comments