You are viewing a read-only archive of the Blogs.Harvard network. Learn more.
Skip to content

How to play mplayer in the desktop fullscreen on Ubuntu

I was experimenting with trying to play videos in the desktop background so I can work on other things while passively watching videos that I really didn’t want to spend 100% of my concentration on. However when I tried to use mplayers -rootwin option under Ubuntu it did not show anything.

After doing some Googling around, it seems that the problem is tied with how rich desktop environments like KDE and Gnome manage the ‘desktop’. They normally override the traditional X11 root window with their own which means that sending output to rootwin won’t show anything.

However, luckily there are ways around this. One post on the mplayer list mentioned ways to disable background handling by GNOME and KDE. However I could not get this working under Gnome. After some more Googling around I found that Lifehacker had a hint on how to enable screensavers in the background. So using that information it was rather simple. The recipe for Ubuntu is:

# Tell GNOME to not handle the desktop
$ gconftool-2 –type bool –set /apps/nautilus/preferences/show_desktop false
# Play a video file in the rootwin as fullscreen
$ mplayer -rootwin -fs my_cool_video.avi

Be Sociable, Share!