Transparencies in Openbox with xcompmgr

Edit: Unfortunately, the images originally included in this post are gone, because of hosting problems in late 2009. My apologies.

Let’s start first with the acknowledgements. Everything you see here comes by way of the Arch and Gentoo wikis, without which my Linux experience would be much more shallow.

Next, the screenshots. This is Openbox 3.3.1, running on Ubuntu 6.10 with true transparency at native 1600×1200 resolution, with no performance loss.

The hardware is a 1Ghz Dell Inspiron 8000, with a 64Mb Nvidia Geforce4 440 Go and 512Mb of PC133. (As a side note: This equipment is all five years old at best, and the entire rig costs less than $350 to assemble for a mint-condition box. A desktop rig with the same stats is easily under $200 new.)

The transparency for each individual window is adjustable from completely translucent to fully opaque. I’m working on tying it to the key bindings, and I’ll jot them down here when I do. For now I use two menu commands that set transparency to 0.8 (which is what you see in the photos) and opaque with the transset command.

Menus and submenus are all shaded, and windows and menus fade in and out. There probably aren’t as many tweaks and twists as the Beryl project, and there’s no cube to spin, but I’m thrilled with this much.

I hadn’t heard of xcompmgr, probably because of the Beryl hubbub. Naturally I assumed, probably like so many folks, that the nifty eye candy was reserved for full desktop suites that could manage all the heavyweight window managers and their maddening interdependencies.

So you can imagine the thrill of doing (what seems like) a lot, without offending my passion for a minimalistic approach.

A few notes worth mentioning. I can’t seem to get conky to run alongside the transparency effects. The shading and transparencies are corrupted at the same intervals as the conky refresh rate.

That’s why you see the two dockapps running at the bottom of the screen — that’s wmforkplop and wmhdplop, which show processor strain and drive access — the most important stats for me. (Note the shadows on the dock, too.) I’ll get by without conky; I already don’t miss it.

Second, there’s obviously a hardware requirement with this. I don’t think I’ll be trying this on my little 300Mhz Pentium II with the Neomagic 256AV in it. (Edit: I was wrong.) I think it’s safe to say that if you can’t get some OpenGL screensavers to run on your rig, it’s probably not worth playing with this. (Edit: Also wrong.)

Third, I’m 99 percent sure you can’t do this without the native driver for your card. (Edit: Kind of wrong, but forgivable.) So all you FLOSS purists with your gNewSense 1.0.x installations … I’m with you in spirit, but not until this eye candy has released me.

ATI users, I can’t do much to help you except offer words of encouragement. The only machine I have with an ATI card in it is out on loan to my parents. 😉 Take a look in the Gentoo wiki for some ideas, though.

Altogether, this is an extremely cool trick for Openbox (and other *box users, no doubt). You’ll be seeing this stuff in plenty of screenshots to come.

One last tip of the hat to page 7 of the Arch Forum screenshot thread, for bringing it to my attention. And yes, you may criticize me as — yet again — late to the party. 🙄

8 thoughts on “Transparencies in Openbox with xcompmgr

  1. srlinuxx

    Try playing around with the “background” boolean for conky. It’s been a while, but seems to me like that setting helped me achieve use without corruption when using xcompmgr. “double_buffer” might be another to test.

    Reply
    1. Bob

      I can confirm the conky crash, but only when own_window is set to no. To get the same appearance as when own_window set to know, do:
      own_window yes
      own_window_class Conky
      own_window_type normal
      own_window_transparent yes
      own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

      Reply
  2. Richard Kut

    Hey, great article! I too like openbox on Edgy. Try using gkrellm instead of conky. You might like it. I use it with xcompmgr and I have no corruption whatsoever.

    Reply
  3. Richard Querin

    I’m running Openbox on Feisty with xcompmgr. Mainly I use xcompmgr for shadows only, but I have two problems with it:

    1. Only mplayer seems to play vids right when xcompmgr is running. Totem, VLC and others just give me audio and blackscreen for video.

    2. I have a small Conky display on the desktop. The xcompmgr shadowing makes it look funky unless the desktop background in the area of the conky display is black. I’ve never fooled with transparency though, so maybe I could get it to look a little better.

    I love the speed and customizability of Openbox. I’m not sure I could go back to Metacity or Compiz now. 😉

    Reply
  4. K.Mandla Post author

    I’m afraid I can’t answer for VLC or Totem; I only use Mplayer.

    As for conky, I didn’t have much luck getting it to mesh well with xcompmgr. conky wants to refresh every few seconds, and that’s not kosher for xcompmgr, which is kind of refreshing on the fly. Either way, the two never worked together for me.

    And welcome to Openbox! It’s the best window manager there is, if you ask me. 😀

    Reply
  5. Bryan

    The background option that makes conky play well is the ‘desktop’ window_type

    So this should do it for you:

    own_window true
    own_window_transparent true
    own_window_type desktop

    Reply
  6. Schneider

    Really, really cool. I was reading about and discovered you blog. I already use openbox, so it’s half the path 🙂

    Reply

Leave a comment