I’ve been occasionally looking for something in Linux that would spruce up the place. Right now, my desktop is an minimalistic and functional solid black background. I’d like to do more with the space. Not just put up an image as a background - that’s straight from the late 80s.

The Mario desktop I would like to install on my Desktop is a perfect example of things that “just work” in Windows don’t seem to be possible in Linux. Until today, I didn’t know if there was a way to set my Ubuntu desktop with a HTML file with animation and graphics. In Windows, it’s a really simple operation… add the HTML location to your “Active Desktop,” place in on your desk where you’d like then lock down the widget.

For Linux there’s something far, far more powerful called xwinwrap. It allows you to run (most) any application as a desktop background. Really sweet, just check out some video:

Installation Instructions (on Hardy Heron Beta) - mind the possible wordwrap:
sudo apt-get install build-essential libx11-dev x11proto-xext-dev libxrender-dev libxext-dev cvs

cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps co xwinwrap

cd xwinwrap

make

sudo cp xwinwrap /usr/bin
This last line is optional, but puts the command in your path for easy access.

Now you can do some really funky stuff… like run the glmatrix screensaver as your desktop background:
nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- /usr/lib/xscreensaver/glmatrix -root -window-id WID

This is really cool, but what if you need to change settings for something else? Here’s the lowdown on what each command switch does - and there are a LOT of them. One wrong or missing switch will completely change the behavior of the program.

xwinwrap [-g] [-ni] [-argb] [-fs] [-s] [-st] [-sp] [-a] [-b] [-nf]
[-fl] [-o OPACITY] — COMMAND ARG1…

-g geometry
-ni no input
-argb argb ?? Alpha, Red, Green, Blue ??
-fs fullscreen
-s sticky
-st skip taskbar
-sp skip pager
-a above
-b below
-nf noFocus
-o opacity=# Between 0 and 1

Want to help me write articles and receive credit where it’s due? (Thanks Oli for the heads up on xwinwrap! - Check out his blog, while you’re at it.) Anyways, the point I was trying to make is to follow me on Twitter, answer my occasional random questions, and get kudos. Oh, and njpatel also pointed it out to me. Check out his blog too. :)

Please don’t drink and use xwinwrap. With great power, comes great responsibility. fsckin w/ linux is not liable for damages caused by shopping carts. this message was approved by justf**kinggoogleit.

Are you interested in FREE SUBSCRIPTIONS for qualified professionals to eWeek, PC Magazine, PC World, and many more? Click here!


