SUSE root Logo
 
SUSEroot.com

 Home -> SUSE Linux Adventures -> Transparent Aterm & SUSE
 
 Main Menu
 Recent Blog Posts
KDE, WTF

NetIQ Video

Treo 700p Tether with Linux

SUSE 10.2 on Dell Optiplex 320

SUSE 10.2

...the blog

 Using Aterm and its Transparency

Transparent Aterm ScreenshotBeing a Fluxbox user who likes to keep things simple, I have to take my eye-candy where I can get it. Transparency is a pretty cool feature that has become very popular in all desktop environments. Aterm is a terminal emulator that is extremely light and can be configured to be transparent. It can easily add a "little something" whether you use GNOME, KDE, Fluxbox, or whatever. If you'd like to give it a try, read on!

I'd give this whole process about a 1.5 on my patented pain in the ass scale. If this is your first day using Linux, you might want to come back tomorrow, but other novices should still be able to complete this as long as you go one step at a time and stop to research any areas you are unsure about.

With the exception of the RPM "stuff" this procedure should be the same for nearly any Linux distribution. This is a pretty straight-forward process of installing, but tweaking and configuring it to look they way you want certainly deserves a few tips.

 Get Aterm
I had a very hard time finding any recent Aterm SUSE 9.1 RPMs, so went the route of compiling from source; this is about as simple of compile as you are going to find. As of this writing (28 March 2005) the most current version of Aterm is 1.00.beta2. During make this version threw a peculiar error about "_XA_MwmAtom". No amount of searching or tweaking made it any better and I found some indication that Aterm developers were getting the same error, so I went to 1.0.beta1. This one worked without a hitch; so you're certainly welcome to give beta2 a shot, just know that beta1 seems to work just fine. You can download the latest sources here.

Update: John Coppens emailed me with a tip he picked up on the Aterm mailing list. If you want to get beta 2 working, you just need to modify one line of the source code before you configure. If you're not comfortable modifying source code, you can get the copy I already modified here; just copy the text and save it as main.c in the src/ folder, overwriting the one that is already there. If you're going to modify your own, extract the code, go to the folder you just extracted and into the src/ folder. Then open the main.c file with a text editor like Kwrite, Kate, etc. Around line 50 you'll see this:

#ifdef
#HAVE_AFTERSTEP
void DeadPipe( int unused )
{
}
Atom _XA_MwmAtom = None;
#endif

Change it to this:

#ifdef
#HAVE_AFTERSTEP
void DeadPipe( int unused )
{
}
#endif
Atom _XA_MwmAtom = None;

The above just moves the Atom _XA_MwmAtom = None; from above the #endif to below it. Save the file and continue with the below instructions.

 Install
You are welcome to use the i686 SUSE 9.1 RPM I made using the checkinstall method: aterm-1.0.beta1-1.i686.rpm.

Or, if you'd like to make your own: Extract the source and cd to the directory. You can run a ./configure --help to see what options are available, but you you get all the fun stuff with just the default settings. make and then you can either make install, build a simple RPM, or build a real rpm.

I did not run into any dependancy issues during this process on two different computers. Terminal emulators are pretty simple (even transparent ones) when compared to other software packages.

 Customizing
After it is installed, you should be able to simply type aterm into a terminal and have a new Aterm window. Now we can tweak it to look how we want. To see what options are available, man aterm is a good place to start, also try aterm --help. There are two basic ways to make Aterm look the way you want each time you open it up. You use some options whenever you open a new Aterm window, or you can set up an .Xdefaults file to do it automatically. Both methods are discussed in this Gentoo forum thread, everything in that thread is the same if you are using SUSE and something other than Fluxbox.

To pass options when starting an Aterm session, you would just use something like (one line):

aterm -name aterm -title 'SUSE Terminal' -sl 3000 -tr +sb -si -sk -fade 70 -sh 60 -fn -misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-2 -g 130x50+20-0 -fg \#cecece

Comparing this to man aterm and aterm --help, you'll see that that will give the Aterm window the name of aterm (what your computer calls the window), the title of "SUSE Terminal" (what you see in the title), (-sl 3000) it will keep 3000 lines, (-tr) it is transparent, (+sb) it has no scroll bar (scrolling is done with a mousewheel), (-si) supresses the auto scrolling to the bottom of the session when a new line is printed behavior, (-sk) makes it scroll to the bottom line when you press a key, (-fade) makes the text fade on the window when it loses focus (the man page says the option needs to be set during ./configure to work, I have found that it works even when using a default ./configure), (-sh) creates a shading effect (uses more memory, but still pretty light), (-fn) sets the font, (-g) sets the geometry of the window when opened (widthXheight+distance from left margain+distance from top margain), and (-fg) sets the foreground (font) color (notice a backslash is used to escape the "#", "gray" could also be used). Check out the man page for more options.

Transparent Aterm ScreenshotFluxbox users can just put the command and options into their menu file. It is worth pointing out that Fluxbox users can also leave out the geometry settings (-g) and just right-click on an open aterm window's title bar to remember the diminsions and to save on exit. KDE users can just use the KDE Control Center (see the "KMenu" section on this page) to edit the KMenu to add aterm with the options you want.

As mentioned, the other option is creating an .Xdefaults file. This file will load when X is started and you will not need to pass the options in the command line to get Aterm to look how you want; unless you have set one up, you likely do not have an Xdefaults file yet. Based on the sample given in this thread, you can see a sample for customizing Aterm here. Other samples can be found here and here.

In case you did not read the thread, I'll just point out that while the colors are set for "xterm" they will be used for aterm as well. The Aterm settings for the .Xdefaults file come from man aterm. You can copy the .Xdefaults file mentioned, modify it, and save it as ".Xdefaults" in your home folder.

SiteMap
SUSEroot.com © 2004 by Damian Smith. Trademark and copyleft information is covered on the About SUSEroot page. Contact me at damian@suseroot.com