× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Following a merger we were required to give a number of users using Linux
based thin clients access to an AS/400. We chose to use tn5250 over xterm
(xt5250). However, our users had been subjected to Client Access during
training which led to a requirement for a destructive backspace which did
not move to the last position in the previous field. The users also
complained of the lack of a delete and insert-mode key. The uses also wanted
a font which filled their 1024x768 desktops better than the 'Huge' (10x20)
font in xterm. The last complaint was the color scheme used.
I have made the following modifications to address these requirements:
Change display.c:

--- src/display.c Mon Oct 14 14:03:43 2002
+++ src/display.c.patched Mon Oct 14 14:06:03 2002
@@ -915,7 +915,9 @@
      break;

   case K_BACKSPACE:
+   /* destructive backspace */
      tn5250_display_kf_backspace (This);
+      tn5250_display_kf_delete (This);
      break;

   case K_LEFT:
@@ -1418,17 +1420,12 @@
      return;
   }

-   /* If in first position of field, set cursor position to last position
-    * of previous field. */
+   /* If in first position of field, stay there */
   if (tn5250_display_cursor_x (This) == tn5250_field_start_col (field) &&
tn5250_display_cursor_y (This) == tn5250_field_start_row (field)) {
-      field = tn5250_display_prev_field (This);
      if (field == NULL)
  return; /* Should never happen */
      tn5250_display_set_cursor_field (This, field);
-      if (tn5250_field_length (field) - 1 > 0)
-  tn5250_dbuffer_right (This->display_buffers,
-        tn5250_field_length (field) - 1);
      return;
   }

Change the XTerm resource file (which goes in /usr/local/share/tn5250)
The change addresses both the keyboard and the color issues.
--- XTerm Sat Oct  6 10:13:40 2001
+++ XTerm.patched Mon Oct 14 16:34:36 2002
@@ -17,6 +17,9 @@
 ~Shift<Key>Print: string("\020") \n\
        <Key>Control_L: string("\022") \n\
        <Key>Escape: string("\001") \n\
+        <Key>BackSpace: string("\177") \n\
+ ~Shift <Key>Insert: string("\033[2~") \n\
+ ~Shift <Key>Delete: string("\033[3~") \n\
 Shift <Key>Print: string("\003") \n\
        ~Shift <Key>F1: string("\0331") \n\
        ~Shift <Key>F2: string("\0332") \n\
@@ -53,4 +56,29 @@

xt5250.VT100*underLine: True
xt5250.VT100*colorULMode: off
+
+! The color settings below require having the resource
+! set in the standard XTerm resource file
+! *VT100*colorMode: on
+! *VT100*boldColors: on
+! *VT100*dynamicColors: on
+
+! Color scheme which is easier on the eyes than the default
+xt5250*color0: seashell
+xt5250*color1: red4
+xt5250*color2: darkblue
+xt5250*color3: yellow3
+xt5250*color4: blue3
+xt5250*color5: magenta3
+xt5250*color6: blue
+xt5250*color7: #888888
+xt5250*color8: white
+xt5250*color9: red
+xt5250*color10: green
+xt5250*color11: yellow
+xt5250*color12: blue
+xt5250*color13: magenta
+xt5250*color14: darkgreen
+xt5250*color15: #444444
+xt5250*cursorColor:              red

The keyboard issue is actually a mismatch between the XTerm resource file
and the terminfo entry supplied for 'xterm-5250'. There are more mismatches
in the terminfo entry ( all the F-keys) but seeing they work I decided the
interpretation of keypresses was being done outside terminfo/ncurses and
didn't delve deeper.
The color/colour issue really requres a user configurable option to be
really user friendly. This will do for now though.
The font issue was solved by putting '-fn 12x24' in the xterm command line
in the xt5250 script. Can also be solved by setting the default font in the
XTerm resource file. If someone can direct me to a sans serif font of the
same size I would be greatful though. The serifs clutter the screen.

So, for now we're done.
I compiled this to answer the questions I had a week ago.

Erik Zetterberg
Senior Consultant
Videotex-Huset VTX AB
Sweden







_________________________________________________________________
Hitta billigaste resan på MSN Resor http://www.msn.se/resor/default.asp



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.