Eterm FAQ

Contents


Q&A

How do I know which version of Eterm I am running?

Eterm always displays its current version at the top of the options list on the usage screen. You can view the usage screen by envoking Eterm with the -h or --help option. Also, you can place the current version number in the Eterm title bar using the escape sequence "ESC[8n".


Why did you have to go and change all the options!?

There are several reasons we chose to do this:

  1. To make Eterm's command-line option mechanisms be POSIX- and GNU-compliant.
  2. To allow for shorter synonyms for the most frequently-used options.
  3. We were sick of the obfuscated nature of the xterm options.
  4. We felt like it.
For those who don't know, POSIX-standard option syntax uses single-letter options which can be combined on the command line (e.g., the "-xvf" in a tar command), among other things. GNU-standard options (also known as "long options") begin with two hyphens and make it very easy to tell what an individual option controls (e.g., --background-pixmap, whose POSIX synonym is -P).


Why isn't my .Xdefaults being parsed any more?

This is another change made as of DR 0.6. Since it is Eterm (Enlightened term, intended for use with The Enlightenment Window Manager), we chose to have it read a config file very similar to Enlightenment's own MAIN.

Eterm 0.7 has support for themes. (See the later question, "What constitutes an Eterm theme?", for more info on themes.) By default, the make install will copy the themes from the themes/* directories into the $libdir/Eterm/themes/ directory (/usr/local/lib/Eterm/themes by default). It will no longer read ~/.Eterm/MAIN, but instead will look for the Eterm theme if no theme is specified on the command line.




Well then why isn't the Eterm theme MAIN file being parsed?

The most likely cause of this (besides not having one :-) is not having the proper "magic number" line at the top of your config file. As of DR 0.6a, the first line of your config file must look like:

<Eterm-0.6a>

This "magic number" mechanism prevents Eterm from trying to read an Enlightenment config file as its own, and it may provide backward compatibility in the future. The "0.6a" part represents the version of Eterm for which the config file was written (without the "DR" if there is one).


Where do I find out what you've changed for each release?

There is a file called RELNOTES.Eterm in the base directory of each Eterm distribution. Those release notes give information about what changes were made in each release, plans for future changes, etc.


What information/help files are in the Eterm distribution?

Here is a list:


Do I need this file called Eterm-bg.tar.gz?

One of Eterm's most notable features is its ability to put images (called pixmaps by convention) in the background of your terminal windows. Eterm-bg.tar.gz (obtainable from any Eterm site) contains about 14 Meg worth of cool pixmaps to try. It's completely optional. If you do get it, be sure to untar it into your home directory. It puts the images in .Eterm/pix/ underneath wherever you install it. I also left the .xvpics directory intact, so you can use the Visual Schnauzer to preview the pixmaps.


The man page is all wrong! What's up with that?

The man page for Eterm DR 0.6 and later is not finished yet. Stay tuned to these pages. I'll post it here as soon as it's ready.


Why did the mouse selection thing suddenly quit working?

Make sure that mouse reporting is actually turned off. Unfortunately, some editors do not properly turn off mouse reporting when they are abnormally terminated. The tcsh shell may also use mouse reporting unless explicitly turned off. You can check this by trying the selection/cut/paste while holding down Alt or Shift. See the Technical Reference (doc/Eterm.ref) for more detailed information.


The docs keep mentioning blinking text, but I can't get it to work. What am I doing wrong?

You aren't doing anything wrong. Eterm does not support, and probably never will support, blinking text. Instead (assuming NO_BRIGHTCOLOR is *not* defined during compilation), Eterm uses the bold and blink attributes to provide high-intensity versions of the foreground and background colors respectively. In general, colors 0-7 are the low-intensity colors, and colors 8-15 are the corresponding high-intensity colors. (So color 8 is a "bold" color 0, color 9 is a "bold" color 1, etc.) It is worth noting that some programs break this convention and use colors 8-15 to provide 16 total colors, none of which bear any relationship to any other based on their color number.

Related to this issue is the question of how the default foreground and background colors are treated (those specified by the -f (--foreground-color) and -b (--background-color) options) with respect to the bold and blink attributes. In the simplest (and most common) case, the fg/bg colors each match one of the low-intensity colors (0-7). If this is true, the bold/blink attributes (respectively) activate the corresponding high-intensity color (8-15).

If this is not the case, and either the foreground color or the background color does not match any of the 8 low-intensity colors, slightly different action must be taken. In the former case, the bold foreground is simulated using an overstrike mechanism *. In the latter case, the blink attribute is simply ignored.

* This feature is dependent upon NO_BOLDOVERSTRIKE not being defined during compile. Furthermore, its use is discouraged and unsupported, as it tends to create "pixel droppings."


How do I change the screen colors?

You can change the colors 0-15 in your Eterm configuration file. These settings, taken from themes/Eterm/MAIN, are Rasterman's colors which he says work well for displaying ANSI art:

    color  0 0    0    0
    color  1 0xaa 0    0
    color  2 0    0210 0
    color  3 0xaa 0x55 0x22
    color  4 0    0    0xaa
    color  5 0xaa 0    0xaa
    color  6 0    0xaa 0xaa
    color  7 0xaa 0xaa 0xaa
    color  8 0x44 0x44 0x44
    color  9 0xff 0x44 0x44
    color 10 0x44 0xff 0x44
    color 11 0xff 0xff 0x44
    color 12 0x44 0x44 0xff
    color 13 0xff 0x44 0xff
    color 14 0x44 0xff 0xff
    color 15 #ffffff

The syntax for this section is discussed in themes/Eterm/MAIN.

You can also change individual colors on the command line, using the --colorN options (where N is the number of the color you wish to change). The value can be either a color name or an RGB triple. For example, --color5=blue or --color1="#ff0000".


What's the deal with Backspace/Delete? Neither seems to work!

The Backspace/Delete problem has plagued UNIX for quite some time now, and there are no easy answers. This FAQ covers how Eterm handles the two keys; however, detailed explanations of xmodmap, stty, and so forth are beyond its scope. The appropriate man pages should be consulted.

First, I'll assume that the Backspace key on your keyboard corresponds to the Backspace keysym under X. (This is not always the case. See the next question for more details on this.) There are two standard values that the Backspace key sends: Ctrl-H ("^H") and Ctrl-? ("^?"). Eterm inherits the "erase" stty setting from the terminal from which it is started. If it is not started from a terminal (e.g., if it were started from a window manager button or pull-down menu, or a remote shell), Eterm defaults to the value of CERASE (defined in <termios.h>). This may not be the same as the stty settings of your terminal.

When starting a new Eterm, you can set the desired value before calling Eterm:

  $ stty erase ^H
  $ Eterm
or
  $ stty erase ^?
  $ Eterm

Remember, you can generate either value using Backspace and Ctrl/Shift-Backspace. You can also toggle which key is which using the "ESC[36h" and "ESC[36l" escape sequences.

In an existing Eterm, use these commands:

  $ stty erase ^H
  $ echo -n "^[[36h"
or
  $ stty erase ^?
  $ echo -n "^[[36l"

Of course, there are other Backspace-related problems. For example, some editors use termcap/terminfo, but there are some that expect Backspace == ^H regardless. And then there's GNU Emacs, which binds ^H to help.... My personal solution is to always use ^H for backspace, and add this line to my .emacs file:

(global-set-key "\C-h" 'delete-backward-char)

This should cover the Backspace problems. Remember that if you use ^? for Backspace, you'll need to change the doc/Eterm.ti and doc/Eterm.tcap to reflect this.

The Delete key (which is supposed to correspond to ^?) has problems of its own. In an effort to avoid excessive confusion (yeah, right :-) between Backspace and Delete, Eterm assigns "ESC[3~" to the Delete key, which is the vt100 sequence for Execute.


Why won't my Backspace work under Linux?

Apparently, the XFree86 server elects to map the Backspace key as Delete to match the Linux console. Besides complaining to the Linux and XF86 people, here's what you can do about it:

  1. Use xmodmap to correct the Backspace mapping. Add this line to your ~/.Xmodmap file:
      keycode 22 = BackSpace
    
    Use xev to change the keycode to properly match your machine if needed. This will also fix the BackSpace problem with Motif applications, like Netscape.
  2. Remap the Eterm keybindings as described in the next answer. You will lose the Ctrl/Shift-Backspace and escape sequence toggling functionality discussed in the previous answer.

Congratulations! Your Backspace now works as described in the previous answer, so start from there.


How do I change the key bindings in Eterm?

You must compile Eterm with KEYSYM_RESOURCE defined to change key bindings. Assuming you've done this, you can change the keystrings associated with keysyms 0xFF00 - 0xFFFF (special keys only) in your Eterm config file.

Here is a sample set of keysym attributes included in the tn3270 theme:

# Delete - ^D
keysym 0xFFFF "\004"

# Left - ^B
keysym 0xFF51 "\002"
# Right - ^F
keysym 0xFF53 "\006"
# Up - ^P
keysym 0xFF52 "\020"
# Down - ^N
keysym 0xFF54 "\016"
# Home - ^A
keysym 0xFF50 "\001"
# End - ^E
keysym 0xFF57 "\005"

# F1 - F12
keysym 0xFFBE "\e1"
keysym 0xFFBF "\e2"
keysym 0xFFC0 "\e3"
keysym 0xFFC1 "\e4"
keysym 0xFFC2 "\e5"
keysym 0xFFC3 "\e6"
keysym 0xFFC4 "\e7"
keysym 0xFFC5 "\e8"
keysym 0xFFC6 "\e9"
keysym 0xFFC7 "\e0"
keysym 0xFFC8 "\e-"
keysym 0xFFC9 "\e="

# map Prior/Next to F7/F8
keysym 0xFF55 "\e7"
keysym 0xFF56 "\e8"

My keyboard has some extra keys. How can I use them in Eterm?

The proper way to do this is to use xmodmap to remap the keys needed. Consult the appropriate man page, as a discussion of xmodmap usage is beyond the scope of this FAQ.


How does a program tell if it's running in an Eterm or an xterm?

It is useful to know whether or not you are in an xterm or an Eterm (or another terminal emulator that supports color), for purposes of setting color variables and so forth. To this end, Eterm always sets and exports the $COLORTERM environment variable, so you can use test to see if it's set. Many programs (mutt, jed, slrn, etc.) perform this test for you to determine whether or not to use color.


How do I properly set $DISPLAY to the correct, full IP address from a shell?

You must have compiled Eterm with DISPLAY_IS_IP and ENABLE_DISPLAY_ANSWER defined. It is also wise to define ESCZ_ANSWER properly, or the provided shell code samples will not work. (You'll need to use $COLORTERM to determine if you are using an Eterm.)

Here are a couple shell script samples that will properly set your $DISPLAY, first for Bourne/POSIX-compatible shells, then for csh-compatible shells.

#!/bin/sh
# If $TERM is not set, set it to xterm
[ ${TERM:-empty} = empty ] && TERM=xterm

# If it's an xterm, see if it's an Eterm
if [ ${TERM:-foo} = xterm ]; then
  stty -icanon -echo min 0 time 15 
  echo -n '^[Z'
  read term_id
  stty icanon echo

# If it's an Eterm, get $DISPLAY from it.
  if [ "$term_id" = '^[[?1;2C' -a ${DISPLAY:-empty} = empty ]; then
    echo -n '^[[7n'
    read DISPLAY
  fi
fi
----- 8< ----- cut here ----- 8< -----
#!/bin/csh
# If $TERM is not set, set it to xterm
if ( !(${?TERM}) ) then
  TERM = xterm
endif

# If it's an xterm, see if it's an Eterm
if ( ${TERM} =~ xterm ) then
  stty -icanon -echo min 0 time 15
  echo -n '^[Z'
  set term_id=$<
  stty icanon echo
  if ( "${term_id}" == "^[[?1;2C" && ${?DISPLAY} == 0 ) then
    echo -n '^[[7n'
    setenv DISPLAY "$<"
  endif
endif

Why isn't the -n (--name) option working?

This is most often due to the fact that the MAIN file distributed with some versions of Eterm contains lines that set the title and iconname attributes. If you comment these lines out, the -n (--name) option will set the title and icon name if they are not otherwise explicitly assigned on the command line.


Eterm doesn't work on my machine. Help!

One of the primary goals of the Eterm project is portability. We do our best to write portable code, but we only have a limited number of platforms on which we have accounts. Therefore, you as the end user are a vital part of the testing and debugging process.

If you run into problems with Eterm, please go through the steps outlined here. If you make it to the last step (going in order, of course) with no luck, please do the following:

  1. Comment out line 41 of src/feature.h where NDEBUG is defined.
  2. Recompile Eterm.
  3. Run the new copy of Eterm and mail the output to me (mej@tcserv.com).
This is the only way we can get the information we need about where the program is when it runs into problems, or what privileges it has, or whatever. If you do not do this, we cannot help you.


Why is 0 sending a Ctrl-C?

This problem was reported by Charles Hagenbuch . I'm not sure why it happens, but according to Chuck, stty sane fixes it.




What constitutes an Eterm theme?

An Eterm theme consists of a primary configuration file, always called "MAIN", residing in a directory bearing the same name as the theme. This directory must be a child of one of the directories specified by CONFIG_SEARCH_PATH in src/feature.h, in the environment variable defined by PATHENV in src/feature.h, or in the default PATH. The theme may also contain additional configuration files referenced by the primary MAIN file, pixmaps, menu files, documentation, etc., which are allowable as extensions to the minimum requirement of an Eterm theme.

By convention, Eterm themes should be stored under ~/.Eterm/themes/<theme_name>/ or $libdir/themes/<theme_name>


How does Eterm determine which theme to use?

  1. If the -t or --theme option is specified on the command line, Eterm will search for, and use if found, the specified theme.
  2. Eterm will check to see if it is running under Enlightenment. If it is, it will query Enlightenment for the current theme name. It will then search for, and use if found, an Eterm theme by the same name. (NOTE: This is contingent on Enlightenment having this capability, so this will not work yet.)
  3. Eterm will search for, and use if found, a theme called Eterm.
  4. Eterm will search for, and use if found, a theme called DEFAULT.
  5. As a last resort, Eterm will search for, and use if found, a compatible MAIN file. (Recall that this is not a valid Eterm theme.)



What does this accomplish?

This proposal fulfills both of the primary goals regarding theme support. On the one hand, it allows for things like "Eterm -t tn3270", where .../tn3270/MAIN would contain color definitions, keysym definitions, etc. which would be beneficial to tn3270, but perhaps detrimental to other applications.

On the other hand, it provides Enlightenment theme authors a relatively- transparent mechanism for extending the look and feel of their E theme to their Eterm windows.


[Powered by Nu-Media Net!] Copyright © 1997-1995, Michael Jennings. All rights worth squat. These pages are guaranteed to be 100% SPAM(tm)-free or your money back!

Last modified -- Wednesday, 05 August 1998, 21:19:35 EDT