Fun With xwinwrap in Compiz Fusion

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:[email protected]:/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.

  • mrAshley

    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?)

  • mrAshley

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

  • bpd

    mrAshley: check out ‘checkinstall’

  • http://www.fsckin.com/ Wayne

    mrAshley: Added.

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

  • Pingback: nerdd.net | news and opinion

  • Pingback: Boycott Novell » Links 15/04/2008: Linux in Mission-Critical Environments; Top Sellers Include Linux

  • Josh

    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

  • http://flashmonkey.servehttp.com/wordpress Ian Fuller

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

  • http://www.fsckin.com/ Wayne

    @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

  • http://samanathon.com Saman Sadeghi

    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?

  • http://samanathon.com Saman Sadeghi

    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<

  • Vadim P.

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

  • http://tech.shantanugoel.com Shantanu Goel

    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.

  • Vadim P.

    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.

  • http://www.fsckin.com/ Wayne

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

  • http://samanathon.com Saman Sadeghi

    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$

  • http://blogs.linux.org.bd Linux Blog Aggregator

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

  • Vadim P.

    http://getdeb.net/app/xwinwrap

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

  • http://samanathon.com Saman Sadeghi

    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!

  • Vadim P.

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

  • dg10050

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

  • http://samanathon.com Saman Sadeghi

    Vadim,

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

  • josh

    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!

  • Vadim P.

    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 :)

  • Chris Worley

    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

  • Michael

    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?

  • Egon

    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.

  • http://www.razvo.blogspot.com Razvan

    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

  • Easybake

    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://

  • http://aendruk.wordpress.com/ ændrük

    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

  • Pingback: Shantz XWinWrap: The "Moving" Wallpaper Fun Continues | My Technophilic Musings

  • http://tech.shantanugoel.com Shantanu Goel

    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.

  • Sheri Stone

    2wkbhjlyza5p4k6v

  • Isaac Mattox

    More fun with xwinwrap

    Want to see a cool effect? You can if you use compiz and xwinwrap together.
    try this…. download xsnow and CCSM if you dont already have them.

    Activate snow in CCSM then enable snow it by using key binding “super+f3″
    start a terminal session and input the following:

    xsnow
    cvs -d :pserver:[email protected]:/cvs/xapps co xwinwrap

    cd xwinwrap

    make

    sudo cp xwinwrap /usr/bin

    nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf — /usr/lib/xscreensaver/plasma -root -window-id WID

    Now you have snow that piles up, santa and trees, and Aurora Borealis

    HO HO HO …enjoy!!

  • Tam

    Where can I find cool looping videos to put on the background?

  • QWE QWE

    Right.. and I bet you’d claim that the colour scheme of your terminal makes it real usable? Good game. Tool.

  • Geoffrey Machamer

    How exactly did you set the Mario desktop as your background? I’ve been searching around for a few hours trying to find out how. I would heartily appreciate it if you would tell me the command you used. (I’d like to use the very same background!)

    Thanks for the vid!

  • khairun

    I got nice: ./xwinwrap: Permission denied

    What should I do?

  • Egon

    @khairun:
    chmod +x xwinwrap

    You get permission denied because apparently the execution bit hasn’t been set

  • khairun

    Ok, thanks Egon..
    I got it work now, but I wonder why the glmatrix running on top of the everything instead as background..

    Using Ubuntu 8.04 hardy heron, any help really appreciated.

  • khairun

    And also got this error messages on the console..
    X error in glmatrix:
    X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
    Major opcode of failed request: 128 (XFree86-DRI)
    Minor opcode of failed request: 9 ()
    Resource id in failed request: 0×4800001
    Serial number of failed request: 3440
    Current serial number in output stream: 3440
    /usr/lib/xscreensaver/glmatrix died, exit status 255
    XIO: fatal IO error 11 (Resource temporarily unavailable) on X server “:0.0″
    after 23 requests (20 known processed) with 0 events remaining.

    Would love to have this going on my screen properly :-)

    Cheers

  • Isaac Mattox

    If you are getting the permission denied message use the sudo command before the command itself and then enter your password when prompted

  • scott flynn

    The permission denied could also be that you need to actually be running the command from the xscreensaver directory in the first place. if you are running from your home directory it will give you the permission denied responce…
    thats my experiance speaking…

  • Geoffrey

    Whenever I use this, I get flickering, as if active windows are covered by the desktop and then pop back to the top again each time they are rendered. Does anyone have any idea why?

  • http://www.gispita.com gispita

    all my problem its this cos i don’t know how to set this option Usage: xwinwrap [-g] [-ni] [-argb] [-fs] [-s] [-st] [-sp] [-a] [-b] [-nf]
    [-o OPACITY] — COMMAND ARG1…
    gispita@gispita:~/xwinwrap$

    and if i use command nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf — /usr/lib/xscreensaver/glmatrix -root -window-id WID he work but after all not just like a desktop , and i cannot see Aplication , Places , System etc …….. how can explain me please how can i change this cos i try i think about 2 day …… Thank You .

  • zigga15

    Has anyone managed to get this working with dual monitors, my thread is below, please let me know if you have:

    http://ubuntuforums.org/showthread.php?t=1145018

  • Pingback: asennadas » Ollando video como fondo de escritorio

  • Pingback: 濿 -

  • http://CPUnltd.net CPUnltd

    I have gotten it to work with dual montiors, but not by default… I have to open the run box on the second monitor and execute the command to run whatever clip or screensaver I want… but I haven’t seen it do a single clip across multiple screens yet. I’m sure there is an easy script with X commands that can be created and put in autostart… just not sure what commands would be necessary. Note, my method had two separate xwinwraps on two individual monitors… not one large xwinwrap across both monitors.