x3270, c3270, wc3270, s3270, tcl3270 and pr3287 Frequently Asked QuestionsIf you have a problem building, installing, or running one of the programs in the x3270 suite, please browse through this file first.
wc3270 includes mkshort.exe. Isn't that some sort of keylogger?The program called mkshort.exe that is installed with wc3270 is not spyware -- it's a little utility program that is used to create the desktop shortcuts when wc3270 is installed. Unfortunately, it has the same name as a very bad program.
You can safely remove mkshort.exe from the wc3270 installation directory; it is not needed once wc3270 is installed.
mkshort.exe will be removed (or at least renamed) in a future release of wc3270.
How do I change the keyboard mapping?Look at the x3270 Keymap document, the c3270 Keymap document or the wc3270 Keymap document.
Why can't I map the Alt, Ctrl or Shift keys in c3270?That's because c3270 runs on dumb terminals, not on graphics displays.
c3270 can only respond to keys that generate input on a TTY device, and it can only respond differently to combinations of keys that generate different input on a TTY device.
Most dumb terminals -- and that includes the Linux console -- do not generate any TTY input at all when the Alt, Ctrl or Shift keys are pressed. They generate input only when another key is pressed in combination with one of those keys. In addition, there is nothing in the input that indicates that the Alt or Shift key was pressed in combination with a key. The presence of the Ctrl key can be inferred by the ASCII code that is generated (the Ctrl key subtracts 0x20 from the ASCII value of the key without Ctrl).
Furthermore, most terminals generate exactly the same TTY input for a given function key (F1..F12), whether or not Shift, Ctrl or Alt are pressed. This is complicated by the fact that the curses library, which is what c3270 uses to do its I/O, does not even provide a way to convey such an event to c3270 -- there is a "Function Key 1" event, but no "Shifted Function Key 1" event and no "Alt Function Key 1" event.
Is there a Windows version?Yes!
First, there is wc3270, the native Windows console version of c3270.
Second, x3270 and c3270 compile and run under Cygwin, the free Unix emulator for Windows. (In fact, they are standard packages with more recent versions of Cygwin). You can get Cygwin here.
If disk space is a concern, you can run c3270 with a minimal set of Cygwin DLLs and one text file -- there is no need to install all of Cygwin.
Note that there is not a native Win32 port of x3270, nor are there concrete plans for one.
Why are the [ and ] characters displayed wrong?Look at the Brackets document.
Fatal Errors From 'make'
Make reports: Fatal error: Don't know how to make target `FontObj(3270)'.This generally means that you are running X11R4, rather than X11R5 or X11R6. x3270 does not run under X11R4.
x3270 Isn't Using the 3270 FontOne of the trickier areas; x3270 uses its own fonts to replicate a life-like IBM 3270. This is not fatal, however; x3270 can use any fixed-width X font. If it can't find its own font, it defaults to "fixed".
The simplest probem to fix is that you haven't told your X server that there are new fonts it can use. This is corrected with:
xset fp rehashIf this doesn't help, it is possible that your X server font path doesn't include the directory that the 3270 fonts were installed in. Run the command "xset q". The output will include an entry like:
Font Path: /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/Speedo/,/usr/lib/X11/fonts/75dpi/,/usr/lib/X11/fonts/100dpi/x3270's fonts are usually installed in /usr/local/fonts. If this (or some variation on it) does not appear in the "xset q" output, you can try:
xset fp+ /usr/local/fonts/ xset fp rehash
x3270 isn't paying any attention to my keymap definition.There are two likely causes for this problem: either x3270 isn't seeing your keymap definition, or there is something wrong with the definition itself.
You can tell exactly which keymap and keymap modifiers x3270 is using with the "About x3270" option on the "Options" menu. There is an entry labeled "Keyboard map:" which lists the keymap(s) in effect. If yours is missing, there are a number of possible causes:
The "Alt" key doesn't work.If the "A" appears on the status line when you press the Alt key, but none of the key mappings that use Alt seem to work (i.e., the APL keys), perhaps your X server isn't configured with Alt as a modifier. Try the following xmodmap command:
xmodmap -e 'add Mod2 = Alt_L'If this fixes the problem, you can add it to your .xinitrc file, so it takes effect every time your start X.
x3270 is misbehaving on a certain application.If x3270 produces a different display or interaction than a real 3270 or some other emulator, it is entirely possible that x3270 is at fault. What you can do to help debug it is to capture a trace of the session. The easiest way to do this is:
x3270 -tracex3270 will create a trace file in /tmp, which will contain a dump of all of the data that x3270 sent or received, along with its interpretation. x3270 will also pop up a window to view the file while it is being created; the title of that window is the full pathname of the trace file. If you are familiar with the 3270 Data Stream protocol, you may be able to figure out the problem yourself; otherwise, after suitable editing to remove passwords and proprietary information, you may send it in (see below).
I can't get Num Lock to work on my Sun keyboard.If you are using an X server based directly on the MIT distribution (the NumLock light does not turn on when you press the NumLock key), then you are pretty much stuck; your server does not support NumLock. (However, you can get the keypad to produce numbers by holding down the Shift key.)
There is no termcap entry for "IBM-3278-xxx"If you log into a non-IBM host with x3270 your TERM variable will be set to "IBM-327x", which is not especially useful for running programs like vi.
One solution is to set your TERM variable to "xterm" after you log in, and to set the number of lines and columns to match the current x3270 model number (this is done through the "stty" command or with environment variables, depending on your system).
A second solution is to create termcap entries for the 3270 terminal types. Here are some sample entries:
I2|IBM-3278-2|x3270 Emulating 3278-2:li#24:tc=xterm: I3|IBM-3278-3|x3270 Emulating 3278-3:li#32:tc=xterm: I4|IBM-3278-4|x3270 Emulating 3278-4:li#43:tc=xterm: I5|IBM-3278-5|x3270 Emulating 3278-5:li#27:co#127:tc=xterm:
My screen isn't being drawn properlyThere is a bug in certain versions of the Linux Mach32 X server, which causes the x3270 screen to be drawn incompletely. The screen image can be restored by iconifying and un-iconifying the window.
x3270 can be modified to work around this problem. An unfortunate side-effect is that it will no longer be able to display APL characters, or line-drawing characters with any of the 3270 fonts.
To rebuild x3270 to work around this bug, edit the Imakefile and add a line at the top:
EXTRA_DEFINES = -DBROKEN_MACH32Then rebuild the makefile, the module "screen.o", and x3270:
rm screen.o xmkmf make depend make
The PF12 Key Doesn't Work on KDEKDE reserves the F12 key for "Mouse Emulation", so x3270 cannot use this key. To allow x3270 to use F12, pull up the KDE Control Center, look under "Look & Feel", and under that, "Key Bindings". Remove the binding for F12.
Getting HelpIf you are still having a problem with x3270, feel free to send e-mail to Paul Mattes No guarantees are made about responses to particular problems, but a patches are usually forthcoming in a few days. You can also ask to be added to the x3270 mailing list, where you can find out about new releases and bug fixes.
When you send a question about x3270, please include the following information. It makes it much easier to narrow down the problem.