Monday, August 27, 2007

Howto: Completely Transparent Shell on your Ubuntu desktop with Compiz Fusion

I will show how to create a conky'esque transparent shell using only gnome-terminal and Compiz-fusion. Check out the attached screenshots.



First create a new profile in gnome-terminal (Edit->Profiles->New), name it "trans". Set the following characteristics:

Cursor blinks: off
Show menubar: off
Initial title: trans
Dynamically-set title: Isn't displayed
Color scheme: Black on white
Transparent Background: on
Set the transparency down to "None"

The important part here is that now the gnome-terminal is gonna have the title trans. We can now target the gnome-terminal windows that are using trans profile from inside CompizConfig by using "title=trans".

Open CompizConfig (System->Preferences->CompizConfig). Make sure you have the regEx plugin enabled.

Go to the Window Decoration plugin and add "!title=trans" to the Decoration windows field. This will skip adding window borders to our trans terminals.
Go to the Window Rules plugin. Add "title=trans" to the following fields (This will turn the terminals into a widget-like windows):
  • Skip taskbar, Skip pager, Below, Sticky, Non resizable windows, Non minimizable windows, Non maximizable windows, Non closable windows
In the Fixed Size Windows section click add. Use "title=trans" for the the Sized Window field and put the height and width you want for your shells.

Go to the Place Windows plugin, go to the Windows with fixed positions tab, in Windows with fixed positions click add. Put "title=trans" in Positioned Windows field and put x and y coordinates of the default position you want for your shell (top-left corner is 0,0). After they have loaded you can move them by Alt-Dragging them.

To run the transparent gnome-terminal use:
Code:

gnome-terminal --window-with-profile=trans
Edit:
dock: avant-window-navigator
widgets: conky
conky theme: http://ubuntuforums.org/showpost.php...&postcount=505


Ubuntu Running Slow?

Get the performance patchset! here on this site

