Thursday, March 8, 2007

Transparent Terminals on the Desktop

There are a number of cases in which you might want a terminal window always present on your desktop, perhaps tailing an important log file, or looking at the output of top. Whatever your reason, here are the steps to take if you just want magically dynamic text appear on your desktop.

First, assuming you have Eterm, start up an instance of it and Toggle Transparency in Background. You might also want to play around with the text color, to optimize it for your background. Then add an entry to start it when fluxbox starts in .fluxbox/apps.

Now for the window title bar, button bar, scroll bar, border, and positioning. All of these tweaks can be done via start options. Here's what I have for my Eterm entry in .fluxbox/apps:
[startup] {Eterm -g 60x50+80+5 -O -x --no-cursor -w 0 --scrollbar 0 --buttonbar 0 -e tail -f /var/log/messages}
Going in order: the "-g" options allows you to specify the geometry of the window. You pass it Width x Height + X offset + Y offset. So in my example, I have the window as 60x50, and it appears 80 from the left side of the screen and 5 from the top (this is just past where I have fbpager, which seemed like a convenient place). The -O option takes the background from the root window, assuring transparency. The -x option removes the window's border, -w sets the border width (0 in my case), and the scrollbar and buttonbar as 0 removes those as well.

The -e tells eterm to execute a command. I chose to follow tail /var/log/messages, but you can set it to whatever log file or process you want. Top is a good one to implement like this as well.

So with just that one line addition to .fluxbox/apps, you can have a permanent transparent log output to your desktop. It's useful, and looks awesome.

2 Comments:

Blogger Ian McCracken said...

I wanted to run lots of transparent Eterms, and have them in specified positions on the desktop, without having to move them around. I also wanted them attached to the desktop layer, etc. So I set up these in my .fluxbox/apps:

[app] (eterm_top)
[Head] {1}
[Dimensions] {660 474}
[Position] {0 0}
[Deco] {0x0}
[Hidden] {yes}
[Sticky] {yes}
[Layer] {12}
[end]


That gives it a specified size, position, transparency, stickiness, and layer. Also it defines a name, which mans that if I do:
Eterm --name eterm_top
These window settings will apply. So I set up one to run top, one to tail my Zope event log, one to run fortune, and one for use:

Eterm --name eterm_top -0 -O -x \
--shade 0 -f cyan --buttonbar=false \
--scrollbar=false -e top &

Eterm --name eterm_zopelog -0 -O -x \
--shade 0 -f cyan --buttonbar=false \
--scrollbar=false -e tail -f Z2.log &

Eterm --name eterm_fortune -0 -O -x \
--shade 0 -f cyan --buttonbar=false \
--scrollbar=false \
-e watch -t -n 180 fortune &

etc. Now they're all laid out how I want them, on startup.

March 9, 2007 at 7:27 AM  
Blogger Ian McCracken said...

One note: It's best to modify .fluxbox/apps while fluxbox isn't running. Fluxbox has a habit of overwriting that particular file, since that's where it stores "Remember" options for windows.

March 9, 2007 at 7:33 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home