Sunday, March 2nd, 2008

Openbox, xcompmgr, transset & Conky

I had some spare time yesterday and I decided to spend it playing with compositing under Openbox. I'm not normally too fussed about having eye-candy on the desktop; however, a few people have mentioned 3D effects, in IRC and on the forums, so I thought I'd have a go at configuring xcompmgr on one of my systems.

I was surprised to find that enabling compositing under Openbox was actually quite a straightforward affair, although due to some conflicts with Conky I did manage to explode my desktop on the first attempt.

Fixing Conky for use with xcompmgr

Conky can behave quite badly with xcompmgr, I know this because I've experienced the bad behaviour first-hand. Conky needs to be drawn in its own window, if it isn't it'll cause all manner of funky side effects, including making all your windows disappear completely. To fix this you'll need to edit your .conkyrc file and make sure it includes the following settings:

own_window yes
own_window_transparent yes
own_window_type desktop

Installing & starting xcompmgr

xcompmgr is a compositing manager for X, it enables basic eye-candy effects such as shadows, fading and translucency. It's available to install via the Ubuntu repositories, enter the following terminal command to install it:

sudo apt-get install xcompmgr

Once the xcompmgr is installed, it can either be run from the terminal, or the start command can be placed in Openbox's autostart.sh to start it automatically when you login. Full details of xcompmgr's options are available via the man page:

man xcompmgr

A popular command used to start xcompmgr with shadows is:

xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &

Or, to enable shadows and fading, start xcompmgr with:

xcompmgr -cCfF -t-5 -l-5 -r4.2 -o.55 -D6 &

Setting transparency with transset

Once xcompmgr is running, transparency of individual windows can be achieved by using the transset utility. transset is also available to install via the Ubuntu repositories, enter the following terminal command to install it:

sudo apt-get install transset

Run transset with the following command:

transset X

Where X is a value from 0 - 1. 0 being fully transparent and 1 being fully opaque. Once the command has been entered your mouse cursor should change to a crosshair, simply click on the target window to apply the transparency. For example, the following command will set the target window to 50% transparency.

transset .5

Screenshots of xcompmgr enabled desktop

Screenshot showing various applications, note the drop shadows and transparency:

Screenshot of Openbox with xcompmgr compositing manager enabled on CrunchBang Linux.

Screenshot showing a practical use of transparency, reading instructions from a web page whilst typing commands into the terminal:

Screenshot showing a practical use of transparency.

Regarding the eye-candy

I quite like it. I think the transparency has rather limited practical use, as do the drop shadows and fading;however, the effects do add a certain amount of je ne sais quoi to the desktop. Also, I haven't witnessed any noticeable slowdown of my system or any negative effects, as yet.


5 Responses to “Openbox, xcompmgr, transset & Conky”

  1. gouki wrote,

    Beautiful!

  2. Johan wrote,

    Awesome! I didn't know you could do that with openbox, my favorite lightweight option. Thanks for a great post. *Bookmarking

  3. fauno wrote,

    cool! i think i'll give it a chance, but i don't have an opengl video card…

  4. arp wrote,

    Hi,

    I really like transset but it's not so user-friendly :) So I search for more transparency features and I found a wiki with tips about transset-df and xbindkeys: they explain how to up/down transparency on each window using shortkeys or mouse.

    If interested: http://gentoo-wiki.com/TIP_Xorg_X11_and_Tranparency
    Here is what it looks like on my desktop:
    http://img169.imageshack.us/img169/9876/crunchbangtranssetxcompgv1.png

    Thanks,
    arp

  5. Philip wrote,

    Hi arp :) I have previously looked at transset-df, it is installed by default on 8.04.01. Thank you for the link and information, I may have to give it a try :)

    For a deb package of transset-df, see:
    http://crunchbang.org/wiki/CrunchBangLinuxRepositoryPackages804xx

Add Your Comment

Use the form below to add your comment. Markdown syntax is available. Note, comments are moderated by me for spam filtering. Alternatively, feel free to contact me privately.