33 Comments to “Fun With xwinwrap in Compiz Fusion”

  1. mrAshley | April 14th, 2008 at 7:34 pm

    My concern with compiling is that you can not easily remove the ‘make install’ed software, because who on earth knows where the files have been put in a month.

    (I realize this is only one file in this case, but do you have any hints on this topic?)

  2. mrAshley | April 14th, 2008 at 7:41 pm

    PS. You might want to add ‘cvs’ to that install list. :)

  3. bpd | April 14th, 2008 at 8:19 pm

    mrAshley: check out ‘checkinstall’

  4. Wayne | April 14th, 2008 at 10:30 pm

    mrAshley: Added.

    make checkinstall creates a .deb file that you can track installation of much easier than manually installed items.

  5. nerdd.net | news and opinion | April 15th, 2008 at 6:11 am

    Fun With xwinwrap in Compiz Fusion | nerdd.net…

    \r\nIve been occasionally looking for something in Linux that would spruce up the place. Right now,…

  6. Boycott Novell » Links 15/04/2008: Linux in Mission-Critical Environments; Top Sellers Include Linux | April 15th, 2008 at 6:47 am

    [...] Fun With xwinwrap in Compiz Fusion [...]

  7. Josh | April 15th, 2008 at 9:40 am

    In regards to the actual graphic; I made a static version by doing something very similar, but chose to separate the darkening sky from the background.. it makes a very powerful difference to go from ground, to sprites, to a large patch of smooth blue, to darkening sky, to clouds.

    Just putting that out there; love the animations though.. Been trying to figure out if I can use xwinwrap to play nes walkthroughs in an emulator with beefed up graphics

  8. Ian Fuller | April 16th, 2008 at 2:56 pm

    Sounds great, but I get “We’re sorry, this video is no longer available.” for the clip - any chance of an update?

  9. Wayne | April 16th, 2008 at 8:43 pm

    @Josh Good idea, I like it.

    @Ian Hmmmm… I can’t reproduce the youtube error. I did have that problem with another video… try the direct Youtube link:

    http://www.youtube.com/watch?v=3-_F6FvhByY

    Cheers

  10. Saman Sadeghi | April 17th, 2008 at 9:04 am

    Wayne,

    Thank you so much for this great tip! I’m still relitivly new to Linux and am having a little trouble getting the GLMatrix screen saver command. When I input that line into the terminal, I get this output:
    nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -o 0.20 -fs -s -sp -st -b -nf — /usr/lib/xscreensaver/glmatrix -root -window-id WIDnice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf — /usr/lib/xscreensaver/glmatrix -root -window-id WID
    Usage: xwinwrap [-g] [-ni] [-argb] [-fs] [-s] [-st] [-sp] [-a] [-b] [-nf]
    [-o OPACITY] — COMMAND ARG1…
    saman@ss-linux:~/xwinwrap$

    But my background does not change. I’m running Ubuntu 7.10, and have Compiz enabled.

    Any thoughts?

  11. Saman Sadeghi | April 17th, 2008 at 9:07 am

    Sorry, here’s the correct code:
    saman@ss-linux:~/xwinwrap$ nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf — /usr/lib/xscreensaver/glmatrix -root -window-id WID
    Usage: xwinwrap [-g] [-ni] [-argb] [-fs] [-s] [-st] [-sp] [-a] [-b] [-nf]
    [-o OPACITY] — COMMAND ARG1…
    saman@ss-linux:~/xwinwrap$</code<

  12. Vadim P. | April 17th, 2008 at 10:03 am

    For us lazy humans, getdeb.net will hopefully come out with a .deb for this.

  13. Shantanu Goel | April 17th, 2008 at 10:13 am

    but before using getdeb, be warned. I have had many occassions when deb’s from there have been said to have “satisfied all dependencies” on installing with GDebi but actually they haven’t. So, I now choose to compile most things myself.

  14. Vadim P. | April 17th, 2008 at 10:31 am

    Dunno, never ran into that problem and got a lot of updated / non-existent in repositories programs from them.

    Anyhow, I tested out their test .deb for this, and it works. I had the same error as the guy above - but I realized the problem is that the double-dashes got converted to a single long one.

    So where it says — /usr, change the single dash to be 2 dashes.

  15. Wayne | April 17th, 2008 at 2:09 pm

    Ok, I figured out how to get the double dashes in… sorry about that. :) Should be fixed now.

  16. Saman Sadeghi | April 17th, 2008 at 2:16 pm

    Vadim, That fixed it, now I can run it - though, the GLMatrix screen saver now runs “over” my desktop. When I move the mouse around, I can see elements but they get “covered up” when I move the mouse again. I have to rotate desktops in order to quit GLMatrix. This is the output in the Terminal:
    saman@ss-linux:~/xwinwrap$ nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- /usr/lib/xscreensaver/glmatrix -root -window-id WID
    DRM_I830_CMDBUFFER: -22
    /usr/lib/xscreensaver/glmatrix died, exit status 1
    saman@ss-linux:~/xwinwrap$

  17. Linux Blog Aggregator | April 17th, 2008 at 4:48 pm

    Your blog has been added to Linux Blog Aggregator @ http://blogs.linux.org.bd

  18. Vadim P. | April 19th, 2008 at 5:32 am

    http://getdeb.net/app/xwinwrap

    Just instead of doing “./xwinwrap” in the syntax wayne gave, do “xwinwrap”.

  19. Saman Sadeghi | April 19th, 2008 at 6:38 am

    Vadim,

    That didn’t work either:
    ~/xwinwrap$ nice -n 15 xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- /usr/lib/xscreensaver/glmatrix -root -window-id WID
    DRM_I830_CMDBUFFER: -22
    /usr/lib/xscreensaver/glmatrix died, exit status 1

    Thanks a lot, I really appreciate your help!

  20. Vadim P. | April 19th, 2008 at 8:13 am

    When you just do “/usr/lib/xscreensaver/glmatrix” in the terminal, does a window pop-up with the matrix?

  21. dg10050 | April 25th, 2008 at 6:00 pm

    So, uh, how did you get the Mario desktop as your desktop. You never seemed to mention what browser you used. :\

  22. Saman Sadeghi | April 28th, 2008 at 9:28 am

    Vadim,

    Thanks the help, I decided to go with this “Photoshop Geek” wallpaper, I though it fit me better.

  23. josh | April 28th, 2008 at 11:50 pm

    Hi, wayne, could you please tell us how to
    make the mario desktop you used as your desktop
    background? you never seemed to tell us, because
    that is such a cool desktop!

  24. Vadim P. | May 14th, 2008 at 6:34 am

    Interestingly enough the post here:

    http://digiwanderlust.blogspot.com/2008/05/matrix-on-your-hardy-desktop.html

    Shows how to setup the matrix a lot easier :)

  25. Chris Worley | May 22nd, 2008 at 3:21 am

    I have compiz setup with dual monitors. Specifically i have two outputs defined in General. how can i get winwrap on my second output?

    I used the command you gave in your example to run it, and it appears to show on the second output.

    -chris worley

  26. Michael | June 13th, 2008 at 9:39 am

    have compiz setup with dual monitors. Specifically i have two outputs defined in General. how can i get winwrap on my second output?

    I used the command you gave in your example to run it, and it appears to show on the second output.

    -chris worley

    Having problems with my second moniter not appearing

    should i change:
    xwinwrap -ni -argb -fs -s -st -sp -nf -b — //usr/lib/xscreensaver/glmatrix -window-id WID

    on example -id should i make it -1 or whatever number my second screen is?

  27. Egon | June 21st, 2008 at 2:24 am

    To get it working with checkinstall:
    add the following lines to Makefile:
    [code]install:
    cp xwinwrap /usr/bin/[/code]

    This will allow sudo make install and thus sudo checkinstall to do the hard work. I’m going to test xwinwrap out later, but this install works flawless.

  28. Razvan | July 21st, 2008 at 12:22 pm

    Great! I only have a couple of questions, though:

    The FIRST and most important: Who’s singing?
    The SECOND and rather important too: Can I make xwinwrap work on only ONE virtual Desktop not all of them?

    thanks

  29. Easybake | August 5th, 2008 at 9:21 pm

    i figured out how to use your webcam feed as your xwinwrap wallpaper.

    just use this code

    xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf — mplayer -wid WID -quiet -fps 15 tv://

  30. ændrük | August 20th, 2008 at 5:12 am

    When I used the command shown above, glmatrix is still drawn on top of everything. I’m using Compiz with the desktop cube.

    I’m trying: $ nice -n 15 xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf — /usr/lib/xscreensaver/glmatrix -root -window-id WID

  31. Shantz XWinWrap: The "Moving" Wallpaper Fun Continues | My Technophilic Musings | September 3rd, 2008 at 6:45 am

    [...] a loooong time ago that allowed you to stick most of the apps to your desktop background (Thanks to fsckin for introducing me to it). What this meant was you could use an animated screensaver (like [...]

  32. Shantanu Goel | September 3rd, 2008 at 7:28 am

    I found a few short comings with xwinwrap and also wanted a cpl of new features, so I have restarted its development here: http://tech.shantanugoel.com/projects/linux/shantz-xwinwrap
    Check it out and let me know ur comments and feature requests.

  33. Sheri Stone | November 12th, 2008 at 1:37 pm

    2wkbhjlyza5p4k6v

Leave a Comment