Next Previous Contents

6. Modules

6.1 How do I get multiple Wharfs/Pagers on the screen?

It's pretty easy. You just have to have the Wharf exist under several different names, and then configure each of them using its name. For example, if you make a link to Wharf called MyWharf (type "man ln" at a command prompt if you don't know how to make links), you would add extra lines to the Wharf configuration file (or new section in a .steprc) for the new binary name: ~/GNUstep/Library/AfterStep/mywharf. So, your file, ~/GNUstep/Library/AfterStep/wharf, would include lines like this:

       *MyWharfAnimate
       *MyWharf "label" Icon.xpm Exec "something" something

The same works for the Pager. Note that the default pager file includes several additional lines already, for *WPager, *XPager, *YPager, and *Zpager. Use the already-installed links (with those names) to use these lines (and remove the comment marks from the lines).

In the newest versions, you'll also need to edit the database file: mirror the Wharf appearance with the new name. That is, you need to copy the line that describes how Wharf should appear, and then change the name "Wharf" to (in our example) "MyWharf".

Note: Apparently, due to the way the Wharf configuration file parser works, links with names like Wharf2 (i.e. the same original name with characters appended to it) will not work: the parser will think you are referring to the original module and will get confused. You have to give each link a distinctive name. Try, for instance, MyWharf.

In the latest versions of AfterStep, there is also a different version of GoodStuff included with AfterStep; this is called Zharf. It allows variable-sized buttons, and it includes names for the icons. You can start it up with the default configuration from your startmenu (look under "Modules"). Configuration is basically the same as for Wharf.

6.2 How can I get asclock to appear properly in Wharf?

First, you need AfterStep 0.98 beta 4 or later. These version have the MaxSwallow option. Then, add a command such as this to the wharf file or line (depending on whether you use .steprc):

         *Wharf asclock nil MaxSwallow "asclock" asclock -12 -shape &

