Jumat, 22 Oktober 2010

Transparent Terminal On Your Desktop

I found this nice trick from Ubuntu Forums, I think this trick is useful especially if you used to run terminal to do your job on your Ubuntu box that’s why I’ll share it with you now. The main goal of this trick is to provide a preloaded terminal on your desktop every time you boot your machine, so that you don’t need to click any button to load your favorite terminal. Great, huh? Okay, let’s start.

I did this using gnome-terminal on Ubuntu 7.10 a.k.a Gusty Gibbon with Compiz Fusion, but you may try on the previous version Ubuntu with or without Xgl (should work well too). This is the screen shoot of my final result

Terminal
The Devilspie

We need a program called devilspie to do this trick, this program must be first installed before we do anything, you need to run this command from your terminal

$ sudo apt-get install devilspie

This program also need a directory in your home directory to store its configuration. Let’s create one now

$ mkdir ~/.devilspie

Next, we need a configuration file for the transparent terminal, use your favorite editor to do this

$ vim ~/.devilspie/DesktopConsole.ds

Copy then paste this configuration

(if
(matches (window_name) "DesktopConsole")
(begin
(set_workspace 1)
(below)
(undecorate)
(skip_pager)
(skip_tasklist)
(wintype "utility")
(geometry "+50+50")
(geometry "924x668")
)
)

This will put the terminal on the workspace 1, you may change it, but I never see it on workspace other than 1 when using Compiz. You may also change the geometry to match your screen. See the wiki of devilspie for details.

The Profile

We have to create a special profile for the transparent terminal cause it won’t work with the default profile. Open the gnome-terminal, then select New Profile... from File menu. Fill DesktopConsole in the Profile Name field. Then follow this step:

  1. In “General” tab, untick “Show menu bar by default in new terminal”
  2. In “Effects” tab, choose “Transparent background” and set “Shade transparent or image background” to “none”.
  3. In “Scrolling” tab, set “Scrollbar is” to “Disabled”

The Sessions

In order that devilspie and transparent gnome-terminal always run when the system boots, you must add them to the sessions. You can do this by using sessions-manager from menu System->Preferences->Sessions. Add two “New Startup Program” and fill this command respectively to each item

  1. devilspie
  2. gnome-terminal --window-with-profile=DesktopConsole

Restart and Enjoy

That’s it, now restart your Xserver and you’ll see a terminal with transparent background on your desktop. Ciao

0 komentar:

Posting Komentar