# XBanner Users Manual

Last revised: 25-April-1997

# Table of Contents

1. Purpose Of XBanner
2. Legal Information
3. Tested Platforms
4. Features and Limitations
5. Compiling XBanner
6. The Programs In This Package
7. Installing XBanner into XDM's scripts
8. Setting Up Default Configuration Resources
9. Creating A New Configuration Resource File
   - Resource Types
10. Design Considerations
11. Getting Scalable Fonts
12. Using Class Names For Multiple Configurations
13. Configuring XBanner
    - The Text
      - The label Resource
      - The font Resource
      - The placement Resource
      - The x and y resources
      - The effect Resource
      - The underlined Resource
      - The underlineColor Resource
      - The underlineThickness Resource
      - The glint Resource
      - The glintSpeed Resource
      - The glintMin / glintMax Resources
      - The glintTimeMin / glintTimeMax Resources
      - The cornerMask Resource
    - The Background
      - The bgStyle Resource
      - The Fill Options
      - The bgFill Resource
      - The autoFillBg Resource
      - The doPixmap Resource
      - The pixFile Resource
      - The Pixmap Location
    - The Color-Cycling Options
      - The cycleColors Resource
      - Selecting Cycle Speed
      - Changing Cycle Direction
    - Miscellaneous Options
14. XBanner On The Net
15. Tips And Tricks
    - Speed Issues
    - Other Ideas
16. Credits
17. Contacting Me

## Purpose Of XBanner

The purpose of XBanner is to make the XDM login screen beautiful, as opposed to the dull and gray login screen that the vanilla XDM gives. The idea came from Digital's login screen which displays the Digital logo nicely. I use Linux and wanted to run XDM, but XDM's login screen was such a boring thing, so I wrote XBanner!

XBanner is definitely not Linux-specific! It is not even Unix specific. Please refer to the Platforms section about tested platforms.

## Legal Information

XBanner is considered postcardware. This mean that all I ask is that if you like it, send me a postcard. This is the only tangible thing I know that I can show people and say 'This is what I get out of it'. Otherwise XBanner is free.

I am releasing this program to the public, in the hope that many people use it, and enjoy it. To make sure it stays free, I decided to distribute this program under the GNU Public License (GPL) version 2.

All I ask is that you contact me and tell me you are using it. My preferred way is a postcard of your home area. This is just an encouragement thing. It will encourage me to continue and enhance XBanner and maybe even add new effects, etc. My addresses:

Email - amitm@netvision.net.il.

(Thanks!)

I would also like to specify that I wrote this for myself, and that I disclaim all and any liability bla bla bla... etc. In short:

`#include <Legal/disclaim.h>`

## Tested Platforms

XBanner can compile under any X11 environment from release 4 (X11R4) and up. XBanner can also display its graphics on any server that conforms to release 4 or up.

Before compiling under X11R4, see the Compilation section for details about compiling in R4 environments.
If displaying over to a X11R4 server is desired, a large font (or fonts) is needed, which are difficult to come by since X11R4 did not support true scalable fonts. The same is true for OpenVMS users. The OpenVMS X-Server is an X11R5 server, but does not support scalable fonts. In general, I am able to help by taking a freely-available scalable font, and generating a `.BDF` file from it. Please email me for help on this.

Here is a short list of platforms I have tested XBanner on, and ones I have received success reports with:

- Linux (x86) running XFree86 3.2 / Metro-X 3.1 / Accelerated-X (X11R6)
- Linux/SPARC with XFree86 (X11R6)
- Linux/AXP with XFree86 (X11R6)
- Solaris 4.3 running OpenWindows (X11R5)
- Ultrix 4.4 running DEC's Xwst3d (X11R4)
- Digital Unix v3.2c (X11R5) / V4.0 (X11R6)1
- AIX v3.2.5 (X11R5)
- SGI IRIX v5.3 (X11R5)2
- VAXstation 4000-60 running OpenVMS 6.1 (X11R4/5)3
- DEC-3000 AXP running OpenVMS 7.0 (X11R5)3

Compilation under different environments is encouraged. Any success report will be listed with the person's name attached. Please email any reports to me. (Thanks!).

Notes:

1. In CDE environments there is a problem with the CDE login box thingy. You will have to move back to the old XDM `:-(`
2. This report comes from Dejan Vucinic <dejan@mit.fnal.gov>, feel free to contact him.
3. Compiling under OpenVMS requires DEC-C. Also, some of XBanner's features are not supported in OpenVMS. See the file `README` in the `VMS/` directory for complete details.

## Features and Limitations

XBanner contains many features. This list includes any features which have non explicit limitations.