You must replace the `-12' with '-24' to display 24 hour time.

Starting with a series of patches to 1.4.5, there were changes to the meaning of "Swallow" and "MaxSwallow". So, asclock is now invoked with the "Swallow" option. There is more on this change below.

6.3 How do I configure asclock to use fewer colors?

When installing, after executing configure, asclock configure should be launched by default. Otherwise, go to the modules/asclock directory and do the following:

  1. Execute sh configure
  2. Several menus will appear, asking for the default language for dates (yes, you can change it!) and the number of colors used. There is one option to use 2-bit color, resulting in an asclock that uses only 4 colors, but still looks pretty good.
  3. Done. Now go and compile asclock as usual.

6.4 Why does asclock show the wrong time?

This happens most often on Red Hat Linux installations. There's a broken link; this is a fairly well-known problem. Just make a link between /usr/lib/zoneinfo and /usr/share/zoneinfo. If you don't know about links, try typing 'man ln' at a command prompt.

Of course, the above assumes that your zoneinfo setting is correct.

6.5 Why does my latest version of MaxSwallow do odd stuff?

In recent versions of AfterStep (i.e. starting with the 1.4.5 series of patches), the Wharf underwent some re-working, in order to allow the use of some newer programs (designed for Window Maker). As a result, different patches turned up for the Wharf.

The final result of this work can be seen from version 1.5. The old "MaxSwallow" has been removed, and replaced with "Swallow". The older "Swallow", with its size limitation, is gone. The "MaxSwallow" keyword now re-sizes the button to fit the app being swallowed. There is also a "Size" keyword, to resize the buttons, and ignore any other size determination.

6.6 What's wrong with WharfAnimate?

There are really two questions here.

First, in 1.4.4, WharfAnimate was broken. This was fixed in 1.4.5.0.

Second, some people complain that Animate is too slow. This is defined at compile time. You should adjust the three animate lines in configure.h to a lower number; that will speed up the animation. Version 1.5 includes three new configuration options: WharfAnimateSteps, WharfAnimateStepsMain, WharfAnimateDelay. These are defined in the wharf configuration file, and control the animation of Wharf. The old compile-time configuration is also still available, but these new options will hopefully make things easier.

6.7 Can you add xyz to the Wharf?

You know, it would be really nice if the Wharf supported text titles/cascading menus/tabs on the side/plug-in modules/swallowing running applications in folders/scrollbars on folders/starting applications only if they're not already running. Why doesn't someone do it?

This is a holy war. You will be crucified at dawn. Unless you implement it yourself and post a patch.

No, seriously, there has been a lot of discussion about these topics.

Many people believed that AfterStep should be kept as close as possible to the original NEXTSTEP interface, while others thought it should be extended and be made as configurable as possible.

Now Window Maker is following the original NEXTSTEP interface, while AfterStep is going its own way. Extensive configurability is one of these "own ways".

So please send a message to one of the relevant lists saying exactly what you'd like to be implemented; or, even better, do it yourself and send a patch. Note that some of the list of requested features above has, in fact, been fulfilled, so check the latest version of AfterStep before asking for something!

6.8 Can I have swallowed apps under a folder?

You can have this only if you have version 1.4.5.55N2 or later.

6.9 Can I have a folder within a folder?

Yes. In version 1.5, folders can be nested. Just nest the sub-folder specification within the main folder specification.

In versions prior to 1.5, you could not nest folders. Thadeu Penna (tjppenna@aol.com) cleverly worked around this limitation by creating a folder which calls another Wharf:

 
My dirty solution was: one of the Wharf's buttons is a call
to Pier (a secondary Wharf). In this way, I got one additional level. The
main disadvantage is for each button in the Pier, you have to write a small
script that calls the program and after to kill the Pier. The geometry was
quite easy to evaluate. I have used, for the first button of the Pier, the
same icon as in the Wharf, therefore it seems as a Folder with an additional
level. It is a little slower than Wharf itself.

6.10 Can I have two columns in my Wharf?

Yes, from version 1.5. Use WharfColumns. WharfColumns was broken, but it's fixed now.

6.11 Why can't I find the man page for Wharf?

Spell it "Wharf" and not "wharf".

6.12 Why can't I get my application to launch correctly Swallowed under Wharf?

Here's a tip from Doug Alcorn (alcornd@earthlink.net):

 
When you Swallow or MaxSwallow an app, the thing in double
quotes should be the title of the window that is created.  If you use


*Wharf wmsysmon - MaxSwallow "wmsysmon" /usr/local/bin/wmsysmon
&

 it won't work.  The title of the app is
"/usr/local/bin/wmsysmon", not "wmsysmon".

6.13 Where is the background picture (root window image) set?

I usually use xv or ee or Esetroot to set my root window
because they support using jpegs, but whenever I restart Afterstep, I lose
that setting: it reverts back to the last one that I chose through the start
menu.  Why?

Until late in the 1.7 development tree, the root window image is displayed by the Pager module according to the PagerDesktopImage parameter; this is specified in the pager config file. The standard setting is for it to point to

~/GNUstep/Library/AfterStep/non-configurable/{desknumber}_background.{extensions}

That default setting allows you to select your desired background image from the /Desktop/Pictures menu. When you select your image, AfterStep copies the selected item into the non-configurable directory; Pager then reads that file, and displays it on root at startup when you switch desks.

Since 1.5beta5, Pager supports jpegs. Since 1.5beta6, Pager also supports PNG . Also, you don't need to use Esetroot for Eterm to recognize the root bg correctly when trying the --trans option.

The newest versions of AfterStep support asetroot, which allows setting the background image without using Pager.

6.14 My Pager doesn't support JPEGs or PNGs. Is there a way to force it to?

You need to have the relevant libraries installed prior to building AfterStep. The following are required: libJPEG 6.0a or later for JPEG support, and libPNG 1.0.1 or later for PNG support.

The same is true for the rest of AfterStep, if you want to use JPEG or PNG for Wharf tiles, Titlebar textures, icons and so on.

6.15 How do I set the Pager size?

I'm having trouble setting the pager size.  My
DeskTopSize is set at 3x3, but the pager is in 3x2.  I looked in the
~/GNUstep/Library/AfterStep/pager file, to no avail.  Help!

You need to set the desktop size in the base.nbpp file. Make sure you use the correct base file for your colordepth!

In the example above, the setting of 3x2 needs to be changed. So, adjust the line


DesktopSize 3x2

to read


DesktopSize 3x3

Re-start the Pager module (or AfterStep) and the Pager size will change.

6.16 Is it's possible for an app to wait for the background to get loaded?

I put the rt command as the last one to be executed in
autoexec.  So far,so good, it executes last.  But when my background is
loaded it covers the tailed text, until another message appears in the file. 
Is it possible for rt to wait for the background to get
loaded?

It is possible. The background is displayed by the Pager module. So, you should wait for Pager to start before running any root window/background dependent applications (like rt or Eterm). Add the following line to your autoexec file (or check that it's there):


Wait    "I"     Pager

That line should immediately follow the line starting Pager:


Module  "I"     Pager 0 3

(This last line, of course, starts a Pager with four desktops. You'd need to adjust it to start more or fewer desks.)

The "Wait" line must precede the startup lines for the relevant applications (in our example, rt). By default, the "Wait" line will cause AfterStep to wait for Pager to load all of its backgrounds for all desks. In fact, you only need the background of the first desk before proceeding with the rest of startup process. To accomplish this add a line to your pager config:


*PagerFastStartup

6.17 What are WPager, XPager, etc., for?

It seems to me that Pager(Desktop)Image options take into
account all the options necessary, since almost everybody uses the same
Geometry and Fonts setting for all Pagers. Am I missing
anything?

The various versions of the Pager settings allows for greater flexibility. For instance, if you start "XPager", rather than "Pager", the module is configured only by the lines in the ~/G/L/A/pager file that begin with "*XPager". Similarly, if you start the module as "Pager", it is configured by any line starting with "*Pager". As a result, you can have several Pagers running, all with different settings. (For example, you could have one on the desktop, and some more swallowed in the Wharf ).

6.18 Why can't I get XPager, YPager, or the like to work?

I have the following line in my
autoexec:


Module "I" XPager 0 3

but my XPager does not start.  What's wrong?

WPager, XPager, YPager, and ZPager are actually just symlinks to Pager. If you want to use them, you may need to create the links manually. In the directory where the AfterStep binaries are found (/usr/local/bin by default), do:


ln -s Pager XPager

That will create a symlink from XPager to Pager. Then, you'll be able to start XPager successfully.

6.19 My XPager doesn't seem to load my background. What's wrong?

I swallow my Pager into Wharf as following:


*Wharf Pager - SwallowModule "XPager" XPager 0 0
*Wharf Pager - SwallowModule "YPager" YPager 1 1

But they don't seem to load the background that I select from
the Desktop/Pictures menu.  I have the following in my pager config
file:


*PagerDesktopImage 0 ~/GNUstep/Library/AfterStep/non-configurable/0_background
*PagerDesktopImage 1 ~/GNUstep/Library/AfterStep/non-configurable/1_background

What's wrong?

Pager reads the configuration according to the name under which it was started (see above). So, a Pager started as "XPager" will not be affected by lines which begin with "*Pager". You need to set the backgrounds with


*XPagerDesktopImage 0 ~/GNUstep/Library/AfterStep/non-configurable/0_background
*YPagerDesktopImage 1 ~/GNUstep/Library/AfterStep/non-configurable/1_background

6.20 How can I get rid of the desk name in my Pager?

Specify "none" as your font name, like this:


*PagerFont           none

6.21 How do I start an application on a specific desk or page?

These items are defined by the Style set for applications, in the database file. There are three parameters you can define:

StartsOnDesk {desk number}

This one will specify the desk number that applications of this class will start on. Don't forget that desks are numbered starting with 0, so if you want to start an application on the second desk, you specify


StartsOnDesk 1

ViewportX {x coordinate of page}

You can use this one to start an application on a specific page of a desk. The value should be the x coordinate of the page, relative to the top-left corner of desk. For instance, with a screen size of 1024x768, the argument value would be "1024" in order to open an application on the second column of pages.

ViewportY {y coordinate of page}

You can use this one to start app on a specific page of a desk. The value should be the coordinate of the page, relative to the top-left corner of the desk. For instance, with a screen size of 1024x768, the argument would be "768" in order to open an application on the second row of pages.

6.22 What's wrong with the mouse buttons in the Pager?

In 1.4.5.55, the left and middle mouse button bindings were reversed, because of a request from Red Hat. Several users expressed dissatisfaction with this arrangement, however, so it will not be maintained. Version 1.5 went back to the old style.

6.23 How can I have more/fewer/larger desktops?

The Pager module in the latest AfterStep versions is highly flexible. It can be configured to show several desktops, each with several screens, and it can be placed just about anywhere you like it.

To change the size of the desktop, edit the base.{your bitdepth}bpp file to reflect the size of the desktop that you want. "2x2" means "two panes wide by two panes high".

To change the number of desktops, you need to do two things. First, you need to change the call to pager in your autoexec file. The syntax for starting Pager is "Pager {1st desktop} {last desktop}", where the first desktop is always 0. So, if you wanted to have two desktops, you would add the following line to your autoexec file:


Module  "I"     Pager 0 1

You should also then comment out or remove the definitions for the extra desktops in your pager configuration file.

The Pager can be placed anywhere on the desktop, by editing the value of "*PagerGeometry". This uses the standard X geometry values.

Pager can also be displayed vertically and horizontally. Just adjust the values of "*PagerRows" and "*PagerColumns".

Notice, also, that the pager configuration file changed in version 1.5, in order to allow the new functionality. Do not recycle your old pager configuration, but use the new default as the basis for new customization.

6.24 Fine, but how do I get the pager off the desk entirely?

You can get rid of the pager by removing it from the autoexec file.

Pager can be swallowed in the Wharf. In version 1.5, it is also possible to do this under a Wharf folder. Use "MaxSwallowModule". You might also like to adjust the DeskTopScale setting (try 40) in your base.nbpp file, in order to make the resulting Pager look better in your Wharf.

6.25 How do I enable sound in AfterStep?

First, make sure you have the necessary hardware, and have a kernel compiled with sound support. You can check that your sound actually works by trying the following at a command prompt:

cat {some au file} > /dev/audio

Then, edit the ~/GNUstep/Library/AfterStep/audio file. You should see lines like these (if you don't, add them):

         *AudioPlayCmd /usr/bin/showaudio
         *AudioDir /usr/local/share/afterstep/desktop/sounds
         *AudioDelay 1

Again, if these aren't there, add them. Verify that the AudioPlayCmd is a valid program and that the sounds you want to play are in /usr/local/share/afterstep/desktop/sounds/ (or set it to the appropriate directory).

Below that section, you should see many lines like this:

         #*Audio startup gong.au

Simply remove the comment (#) from the beginning of the line and if you wish, set the startup event to some other au file. The format is:

       *Audio [event] [sound]

Do that for the rest of the Audio events, and as one AfterStepper put it, you'll literally add new bells and whistles to AfterStep.

In some versions of AfterStep, sound is disabled by default. You can get the audio module to work in two ways. The first is to open the "Start" menu, click on "Modules", and then click on "Audio". The other is to start the Audio module in your autoexec file. Just add the line

        Module  "I"     Audio

to your autoexec file.

The Audio module was apparently broken in some versions, but nobody seems to know why. You should make sure you have the latest version of AfterStep before asking why your Audio module does not work: all current versions seem to be functioning correctly. If you are still having trouble, and you've read this and followed the instructions carefully, you might want to ask questions on the mailing list.

You should also be aware that the configuration of the Audio module has undergone some changes. So, if you've changed your version of AfterStep, and Audio is suddenly not working for you, check that you removed your old configuration before asking what is wrong.

Finally, if you are getting errors complaining about an incorrect path, check your base.{yourbppnumber}bpp file. The AudioPath used to be set in the base file, but it is now set in the configuration file for the Audio module. This change affects versions since 1.4.5.0; but 1.4.5.0 was accidentally released with the AudioPath configured in the base file. Fix the definition, and the problem will go away.


Next Previous Contents