Next Previous Contents

4. AfterStep Configuration

4.1 What's a .steprc, and why do I need it anyway?

In versions of AfterStep prior to version 1.2, all configuration is handled in a single file. This is the .steprc file; it should be in your home directory if you're running any of these versions. These files are well-commented, and can be edited easily to change the defaults. These are also the files that are changed by any current version of ascp. New versions of AfterStep don't use this file, preferring the GNUstep/Library standard instead. See below.

4.2 I'm using AfterStep 1.4 or later, and I can't find the .steprc. Why?

AfterStep now uses a directory structure to handle desktop customization. Versions through 1.4.4 need a full set of directories in each user's home directory. In other words, you need to copy everything in

[AfterStepPath]/GNUstep/Library/AfterStep/

to

~/GNUstep/Library/AfterStep/

There were several changes to this directory structure between version 1.4.0 and 1.4.4. A full outline of these changes is beyond the scope of this document, but there are some general remarks on particularly common problems below. For more help configuring 1.4.4, see http://www.via.ayuda.com/~smw/afterstep/configs/index.html or http://www.music-satellite.de/spearhead/.

In particular, you should note that the ~/G/L/A/ directories are not compatible between versions 1.4.0 and 1.4.4. You must copy the full [AS install]/G/L/A/ directory (including all sub-directories) into your home directory, even if you are only upgrading from 1.4.0 to 1.4.4.

The ~/GNUstep/Library/AfterStep arrangement is, admittedly, somewhat inefficient, because there are always at least two copies of everything on any system running AfterStep. As of versions post-1.4.5, it is possible to add only those files which you have changed to the directory structure in your home directory; everything else will use the default installation in /usr/share/afterstep. Nevertheless, there are some subtle differences among the configuration files between each version. If you have upgraded, and you suddenly have problems, your first impulse should be to try renaming your ~/G/L/A/ directory, and starting AfterStep. If the problem disappears, you can reasonably presume that it has something to do with your configuration files. That doesn't mean that the answer will be obvious, but it does mean that you'll know where to start looking.

4.3 I just upgraded versions, and now nothing works.

First, determine whether you have upgraded from a ".steprc version" to a "non-.steprc version". Versions after 1.2 do not (by default) use the .steprc file, so your old customization will not be invoked by default if you have moved from, say, 1.0 to 1.4.5.

If you have changed from 1.4.0 to a later version, you need to remove your old version of the {yourpath}/GNUstep/Library/AfterStep directory structure. Version 1.4.4 introduced the "configurable" and "non-configurable" distinction, and so several items have moved. See the previous question.

Subtle changes have been introduced between versions; this is even true between, say, 1.4.4 and 1.4.5.3. In particular, several modules have had their configuration files changed to be in keeping with Wharf style. The practical effect of this is apparently inexplicable problems which develop after an upgrade. If you suddenly have problems after an upgrade, and especially if some modules suddenly do not work, try replacing your configuration with the default configuration. If that works, you can edit the new configuration to reflect your previous customization.

4.4 How do I change my startmenu?

In versions before 1.2, edit the appropriate section of the .steprc. In later versions, you need to adjust the necessary parts of the ~/GNUstep/Library/AfterStep/start directory structure. The start directory includes sub-directories for every sub-menu. It also has a file corresponding to every entry on a menu. Each file should contain a single line to invoke the desired program. So, if you wanted an entry in your main startmenu which said

xiterm (pixmap)

your ~/G/L/A/start directory would contain a file:

xiterm\ (pixmap)

That file would contain a single line:

xiterm -pixmap [path_to_pixmap.xpm] & 

(you would, of course, adjust the command-line options to reflect your intentions).

Notice that the sort order of the start menu is largely determined at compile time. There are, however, a few files in the start hierarchy which aid in controlling the way the start menu gets created. It is a good idea to copy (and edit as required) the default start hierarchy if you upgrade.

4.5 What are "look", "feel", "desktop", etc. files?

The various elements of the desktop have been separated out, in order that they can each be customized independently. Look files and feel files allow you to customize the desktop in almost an infinite number of ways. Note that any functional changes you make in a look file (like adjusting the number of buttons that appear on a window titlebar) must also be reflected in a corresponding feel file: the "feel" handles how you interact with windows, while the "look" controls their appearance. This is handy if you want your windows always to respond in more or less the same way, but want them to look differently depending on the task you're performing, the machine you're on, or whatever.

4.6 Fine, but how do I reduce the number of buttons on the titlebar?

The trick here is to understand the difference between a look and a feel. A look file simply determines how elements of the screen will appear. It does not determine how the elements will interact: that's what a feel file does. So, if you want to reduce the number of buttons on a titlebar, you need to adjust both the look and feel files. The look file must define the appearance of exactly the number of buttons for which there are functions in the feel file; and each button defined in the feel file must have a reference in the look file.

To see how this works, consider a look file with the following definitions:


# TitleButtons : [1] [3] [5] [7] [9] (title) [0] [8] [6] [4] [2]
#
TitleButton 1 b1.xpm b1-pressed.xpm
TitleButton 2 b2.xpm b2-pressed.xpm
TitleButton 3 b3.xpm b3-pressed.xpm
TitleButton 4 b4.xpm b4-pressed.xpm
TitleButton 6 b6.xpm b6-pressed.xpm