1. Color Cycling of all sorts depend on Read/Write color cells in the X colormaps. These are usually not available at all in 15/16/24/32 bit displays. So if your display is set to 15/16/24/32 bits of color (HiColor / TrueColor) you will not be able to use Color Cycling, and attempting to do so will make XBanner generate a warning message, and of course, disable this feature.
2. The Expose events handling is tricky. You can use it to have XBanner redraw areas that have been exposed. It is especially useful when using XDM-3D and setting it to move the login box every few seconds (like Windows NT does). However, if you are invoking XBanner more than once to display extra graphics, make sure that only the last invocation is handling expose events.
3. At present, XBanner can only render one line of text. A future version will allow multi-line text.
4. The included `Imakefile` is not complete. It should contain many things more.
5. XBanner does not work well with CDE.

## Compiling XBanner

There are 3 ways to compile XBanner. The simplest way should be to use the `xmkmf` utility which uses the supplied `Imakefile`. However, the preferred method is the second method described below. After `xmkmf` is finished, type `make` to compile, or `make install` to install. You might want to edit the `Imakefile` to ensure the install directory is correct. However, the `Imakefile` is not yet complete, nor well checked. This ought to work in any system, but is not yet tested under any platform other than Linux. If you have X11 set up properly, this should work. If it works for you, please email me.

The second method is through the supplied `Makefile`. Typing `make` after checking the files that affect the compilation, should be enough.

In general, there are 3 files which govern XBanner's compile-time options. The file `xbanner.h` contains all the defaults and does not affect compilation. XBanner's default values can be changed from there.

The second file is `xb_config.h` which contains the configuration options. This actually changes the output binary according to compile-time conditionals. Here is a detailed description of the options included in `xb_config.h`:

Definition | Meaning / Who should use
--- | ---
`#define PRGCLASS "XBanner"` | This selects the program class-name. All resources can be looked for under this class-name. If changed to '`X_Logo`' then one could specify resources like '`X_Logo.Thickness: 1`' but XBanner will not recognize '`XBanner.*`' resources.
`R4_RESOURCES` | This definition will use X11R4 Resource-Manager functions. This should only be used when compiling in a R4 environment.
`EXPLICIT_REGISTER_VARIABLES` | This is good for systems that don't have GCC. If using GCC, then the -O2 option will simply ignore the `register` keyword, because GCC thinks it probably knows better. I have experimented a little, and found which routines could use explicit `register`-defined variables, and set them. This speeds up a bit on systems that don't have GCC.
`HAS_USLEEP` | If this line is commented out, XBanner will compile its own version of `usleep()`, because some systems don't have it (Ultrix for example). Linux has `usleep()`.
`HAS_STRCMPI` | If your system has the `strcmpi()` function or `strcasecmp()`, then make sure this line is not commented. Linux users should leave this line not commented.
`INT_PLASMA` | Commenting out this line causes XBanner to use floating-point arithmetic to generate PlasmaClouds. This is about 40% slower on Pentia, but looks a bit better. For Pentium-166MHz, or a 166MHz AlphaStation, this is probably not an issue.
`OTHER_FRAND()` | Under Linux, XBanner uses the Linux C-Library `drand48()` function to generate random numbers for the PlasmaCloud effects. On other systems, it approximates this by using `rand()`, casting the result to float, then dividing by `RAND_MAX`. This is slower and not as accurate. If your system has another function that generates random floating-point numbers between 0.0 and 1.0, define it here. Example: `#define OTHER_FRAND() drand48()`

The last file one might want to edit is the `Makefile`. There are 3 things to edit in the `Makefile`:

1. The command definitions for the variables `CC`, `RM`, `INSTALL`, `CP`, `TAR`, and `GZIP`. Most importantly, if your system doesn't have `gcc`, define CC differently! Please make sure GZIP is defined as '`compress`' if your system doesn't have the `gzip` utility.
2. The directory definitions for `BINDIR` (where the binary gets installed), and `XLIBDIR` (where your `libX11.a` resides).
3. The XPM support defines (`XPM` and `XPMLIB`). Simply comment them out if your system doesn't have the `XPM` library. If your `libXpm.a` is not in `ld`'s library path, it is possible to change the definition from

         XPMLIB  =-lXpm

   to be:

         XPMLIB  =/usr/home/amitm/LIBS/libXpm.a

   or something similar.

That's it. Type '`make`' and it should compile. Then '`make install`' will strip and copy the binaries to the binary directories. Note that the `random_effect` binary is not installed by '`make install`'.

The last way is by hand. See the `QuickStart` file for this.

## The Programs In This Package

`xbanner`
  This is the main executable. It performs all the graphics, resource-parsing, coloring etc. as well as the glints, and color-cycling, if requested.
`freetemp`
  Usually when an X application exits, all the resources it had allocated on the X server (colormap entries, fonts, cursors, etc.) are made available immediately to all other applications. XBanner prevents this from happening and asks the server to keep those resources temporarily after it exits. The `freetemp` program will free those resources. It is mandatory to use `freetemp` if using any of the Glint / Linger / Color-cycling features.
