SYNOPSISslrnface [ -xOffsetChar x_char_offset ] [ -yOffsetChar y_char_offset ] [ -xOffsetPix x_pixel_offset ] [ -yOffsetPix y_pixel_offset ] [ -XFacePad left_padding ] [ -ink fg_color ] [ -paper bg_color ] [ -padColor pad_color ]
DESCRIPTIONThe slrnface helper utility can be used from slrn(1), mutt(1) or similar programs to show X-Faces in Usenet articles or mail messages when those programs are run in an X11 terminal emulator. This utility is not intended to be run directly from the command line. Instead, the master programs should be configured to invoke slrnface when appropriate.
Different terminal emulators have different screen layouts. Some might have scroolbars (on either side), a menubar or something else. Terminal window which slrnface uses might contain some of these "decorations," but it is impossible to determine if that is the case at run time. Therefore it is impossible to determine the exact location at which the X11 window with the X-Face image should be placed. Default hardcoded values are appropriate for several terminal emulators, but not for all of them. The placement can be controlled by command line arguments, but it is suggested to use X resources for this task.
While slrnface is running and showing X-Face, the left mouse button can be used to move the window.
RESOURCESThe slrnface helper is controlled by the resources set for the terminal emulator in which it runs, not for the slrnface class or instance. That is because correct execution entirely depends on the master program and the geometry of the terminal emulator in use and has little to do with slrnface itself. All resources have a command line parameter equivalent.
However, a lot of popular terminal emulators have a certain amount of hardcoded brain damage and setting X resources will not have any effect with them. This usually happens because of illegal characters in the WM_CLASS property. In those cases command line arguments are the only remaining option.
|Command line parameter
xOffsetCharThe horizontal offset for the X-Face window from the terminal's upper right corner expressed in character units.
yOffsetCharThe vertical offset for the X-Face window from the terminal's upper right corner expressed in character units. The exact value in pixels will be calculated at run time, as well as the pixel equivalent for xOffestChar. There are some lousily coded terminals which are not very helpful with this, so the calculation might not be perfect.
xOffsetPixThe horizontal offset for the X-Face window from the terminal's upper right corner expressed in pixels.
yOffsetPixThe vertical offset for the X-Face window from the terminal's upper right corner expressed in pixels. This value is added to the character offset provided by the yOffsetChar resource and the resulting sum is substracted from the vertical coordinate of the terminal's upper right corner. The equivalent calculation for the horizontal coordinate is done with the xOffsetChar and xOffsetPix resources. In both cases, pixel value resources are provided for finer control.
XFacePadThis value tells slrnface how many pixels should be cleared on the left side of the X-Face image. In the case of long subject lines the image may be displayed over characters and having some spacing between them would be beneficial.
inkThis is the foreground color for the X-Face image. The more common name for this resource is foreground. However, that name is not used because there is a high probability that it would be inherited from the terminal's resources. A lot of users use light foreground and dark background for terminals. Since X-Faces should normally be viewed with dark foreground on light background, inheriting the colors from the terminal setup would present a negative image by default. In order to avoid that, slrnface uses different resource name.
paperThis is the background color for the X-Face image.
padColorThis is the color for the padding region set with XFacePad resource.
EXAMPLESThe following example demonstrates how to set resources for xterm.
Example 1: horizontal offsets for xtermSince slrnface looks at the resources defined for the terminal's class and name, an example setting is:
xterm.slrnface.xOffsetChar: 1 xterm.slrnface.xOffsetPix: 2It is better to use the application name, rather than class, because some other terminals use XTerm as their class, since they try to be feature compatible. However, they might not have the same screen layout, so resources set for the terminal class might not yield the desired effect in all terminals.
- The name of the display where the terminal runs. This environment variable is the only way to pass it to slrnface.
- Used for determining terminal's X window id. It must be set by a terminal emulator.
- LANG, LC_ALL, LC_MESSAGES
- These environment variables will be used when determining the location of the appropriate resource file.
EXIT STATUSThe slrnface helper doesn't print any diagnostic, because it doesn't know if that is the appropriate action. In cases when diagnostic output is appropriate, it can't guarantee that the output would be visible to the user. Therefore it returns distinct error status for every kind of problem and relies on the parent process to take the appropriate action.
It should be noted that slrnface forks early in its execution. The parent process exits immediately, returning success status to its parent. The child process continues execution, reading commands from the FIFO in the $HOME/.slrnfaces directory and executing them as appropriate. In the case where there is a problem with the process' startup, the fork doesn't happen and slrnface exits immediately, returning the appropriate error status. The following exit values are returned:
- Successful completion.
- slrnface couldn't connect to the display.
- Terminal emulator didn't set the WINDOWID environment variable or its value was invalid.
- slrnface couldn't find its controlling terminal.
- Terminal's width or height are not set.
- There was a problem with the FIFO setup.
- fork(2) failed.
- A named pipe used for communication between slrnface and the master proces.
- An example S-Lang hooks for setting up slrnface with slrn(1).