Categories
Linux Video

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

49 replies on “Fun With xwinwrap in Compiz Fusion”

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

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

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?

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<

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.

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.

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$

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!

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!

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

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?

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.

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

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

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

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:anoncvs@cvs.freedesktop.org:/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!!

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!

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.

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: 0x4800001
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

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

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…

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?

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 .

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.

Leave a Reply

Your email address will not be published. Required fields are marked *