`xb_check`
  This is a small utility program that reads `stdin` expecting a resource-file format. It looks for lines resembling XBanner resources and tries to check that they are valid. (I haven't tested this on OpenVMS yet).
`random_effect`
  This utility reads a file that lists different XBanner resource-files, selects one by random, and runs `xbanner -file <res-file>` for it.

## Installing XBanner into XDM's scripts

These instructions are written for people of the lowest level of experience, so if you feel you are above this level, simply follow the numbered steps (lines in bold). It is assumed that you already successfully compiled XBanner and it is already in the path.

For Debian 1.1 users, a Debian package (`xb_13.deb`) is available in the FTP directory and from the download page. If you are using the Debian distribution, and have Debian 1.1 already installed, please click here.

If you have Digital Unix, you need to disable DEC's greeter library. Click here to read the `README.DEC_Unix` file on how this is done. After doing this, just follow the normal XBanner instructions. (This was not tested under CDE!).

OpenVMS installation instructions are in the file `XBanner1.3/VMS/README` in the source distribution.

If the following does not work on your system, or if you are unsure, you can take a look at the file `samples/_other_ideas/My_Home_Setup.tar` which contains the entire setup for my home system including the `Xsetup_0` and `Xsession` scripts, so you can rummage through them.

Installing XBanner to work with XDM the way it should is fairly simple. The process involves modifying 2 script files, that's it.

A bit about XDM:

XDM is a short for XWindows Display Manager. As such it is a tool for managing different displays. Managing means that XDM takes over the display, does several initializations, puts on a login-box, and let's the user log in to the machine it is running from. After the user is successfully authenticated against the password file, XDM runs a script which eventually loads the window-manager. When the window-manager exits, the script ends, XDM does a reset, and starts over (initializations, login-box, etc.).

We need to put several lines into the script which XDM runs to do the initializations. This is most usually placed in `/usr/lib/X11/xdm` but some Linux distributions have it at `/etc/X11/xdm`. The file is usually called `Xsetup_0`. But these are just the usual, not necessarily the right ones for your system. Here's a step-by-step guide to finding these files:

Step 1: Type '`more /usr/lib/X11/xdm/xdm-config`'
  Look for two lines. The one begins with:

      DisplayManager._0.setup:

  The other begins with:

      DisplayManager*session:

  Note the names of the files they point to. These will usually be `Xsetup_0` and `Xsession`. I will hereafter refer to these by those names.

These are the files we need to change. The one is the initialization script, which on some machines runs a `xconsole` so you'll have one with the login-box.

Step 2: Edit `Xsetup_0`
  You should add 2 lines into this file. The first is a line that runs `freetemp`. This is a precautionary measure, but will save you if something really bad happened when the previous session ended. The second line is to run `xbanner` itself. Notice that the directory where `xbanner` and `freetemp` are installed in might not be in the path. In this case, specify the complete path to the programs (i.e. `/usr/local/bin/X11/xbanner`).
  Both lines ought to appear around the end of the file.

Step 3: Edit `Xsession`
  A line to run `freetemp` from here as well. This should be done near the top of the file. Preferably before anything else.

## Setting Up Default Configuration Resources

The purpose of an `app-defaults` is to serve as a default configuration. Some of the things that XBanner tries to do require some resources to be set for them to work properly.

The supplied `samples/XBanner.ad` can be used as a good default (assuming it works flawlessly for you), as well as a good starting point for new setups. After typing `make` try to test this setup by typing `./xbanner -file samples/XBanner.ad`. If the font cannot be found, refer to the fonts section.

After you have edited it to suit your taste, copy the file `XBanner.ad` to `/usr/lib/X11/app-defaults`, and make sure you rename it to `XBanner` and not leave it there with the `.ad` suffix.

## Creating A New Configuration Resource File

The simplest way to create a new resource file is to take `XBanner.ad` and work your way by modifying it. This is good because `XBanner.ad` contains a list of supported keywords near every resource that takes keywords.

However, sometimes you want to create your own resource file. First, please look at the different types of resources that XBanner can accept. The same type-names are used in the Resource Reference and in fact throughout the documentation.

### Resource Types

Numeric
  This is an integer number. Some resources have bounds-checking. Those that don't will most likely work OK anyway.
Float
  This is a floating-point number. While XBanner uses the `atof()` function to read this value, and allows the use of scientific notation, the `xb_check` program checks it itself, and allows only the simple XX.YY notation.
Boolean
  A true/false resource. See the Resource Reference about this.
String
  This is simply a string of characters. Anything can be used. I don't believe anyone will use a string of more than the internal limit because even on a 1600x1200 screen using the smallest font imaginable, you'd still get less than 1024 chars.
Keyword
  This is a character string comprising a special name known to XBanner. The Resource Reference lists the possible keywords accepted by each resource.
Keyword-list
  This is a comma-separated list of Keyword's.
ColorSpec
  This can be the name of a color known to the X-Server, or a RGB specification. Specifying RGB values can be done either as '`#RRGGBB`' or '`#RRRRGGGGBBBB`'. The RGB components are given in Hexadecimal.
GradSpec
  This is a comma-separated list of ColorSpec's.

## Design Considerations

There are quite a few things to consider when designing a login screen. Here is a list of things it's good to keep in mind:

1. The type of display you are running on. If you have a TrueColor display, then you cannot use any of the color-cycling features, since TrueColor displays do not support Read/Write color-cells.
2. If you have a PseudoColor display (almost any 256-color X-Server is a PseudoColor display), then you have the color-cycling features, but you are limited in the number of colors that you can use.
3. Some people use `xdm-photo`, a XDM variant that shows people's faces, and you click your face, and type the password. If you are using `xdm-photo`, you are probably even more limited in the number of colors you can use. Also, it was brought into my attention that `xdm-photo` draws its login-box before running the `Xsetup_0` script, and this causes various problems with image-type effects (see below).
4. Which fonts do you have? Do you have Adobe Type1 fonts? Do you have Speedo fonts? If you don't have real scalable fonts, then only very squarish fonts will look OK. See the fonts section.
5. Machine speed is a crucial factor. Some effects are very slow. Notably, Coin, and the PlasmaCloud effects are very slow.
6. Don't over colorize. You must select your login screen colors with taste. Filling the screen with a zillion colors and gradients can be dazzling, but annoying to see after a while.
7. I cannot over-emphasize this: Do NOT make excessive use of color-cycling! This tends to be extremely irritating. I suggest using slow-speed cycles and do it on "shallow" color gradients (e.g. gradients from blue to dark-blue, not from black to white).

## Getting Scalable Fonts

XBanner is a neat program, and does a whole lot of things. But it needs a good scalable font to do all the wonders that it can. What is a scalable font? A scalable font is a font that has an attribute that defines it as scalable. It might be a vector-font which means it will look smooth at any size, or it might be a set of bitmap fonts for various sizes, which the X-Server will pick from and scale up or down to get the exact size you require.

So how do you know if you have scalable fonts at all? How do you know which ones are scalable? All of these questions are answered in a separate document I wrote. Here it is. Please read it thoroughly and make sure that you have scalable fonts, and you know their names before we can continue with the rest of this guide.

## Using Class Names For Multiple Configurations

X11 resources are the main system of passing options to an X11 application. In X11 each resource has a class-name. An application has its instance-name (usually the name of the binary executable file) and a class-name. An application can refer to a resource name (signifying a configuration option), through its class-name or its instance name.

Usually, class names have their first letters capitalized. Application class-names are also capitalized, unless the application name starts with X in which case, by convention, the first 2 letters are capitalized. Hence XBanner's instance name is usually '`xbanner`' and its class-name is usually '`XBanner`'.

In general, instance names take precedence over class names. XBanner is no exception to this rule. It is possible to exploit this mechanism in various ways. For instance, it is possible to create a single resource file, that will bind in it all the necessary information to create a two-line login-screen.

Here is an example resource file that does exactly that. This file assumes that you have a link from `xbanner` to `xb_line2` and that the script runs `xbanner` before `xb_line2`:

    ! XBanner 1.3 resource file
    !
    ! Resources common to both lines
    !
    XBanner.DefOffset:	20
    XBanner.ShadowOffset:	12
    XBanner.ShowErrors:	True
    XBanner.Font:		-*-charter-bold-i-normal--76-*-*-*-p-*-iso8859-1
    XBanner.ShadowColor:	DarkBlue
    !
    ! Resources for first line
    !
    xbanner.label:		This is my first line
    xbanner.effect:		FgPlasma
    xbanner.fgPlasmaGrad:	Red,Yellow
    xbanner.bgStyle:	TopDown
    xbanner.bgGrad:		Red,Yellow
    xbanner.barSize:	12
    !
    ! Resources for second line
    !
    xb_line2.label:		This is the second line
    xb_line2.effect:	Shadowed-Outline
    xb_line2.shadowColor:	White
    xb_line2.HiColor:	Red
    xb_line2.Surround:	4

Let's analyze what I am doing. The common options use the `XBanner` application class name, and resource class names. This provides for specific overrides by the instance names. The lines

    XBanner.DefOffset:	20
    XBanner.ShadowOffset:	12
    XBanner.ShowErrors:	True
    XBanner.Font:		-*-charter-bold-i-normal--76-*-*-*-p-*-iso8859-1
    XBanner.ShadowColor:	DarkBlue

will set the default minimum distance from the screen edges to 20 pixels, define the shadow right- and down- offsets from the text to be 12 pixels, make both invocations of XBanner (one as `xbanner` the other as `xb_line2`) show errors / warnings if any exist, select a font, and a ShadowColor.

The next bit defines the label for the invocation as '`xbanner`' as well as the effect, the color-gradient required by that effect, and the background style and its required color gradient.

I then define the options specific to the invocation as '`xb_line2`'. This includes overriding the ShadowColor with its instance name, and defining Surround which is a common class.

## Configuring XBanner

There are four almost independent parts to XBanner. They are The Text, The Background, Color Cycling, and Miscellaneous.

Note: Resources are given in their instance-names, with the "`XBanner.`" prefix stripped. You may click each resource to find related resources, usage and keyword information.

### The Text

The Text part is subdivided into these categories:

- `The` `Label`
- `The` `Font`
- `The` `Placement` `On The Screen`
- `The` `Effect` `Rendered`
- `The` `Underline` `Feature`
- `The` `Glint` `Feature`

#### The `label` Resource

This resource selects the text that will appear on the screen. You may use double-quotes to add leading spaces.

Using an empty string (e.g. `XBanner.Label: " "`) is also allowed, in which case XBanner will choose the `fixed` font which is guaranteed, and force the effect to be `None`.

The label text can contain environment variables. Use `$VAR_NAME` or `${VAR_NAME}` to insert the environment variable value into the label text. To get a single `$` sign, use `$$`.

The above is especially useful to display the operating system name and version without changing the resource file every time you change versions. The following script does that in the most simplistic way, through command-line switches, but you can use the `label` resource as well.

For `sh`-style shells (`sh`, `ksh`, `bash`...):

    #!/bin/sh
    OSVERSION=`uname -s -r`
    xbanner -label '$OSVERSION'

For `csh`-style shells (`csh`, `tcsh`...):

    #!/bin/csh
    setenv OSVERSION `uname -s -r`
    xbanner -label '$OSVERSION'

#### The `font` Resource

Use this resource to choose the font for the text that XBanner draws. For more information about finding fonts click here.

#### The `placement` Resource

This chooses where the text will be drawn. Most of the placement types are pretty self-explanatory:

       TopLeft     TopCenter      TopRight

                     Center

       BottomLeft BottomCenter BottomRight

The other 2 types are:

`XY`
This simply uses two other resources, x and y to select the location of the top-left corner of the text's bounding-box.

`CenteredOnY`
This uses only the y resource to select the location of the top-line of the text's bounding-box, and centers the line on that Y position. You might want to try running XBanner from the command-line with `-showcalc` command line option, which displays information about the location of the top-left corner of the text's bounding-box, and the size of the bounding-box.

#### The `x` and `y` resources

These resources choose the location of the text. The `x` resource chooses where the left side of the text's bounding box will be. The `y` resource chooses where the top line of the text's bounding box will be.

#### The `effect` Resource

This the resource that governs how the text will look. If it will have a shadow or not, etc. There are currently 3 major types of resources. The effects marked simple are effects that use only X11 drawing functions, all on the server-side. The effects marked image are effects which transfer an image of part of the screen from the X-Server to the program, manipulate the image using pixel-functions, and then copy the processed image back. These are usually slower.

Each rendering style (effect) is affected by different resources, depending on what parts of that effect can be controlled. Here is a list of the effects, each with an explanation of what it is and reference to the resources that govern its behaviour. Notice that all effects can be underlined, and therefore the underlining feature appears separately after this section.

`3D-Shadow` (simple)
  This effect draws the text, outlined, with several copies of it beneath it as shadows. The shadows' outlines are a different color.
  The following resources apply:
  - `foreground`
  - `hiColor` - front text outline color.
  - `shadowColor` - outline color of text beneath front text.
  - `shadowXOffset` / `shadowYOffset`
  - `shadows`
  - `surroundMin` / `surroundMax`
`Backlight` (image)
  This effect simply draws many outlines around the text. Each outline is given a different color according to a color gradient you select.
  Resources:
  - `foreground`
  - `thickness`
  - `backlightGrad`
`Coin` (image)
  This effect looks very much like the `StandOut` effect, but here the text has a thin "rim" of opposite colors. The rim is always 1/3 of the `thickness` value.
  Resources:
  - `foreground`
  - `hiColor`
  - `shadowColor`
  - `thickness`
`Fade` (image)
  This one is the same as `Backlight` only the gradient is drawn only to pixels which are diagonally right and down from pixels of the text.
  Resources:
  - `foreground`
  - `thickness`
  - `fadeGrad`
`FatText` (image)
  This effect draws outlines or rather inlines. It recolors the outer lines of the text, going inwards.
  Resources:
  - `foreground`
  - `fatTextGrad`
  - `thickness`
  - `shadowColor`
  - `shadowXOffset` / `shadowYOffset`
`FgGrad` (image)
  This effect simply recolors the text such that there is a visible color gradient from the top line of the text to the bottom.
  Resources:
  - `fgGradGrad`
  - `fgGradBarSize`
  - `shadowColor`
  - `shadowXOffset` / `shadowYOffset`
`FgPlasma` (image)
  This effect is like having your text become a window into an area filled with PlasmaClouds.
  Resources:
  - `shadowColor`
  - `shadowXOffset` / `shadowYOffset`
  - `fgPlasmaGrad`
  - `fgPlasmaGrain`
  - `fgPlasmaNCol`
`FunnyOutline` (image)
  This effect is like the `Outline` effect only that instead of coloring outside the text we color inside the text.
  Resources:
  - `foreground`
  - `hiColor`
`None` (simple)
  This simply draws the text as-is. You use the `foreground` resource to choose the color of the text.
`Outline` (simple)
  This draws an outline around the text. The color of the outline is chosen by the `hiColor` resource. Use the `surroundMin/Max` resources to select the form of the outline.
`PopArt` (image)
  This draws 1-pixel outlines with colors alternating between `hiColor` and `shadowColor`.
  Resources:
  - `foreground`
  - `hiColor`
  - `shadowColor`
  - `thickness`
`Shadow` (simple)
  Simple text with a simple shadow under it.
  Resources:
  - `foreground`
  - `shadowColor`
  - `shadowXOffset` / `shadowYOffset`
`Shadowed-Outline` (simple)
  This is simply the `Outline` effect with a shadow like in the `Shadow` effect.
  Resources:
  - `foreground`
  - `hiColor`
  - `shadowColor`
  - `shadowXOffset` / `shadowYOffset`
  - `surroundMin/Max`
`Shake` (image)
  This effect makes the text seem very shaky, as if vibrating. The idea came from the infamous "Nervous? Tense? Tired?" sign. This effect is not very controllable at the moment. Should such request come up, I will add some options.
  Resources:
  - `foreground`
`StandIn/Out/2` (image)
  The `StandOut` effect basically looks like Motif buttons. It makes the text seem 3D. This is done by drawing outlines then figuring which angles need to get a light color and which get dark. The `StandIn` effect is the same with the colors inverted. The effects `StandIn2` and `StandOut2` are the same as their counterparts with one difference: the coloring is done into the thickness of the font not outside it.
  Resources:
  - `foreground`
  - `hiColor`
  - `shadowColor`
  - `thickness`
`Thick` (simple)
  This is simple thick text. The letters appear thick.
  Resources:
  - `foreground`
  - `hiColor`
  - `shadowColor`
  - `thickness`

#### The `underlined` Resource

This is a boolean resource that selects whether or not an underline will be drawn under the text. You can choose its color, and its thickness:

#### The `underlineColor` Resource

This sets the color of the underline. A special keyword '`FGC`' is recognized and makes the underline use the same color as the `foreground` color. This is good because some of the effects get rendered on the underline in this case. For example, if you use a `.foreground: green` and `.underlineColor: green` in the `StandOut` effect, then you will see that the text looks nice and 3D, but the underline is a simple line. If you use the '`FGC`' keyword for the `underlineColor` then the underline will be 3D as well.

#### The `underlineThickness` Resource

This positive value sets the line width of the underline.

#### The `glint` Resource

This is a boolean resource that enables the glint feature, which makes the text appear to glint. The stars of the glint are white, and they appear every random number of milliseconds which greater or equal to the `glintTimeMin` resource and equal or less than the `glintTimeMax` resource. The speed of appearance for each glint star is selectable through the `glintSpeed` resource. The size of each star is selected randomly in the range `glintMin` - `glintMax`.

One also has control over which corners are allowed to glint through the use of the `cornerMask` resource.

#### The `glintSpeed` Resource

This resource selects the speed of appearance (and disappearance) of the glint stars. There are 3 different possibilities:
Positive Value - simply makes the star grow in larger steps.
Negative Value - runs an idle loop for delay, which is different for each computer.
The Value Zero - causes the star to blink - to appear at max size and disappear.

#### The `glintMin` / `glintMax` Resources

These select the maximum / minimum size for the glint stars.

#### The `glintTimeMin` / `glintTimeMax` Resources

These resources select the minimum and maximum amounts of time between glints. This is selected in milliseconds.

#### The `cornerMask` Resource

This resource is a keyword-list resource which defines which corners can have glint stars on them. The Resource Reference has the complete description of the keywords. You can use any combination of keywords to produce the desired results.

Since the default is all corners, to glint only on upper-right corners you would have to use:

    XBanner.cornerMask:	NoDownLeft,NoDownRight,NoUpLeft

### The Background

The Background and its related features is divided into the following categories:

- The Style Of Background
- The Fill Options
- The Pixmap-Paste Feature

#### The `bgStyle` Resource

The `bgStyle` resource selects the type of background that XBanner will render. Listed here are the allowed keywords and their related resources. Notice that all of the background styles require the `bgGrad` resource and it is therefore not mentioned. The only exceptions are the `None`, `Fill`, and `BgPix` background styles.

For a complete description of the background styles, see the Resource Reference.

Here's the list of supported background style:

`BgPix`
  This takes a `.XPM` file and tiles the entire background with it. Use the `.bgPixFile` resource to set the file name.
  (Does not use `.bgGrad`)
`Fan`
  This keyword makes XBanner draw a fan. You can control the fan with the following resources:
  - `.bgGradRepeat`
  - `.barSize`
`Fill`
  This simply fills the background with a single color selectable through the .bgFillColor resource.
  (Does not use `.bgGrad`)
`LeftDiagonal`
  This background style is affected by the following resources:
  - `.bgGradRepeat`
  - `.barSize`
`LeftRight`
  This background style is affected by the following resources:
  - `.bgGradRepeat`
  - `.barSize`
`LeftSplit`
  This background style is affected by the following resources:
  - `.bgGradRepeat`
  - `.barSize`
`None`
  This suppresses background rendering (but not the `bgFill` feature).
  (Does not use `.bgGrad`)
`Plasma`
  This background style uses the following resources:
  - `.plasmaNumColors`
  - `.graininess` - sets the graininess factor.
`RightDiagonal`
  This background style is affected by the following resources:
  - `.bgGradRepeat`
  - `.barSize`
`RightSplit`
  This background style is affected by the following resources:
  - `.bgGradRepeat`
  - `.barSize`
`Ripples`
  The controling resources for the `Ripples` background style are:
  - `.ripples` - the number of ripples.
  - `.rippleColors`
`TopDown`
  This background style is affected by the following resources:
  - `.bgGradRepeat`
  - `.barSize`

#### The Fill Options

The fill options are basically the ability to fill the screen and set the root window's background color before rendering any complicated background effect. This is useful so that when XDM removes the login-box, the now exposed area is repainted in some color, not the usual gray.

There are 2 different things you can use: `bgFill` and `autoFillBg`.

#### The ```bgFill` Resource

This resource, when set to True simply tells XBanner to fill the background before drawing any colorful patterns on it. The color used for this filling is set by the `bgFillColor` resource.

#### The ```autoFillBg` Resource

This resource does an interesting job. Its work can be seen as to set `doPixmap: True` and select the `bgFillColor` automatically. The selection of the color is done by simply using a color from the background's color gradient whose index is half of the number of colors in the gradient.

The above mechanism is especially good for situations when the login box is approximately at the center of the screen, the gradient contains only 2 anchors (from one color to another, but not more), and these colors' overall brightness is not too different.

But why do that? The answer is simple. If the above conditions are met, then when the login box disappears, the resulting empty box seems to have a color gradient that is opposite that of the rest of the screen. This is a "feature" of your eyes and brain.

#### The `doPixmap` Resource

This boolean resource tells XBanner that you want to load a pixmap file (`.XPM`) and paste it somewhere on the screen. This handles the XPM '`None`' color specification properly. You need to specify the file name and the location on screen.

#### The `pixFile` Resource

This is a string signifying the absolute path to the pixmap you wish to load and display on the screen. This pixmap is displayed after all else is drawn.

If this string begins with the '`@`' character, this name is instead interpreted as the name of a file containing a list of pixmaps to display. Each line contains a full pathname, followed by a space, the `X` position of the pixmap, another space, and the `Y` position. Nesting is not allowed, error condition checks are minimal.

#### The Pixmap Location

The location on screen of the pixmap can be set using the `pixmapX` and `pixmapY` resources.

Note that these resources have no effect if you use a pixmap list-file, since that file contains the `X` and `Y` positions for each pixmap listed in it. See the `pixFile` resource.

### The Color-Cycling Options

Color cycling is achieved by specifying the program entities to be cycled, and then modifying the cycle speed, and direction if necessary.

#### The `cycleColors` Resource

In general, the different things that you can cycle are all the ones that use color gradients. Well, almost all of them.

Use a comma separated list of the following keywords:

  `Backlight`
This cycles the `.backlightGrad`.
  `BG`
Cycle the background. This actually cycles the `.bgGrad`. Notice that the `BgPix`, `Fill` and `None` background styles cannot be cycled.
  `Fade`
This cycles the `.fadeGrad`.
  `FatText`
This cycles the `.fatTextGrad`.
  `FG`
This cycles the `.fgCycleGrad`. The effect of this is that the entire foreground color of the text changes along a color gradient.
  `FgGrad`
This cycles the `.fgGradGrad`.
  `FgPlasma`
This cycles the `.fgPlasmaGrad`.
  `None`
This suppresses all color cycling.

#### Selecting Cycle Speed

The value of `.cycleSpeed` resource divides the time that XBanner waits between consecutive cycles. Since each such wait is followed by a check to see if `freetemp` has been called, the overhead is huge. This means that if `.cycleSpeed: 2` caused the cycling speed to double, it still does not mean that `.cycleSpeed: 4` will be 4 times faster.

#### Changing Cycle Direction

There are 2 different resources which set the direction of color cycling. Usually only the `.reverseCycle` will be used. But for overriding reasons a `.forwardCycle` also exists.

A new feature in XBanner 1.4 enables you to make the rendering effect of the text or the background's color gradients change their cycling direction every fixed number of steps. Use the `.effectSteps` resource to select the number of steps for the foreground color gradient, and the `.bgGradSteps` resource to select the number of steps for the background.

### Miscellaneous Options

`.defXOffset` / `.defYOffset`
  These two resources are the size of the margin on every side where the text is not allowed to appear. This should solve some bad cases where XBanner mistakenly tries to draw outside the screen.
`.linger`
  This asks XBanner to leave a process running with an open display until `freetemp` gets run. This option must be set to True if XBanner is generating a background for a XDM Chooser. Using Linger or Color-Cycling implies this resource is set to True.
`.expose`
  This asks XBanner to leave a process running which will redraw areas of the screen which become exposed (the login box for example disappears when you succeed in logging in). You will have to run `freetemp`!
`.showErrors`
  This enables a feature of XBanner that draws a single line of text close to the top-left corner of the screen, indicating any warnings / errors that have occured. Enabling this means that if something goes wrong, the user will start getting a white rectangle with text inside it stating the problem.
`.dumpRes`
  You may have XBanner dump the entire set of resources that it "sees" to a file. Set this to True, and select the file name with the `.dumpResFile` resource.

## XBanner On The Net

The XBanner Home Page is at: http://physics.fullerton.edu/XBanner/

Anonymous FTP is at: ftp://physics.fullerton.edu/pub/Linux/XBanner/

Other FTP sites are ftp://sunsite.unc.edu/pub/Linux/X11/xutil and all its mirror sites.

## Tips And Tricks

### Speed Issues

1. All of the effects using the `.thickness` resource are slow. Decreasing the size of the `thickness` resource helps a lot.
2. The `Coin` effect is much slower than `StandOut` (and its variants) althought it is very very similar. You should use `StandOut` instead if things are too slow.
3. A large scalable font takes time to scale up to a large size. Try a smaller font for better speed.

### Other Ideas

1. Many of the effects get an interesting touch by removing the shadow. This is done simply by setting `.ShadowOffset` to zero.
2. Try experimenting with asymmetric outlines. Try a foreground color equal to the background color, with a `.surroundMin: 0` and `.surroundMax: 4` and the outline color in sharp contrast with the background color.

## Credits

I will attempt to list here the many who have helped, donated ideas, and time.

First, thanks to Ofer Gan and Eli Lopian without whom I would not have started learning X11 programming in the first place.

Other special thanks go to a very special friend of mine: Oren Tirosh <orenti@hiker.org.il>. Oren has been helping me with XBanner since day one. His ideas have influenced the majority of the code. Oren's contribution includes the `StandOut` effect (and all derived work), the `Ripples` background style, and many many more.

Others who have given ideas, reported important bugs, made suggestions or contributed in other ways:

Frank Wuebbeling <wuebbel@escher.uni-muenster.de>, Marc <mwelz@cs.uct.ac.za>, Christopher Everett <ceverett@cyberramp.net>, Kyle Ferrio <kylef@engin.umich.edu>, Thilo Wunderlich <c15o@zfn.uni-bremen.de>, Rich McClellan <richmc@seneca.fullerton.edu>, Zachary Sigma Vonler <zvonler@jove.acs.unt.edu>, Chris Yeo <yeo@duke.usask.ca>, Ben Spade <bspade@asic.qntm.com>, Rubinstein Dmitry <dimrub@nsof.co.il>, Prof. Dasharath Singh <hsdsingh@hss.iitb.ernet.in>, Eric Darchis <Eric.Darchis@ping.be>, Dejan Vucinic <dejan@mit1.fnal.gov>, Landon Boyd <landon@ccn.cs.dal.ca>, Uwe Khatchikian <khatchik@buche.informatik.uni-dortmund.de>

And a few others.

## Contacting Me

Here are complete details for contacting me:
Amit Margalit

Email: | amitm@netvision.net.il

Snail-Mail:

Home: | +(972)-9-7417996
Work: | +(972)-9-9593140
Fax: | +(972)-9-9546325 Please ATTN: Amit Margalit

Back to documentation index.

Back to top.
Please email me for any comments.