Now, this defines the appearance of two buttons on the left of each titlebar (TitleButton 1 and TitleButton3), and three buttons on the right of each titlebar (Titlebutton 2, TitleButton 4, and Titlebutton 6). For each definition, the first XPM mentioned defines the appearance of the button when it is not pressed; the second XPM defines the way the button looks when it is pressed. The numbering of these buttons is hard-coded, so you cannot just number your buttons in any order at all. Follow the "boilerplate" numbering scheme (above the TitleButton pixmap definitions in our example).

In order to make this look function correctly, each titlebar button needs to have its function defined in the feel file. So, the feel file might include something which looks like this (this one is taken from the feel.DEFAULT file in 1.4.5.55N6):


Mouse 1         1       A       ChangeWindowUp
Mouse 2         1       A       GetHelp
Mouse 3         1       A       ChangeWindowDown
Mouse 1         2       A       Delete
Mouse 2         2       A       Destroy
Mouse 3         2       A       Destroy
Mouse 1         3       A       PopUp "Window"
Mouse 2         3       A       WindowList 2
Mouse 3         3       A       WindowList 2
Mouse 1         4       A       Shade
Mouse 2         4       A       Stick
Mouse 3         4       A       Stick
Mouse 1         6       A       Iconify
Mouse 2         6       A       Maximize
Mouse 3         6       A       Maximize 

The first column defines what action causes the desired behaviour; so, "Mouse 1" means "mouse button one is pressed". The second column defines where the behaviour is to have its desired effect: in our list, we have definitions for all five (TitleButton 1, TitleButton 2, TitleButton 3, TitleButton 4, and TitleButton 6) of the buttons defined in the look file. Notice that each button gets a definition for every mouse button, so there is never an undefined action on any TitleButton. The third column specifies the context for the action. In this case, the context is "Any" (actually any context except in the TitleBar); you can also specify modifications (e.g. by adding "C" for "Control"). The final column specifies the behaviour which attaches to the action. So, in the last row, we define that clicking the third mouse button on the innermost TitleButton on the right-hand side of a window will Maximize that window.

Other functions get defined in the same list in every feel file, so you will have to look carefully to ensure you define everything correctly.

4.7 I hate the ~/GNUstep/* hierarchy. Why can't I have my .steprc in version 1.4.x?

You can. Use the -f switch to force AfterStep to read from a file. Please notice that not everything will work with your old .steprc file "right out of the box"; but if you like the old version that much, why upgrade anyway?

4.8 I'm using RedHat, and I can't find the configuration files you've mentioned.

RedHat apparently includes a look-alike to AfterStep which is actually a hack of fvwm-2. It is not AfterStep, although some RH distributions also contain the real AfterStep. RedHat has, as of this writing, agreed to change the name of their "hacked" version, in order to reduce confusion, and include the real AfterStep in post-5.0 releases.

4.9 What is the database file?

The database file allows you to adjust certain features of the desktop. It allows you to define icons for minimized programs, allows you to force certain programs (like Pager or Wharf, for instance) to stay on top, and other such options. Have a look at the default database file, back it up, and play with some of the settings; it's pretty self-explanatory, but it takes a little fooling to make it work as you want.

4.10 I want to do xyz with {some asapp included with the distribution}. How do I do it?

Yes, this is a generic question, because the generic answer is always the same: please read the relevant man pages and README files. Programs like xiterm, asmail, etc. are included with the distribution; but they're not really part of afterstep. That said, if you've read every relevant thing you have (I really mean everything!), a question to the regular list would not be out of place. Two included applications nevertheless warrant mention here:

I want to add a pixmap to the background of xiterm

The first thing you must ensure is that you compiled xiterm to allow this. The default configuration of xiterm does not permit the addition of pixmaps. You need to edit xiterm.h (you'll find it in xiterm/src/) before compiling in order enable the feature: change the line


/*#define XPM_BACKGROUND*/

to


#define XPM_BACKGROUND

Once you're sure you've compiled and installed xiterm correctly, simply add the switch "-pixmap {path-to-pixmap}".

I want xiterm to start as the login shell.

In order for this to work correctly, you need to adjust the compile-time settings for UTMP_SUPPORT. The relevant section is near the end of xiterm.h. The exact changes you need to make vary from system to system; just read the comments carefully, and make the correct adjustments.

How do I get that cool transparent xiterm?

You can't. There is no such thing. The "transparent" effect you are looking for is actually just a *term program (xiterm, rxvt, whatever) with a background pixmap identical to the desktop. The user carefully lined up the *term so that the pixmaps appeared to be the same ones.

Apparently, the newest version of eterm has a transparency option. If you decide to use it, I hope you have a couple of million extra CPU cycles lying around!

I am having trouble with asmix or asmixer and Wharf

This appeared in AS 1.4.4. That release included only asmix, and not asmixer. You can either get asmixer and install it, or use asmix. If you use asmix, make sure you are invoking in correctly in the Wharf. In particular, you must be consistent in your invocation: it is labelled "asMix" in the Wharf file, even though the name of the file is "asmix".


Next Previous Contents