slrnface - show X-Faces in X11 terminal emulator
slrnface [ -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 ]
The 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.
The 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. Resource Command line parameter Default value slrnface.xOffsetChar -xOffsetChar 0 slrnface.yOffsetChar -yOffsetChar 1 slrnface.xOffsetPix -xOffsetPix 0 slrnface.yOffsetPix -yOffsetPix 2 slrnface.XFacePad -XFacePad 0 slrnface.ink -ink black slrnface.paper -paper white slrnface.padColor -padColor black xOffsetChar The horizontal offset for the X-Face window from the terminal's upper right corner expressed in character units. yOffsetChar The 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. xOffsetPix The horizontal offset for the X-Face window from the terminal's upper right corner expressed in pixels. yOffsetPix The 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. XFacePad This 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. ink This 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. paper This is the background color for the X-Face image. padColor This is the color for the padding region set with XFacePad resource.
The following example demonstrates how to set resources for xterm. Example 1: horizontal offsets for xterm Since slrnface looks at the resources defined for the terminal's class and name, an example setting is: xterm.slrnface.xOffsetChar: 1 xterm.slrnface.xOffsetPix: 2 It 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.
DISPLAY The name of the display where the terminal runs. This environment variable is the only way to pass it to slrnface. WINDOWID 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.
The 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: 0 Successful completion. 1 slrnface couldn't connect to the display. 2 Terminal emulator didn't set the WINDOWID environment variable or its value was invalid. 3 slrnface couldn't find its controlling terminal. 4 Terminal's width or height are not set. 5 There was a problem with the FIFO setup. 6 fork(2) failed.
$HOME/.slrnfaces/* A named pipe used for communication between slrnface and the master proces. slrnface.sl An example S-Lang hooks for setting up slrnface with slrn(1).
slrn(1), mutt(1), X11(5), xprop(1), xterm(1), fork(2)
Multiple X-Faces are not supported.
Drazen Kacar <dave@willfork.com> Home page: http://dave.willfork.com/slrnface/ 28 Feb 2002 slrnface(1)
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.