49 comments:

  1. Nice,

    But for those unfamiliar with the syntax, the Decoration Windows in the Decoration plugin should read something like:

    any & !title=trans

    (add ampersand "and" to string together rules)

    ReplyDelete
  2. Wow!!!!! Thanks! Compiz is the greatest thing since sliced bread.

    DiggUser
    www.chancechat.com

    ReplyDelete
  3. I WANT A DESKTOP LIKE YOUR!!!!!!!

    ReplyDelete
  4. dont forget to disable the scrollbars as well!

    ReplyDelete
  5. dont forget to disable your scrollbars as well!

    ReplyDelete
  6. nice, but certainly not new : been doing that for several years with aterm or eterm...

    ReplyDelete
  7. Nice stuff.

    What programs do you use for the two bars (top and bottom of the screen)?

    ReplyDelete
  8. this has been around for a while using other apps (not with compiz/beryl) though definitely not as elegant.

    great article!

    ReplyDelete
  9. As a n00b I say: So this works in gnome. What about KDE?

    ReplyDelete
  10. that is hot, unfortunatley i use osx and xp... couldn't get the hang of ubuntu, I liked it, but I am to used to photoshop, flash. but not I am jelous

    ReplyDelete
  11. The Ubuntu desktop looks like KDE instead of Gnome. Did you do something additional to it?

    ReplyDelete
  12. It is a pain in the ass to install beryl for total newbies like me.


    Sally
    http://www.prankvideoz.com

    ReplyDelete
  13. Just press F11 ...
    didn't you think about that?

    why you scratch your head like that....???

    ReplyDelete
  14. It's totally cool and I like it a lot. However, to be actually useful I need to have applications and be able to install these applications without some arcane incantations and invoking the spirit of Linus Thorvalds.

    If OS X didn't exist this would be my system of choice. Windows... I would rather eat dirt from ground zero than use it a home [no alternative at work].

    ReplyDelete
  15. @anon

    I`ve found clicking a button to install any of the 20,000+ apps in synaptic as simple as it comes(i know though,gimp aint PS);)

    Not sure what i`ll do with a terminal on my desktop though being as i rarely ever need the thing....

    ReplyDelete
  16. oops,forgot.......looks bloody good though:)

    ReplyDelete
  17. Looks good.

    Is Compiz still buggy and slow? Last time I tried it I had a Geforce8800 and it was still choppy and slow when resizing windows and such.

    I tried various distros and install methods. Always a bit choppy. Maybe the 8800 drivers are poor for linux right now.

    Anyways, looks good.

    marksanborn.net

    ReplyDelete
  18. I have no issues with my 8800 gts using the last two NVIDIA closed drivers. I used Envy to install the drivers in Ubuntu and manually in Fedora 7 and both had no issues with the 8800. Do check to see that the Vsync in the NVIDIA panel and in Beryl / Compiz Fusion are set to Off. Instead of running 60 fps, I am now running thousands of FPS.

    ReplyDelete
  19. is that conky running on the right hand side of the screen? if so, how about publishing the script?

    ReplyDelete
  20. Great How-To :D

    What gnome theme are you using? :)

    ReplyDelete
  21. Great linux.... this is OS !!!

    ReplyDelete
  22. that's real eye candy to me. Thx 4 sharing the stuff % keep on doin' so.

    the polarizer

    ReplyDelete
  23. could you please make a script to the script kiddies here?
    I know that a terminal is a hackerlike stuff, but it wont be taht bad to see if your recipe can be turned in some reproducible feature.
    by the way could you post a recipe to make a shiny desktop as yours?
    n

    ReplyDelete
  24. How do I set this so that it doesn't get minimized when I do a "show desktop"

    Thanks,
    Larry

    ReplyDelete
  25. This is one of the most useful things with linux. Thnk you so much/
    http://www.fleako.com/open-source/

    ReplyDelete
  26. He is running Compiz-Fusion for those of you that don't know:

    http://ubuntuforums.org/showthread.php?t=481615&highlight=compiz-fusion

    It also looks like he is running Avant or something like it:

    http://awn.wetpaint.com/

    Fairly common stuff. Although his theme is nice too. I don't know what that one is.

    ReplyDelete
  27. Compiz Fusion is close to blazing fast on my wimpy ATi integrated 64Mb shared ram card. One your card is set up, it's amazing. Thanks for the tip - looks excellent and is also productive.

    ReplyDelete
  28. A great hack (for this already great hack) is to substitute a Windows OS running in a virtual machine for the terminal. Two OSes operating almost seamlessly as one!

    Checkout http://img131.imageshack.us/img131/1831/vandutogetherfc0.png

    And/Or http://img175.imageshack.us/img175/2123/vistaandubuntuzt8.png

    For some screenies of mine. The second one shows the magic settings needed for Compiz, as I had to alter a thing or two.

    You'll note that I not only set my Vista virtual machine [which has the title of "Vista (Take 3!!!)" substitute the name of the window your virtual machine runs in.] to "below" but also set all other windows to "above" with the line "all & !title=Vista (take 3!!!)" in the "above" field. This was necessary to prevent some nasty issues with other windows getting "stuck" behind my Vista window. Highly annoying.

    I also left the icon in the pager and taskbar because when I set my virtual machine to full-screen it automatically flags the Vista window as "above" despite my explicit settings otherwise. Thus, I must right-click on the icon (shown as the round Vista bobble in the bar on the bottom) and un-check the "ontop" setting before things will behave the way I want.

    But hey, here I am! Sweet sweet integration!

    Now then, before you ask (lol), the Emerald theme I am using is custom, the wallpaper in vista was grabbed from http://gucken.deviantart.com/art/Homeworld-The-Movie-57795576 and the dock is AWN. Instructions for installation of AWN can be found at http://ubuntuforums.org/showthread.php?p=2307772 .

    Have fun!

    ReplyDelete
  29. What is that awesome looking clock you're using in the middle of your background, and where can I get it?

    ReplyDelete
  30. If it's completely transparent, does that mean I can see right through the monitor?

    ReplyDelete
  31. It would be super neat if you would share the location of that wallpaper.

    ReplyDelete
  32. Warning: this will cause any window containing trans to lose window decorations. Try it: search for trans in firefox, and see what happens.

    ReplyDelete
  33. Having weird issues with it not respecting my compiz config settings unless I either switch the profile in the terminal itself or if I change something like one of the Window Rule skips.

    It won't respect the size or position that I set.

    ReplyDelete
  34. I will show how to create a conky'esque transparent shell using only gnome-terminal and Compiz-fusion.

    ReplyDelete
  35. looks great! but i can't remove the scrollbars!


    can you help me?

    ReplyDelete
  36. @[lukas_utc]
    To remove scrollbars when you set up trans profile, in the tab before the last-one you can select not to show scrollbar

    @all
    Looks like it's not possible to me to set up constant size and position of the trans-terminal. Any suggestion?

    ReplyDelete
  37. jep same here. setting size not working :(

    ReplyDelete
  38. Hy there, i can fixed the size, but i ca't put the window on bottom left corner, my resolution is 1600x1200, so the normal is 0,1100 because i set 100 height however the window only go at 700Y

    Any help?

    ReplyDelete
  39. for all those wondering how to achieve the desktop shown

    mac style dock at bottom = avant window manager.

    bar at top = standard gnome panel but with the expand function turned off. you can access this by right clicking the panel and going to properties.

    embedded terminal = can you read???

    the widgets I can't tell you

    ReplyDelete
  40. ************************************
    An updated version of the HOWTO, a link to the conky script, and a link to the photoshop psd file of the background can be found here:

    http://ubuntuforums.org/showthread.php?p=3254093

    ReplyDelete
  41. Thanks.
    "Fixed Size Windows" doesnt work for me in compiz. So i specified gnome-terminal size on command line with:
    gnome-terminal --window-with-profile=trans --geometry=150x50
    (for 1280x1024px (above is char/lines))

    ReplyDelete
  42. very good howto! can I translate it in italian to do a post in my blog? Obviously, I'll a link to yours.

    ReplyDelete
  43. hi! i love you desktop! i already installed conky and avant with your tuts, just wanna know how to change the panel on the top like yours?

    ReplyDelete
  44. You know what ? This works just great in... Enlightenment DR16, which is probably as remote to Compiz as M$ is to FOSS. And it just works natively...

    ReplyDelete
  45. I seriously recommend not just using the name trans because then whenever you have a window with that word in it, even a web page, it will lose the title bar and stuff. Name it something much more random like djFw4FgegemoJYU

    ReplyDelete
  46. @Bob and others
    To avoid getting all windows with a "trans" in the title, replace title=trans with title=^trans$
    That way, your settings will only affect windows with trans as their full name.

    ReplyDelete