2

This is a summary of my attempts from how do I make this gif into a wallpaper from Ubuntu Forums:

I'm running Lubuntu 18.04.

After deciding that I want to use a video as my wallpaper, I got my window ID from xwininfo, then I created a video-wallpaper.desktop file and placed it inside /home/ardouronerous/.config/autostart/:

[Desktop Entry]
Version=1.1
Type=Application
Name=Video Wallpaper
Exec=mpv -loop-file=inf --osc=no --cursor-autohide=no --wid=<ID> /home/ardouronerous/Videos/video.mp4

It works on startup, but the downside to using this is that the value of the window ID changes, so I have to get the value of window ID from xwininfo and change wid= in my video-wallpaper.desktop every time it changes, it's inconvenient.

After getting my window ID from wmctrl -l this is my next attempt:

[Desktop Entry]
Version=1.1
Type=Application
Name=Video Wallpaper
Exec=bash -c "mpv -loop-file=inf --osc=no --cursor-autohide=no --wid=$(wmctrl -l|awk '/<ID>/ {print $1}') /home/ardouronerous/Videos/video.mp4"

This doesn't work on autostart, when I restart my PC, the video doesn't start, however, when I click on the video-wallpaper.desktop file or when the command in exec is executed in the Terminal, the video starts.

These are my other attempts, which all failed to get my desired results:

mpv -loop-file=inf --osc=no --cursor-autohide=no --geometry=100%:100% /home/ardouronerous/Videos/video.mp4

The problem with this one is that the titlebar is visible on top and the video is present on the taskbar.

mpv -loop-file=inf --osc=no --cursor-autohide=no --no-borders --geometry=100%:100% /home/ardouronerous/Videos/video.mp4

The problem here is the video becomes fullscreen, covering the taskbar.

  • 1
    Instead of specifying geometry the way you have in the last code, why not look at the Applications section of your ~/.config/openbox/lubuntu-rc.xml and see if you can have an Application rule that does what you want. The Applications section is pretty powerful and worth understanding. I don't use wallpapers and so won't be more helpful. – DK Bose Aug 12 at 1:47
  • I managed to make it run on startup with the following command: bash -c "sleep 5; mpv -loop-file=inf --osc=no --cursor-autohide=no --wid=$(wmctrl -l|awk '/<ID>/ {print $1}') /home/ardouronerous/Videos/video.mp4" – ardouronerous Aug 12 at 2:49
  • My guess is that when this command is ran at startup it does so before the X session is ready or it does so in a context where DISPLAY is not set. – Kristopher Ives Aug 12 at 3:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.