rmarles
13th June 2007, 17:11
Hi There
Running Baan in ASCII mode, trying to set the stty values. If I set them in HPUX as follows, everything works as expected:
$ stty
speed 38400 baud; -parity hupcl
min = 1; time = 1; intr = ^C; erase = ^H; kill = ^U;
swtch <undef>;
werase = DEL;
brkint -inpck icrnl ixoff onlcr
-iexten echo echoe echok
-echoctl -echoke
It appears as if these values are being overridden when ba6.1 is called, as the keys do not function as expected (and tested at the unix level):
When I shell out and issue an stty, I see totally different values:
bshell6.1> stty
speed 9600 baud; -parity hupcl clocal
intr = ^C; erase = ^H; kill = ^@;
swtch <undef>;
-inpck -istrip icrnl onlcr
-iexten echo echoe echok
-echoctl -echoke
Does anyone know where these values are being (re)set so I can make the corrections needed?
Thanks.
günther
15th June 2007, 10:58
I just used stty -a and checked the differences before and during ba6.1 so I think that ba6.1 sets the following entries: kill character "off" (control-@), suspend character "off" (control-@), cread, clocal, -brkint, -ignpar, ixon, ixany.
But: Function keys in the ascii environment have alway been a problem. I guess that you do not have a real terminal; you're probably using a terminal emulator.
So you should do some checks:
1. What is your $TERM (vt100? => PF1 to PF4 only! vt220? => PF1 to PF4, F6 to F10 but no F5 because that was the Break key on those terminals ...)
2. What settings does your terminal emulator allow for the function keys?
3. Check what your keys send on each key stroke; I normally use 'od -c', then press the function key and an enter and control-d to stop the od.
Eg.
0000000 033 O P \n
0000004
means: Function key FT1 gives "ESC O P".
4. There used to be two different ways on UNIX systems to define that: termcap and terminfo.
* termcap uses a flat file (e.g. /etc/termcap);
* terminfo uses pre-compiled files; run 'infocmp' to get the readable version for your current $TERM.
Eg.
...
is2=\E[1;24r\E[24;1H, kbs=\b, kcub1=\EOD, kcud1=\EOB,
kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\EOP,
...
Here you see kf1=ESC O P.
Hope that gives you some ideas!
rmarles
15th June 2007, 14:42
Hi There
I'm testing out PuTTY, in vt100 mode (going ssh from telnet).
Everything, including the function keys work as desired, when compared to our existing telnet client.
The only thing that DOESN't work correct (rather, as desired) is the delete key.
This is what I'm trying to manipulate. Right now it forces a carriage return, that's it.
If I set the "Backspace Key" setting to Control-H, the backspace key works as desired. If I set the "Backspace Key" to Control-?, the backspace key works as I'd like the delete key to work.
Ideally, I'd like to set the Backspace Key to Control-H and the Delete Key to Control-?.
As I mentioned in my previous post, I can set this using stty, but these values are "overwritten" at some point during the bshell init.
günther
15th June 2007, 16:31
Ah, I see. So could you first check what happens if you change the settings by stty from within ba6.1 (run shell, change stty settings, continue working with ba6.1).
If that works, you could think about "tricks" such as making a shell script ba61.new like (untested!):
#!/bin/sh
(sleep 5; ssty ...) &
exec ba6.1 $*
Günther
rmarles
15th June 2007, 16:34
I guess I should have indicated, I've tried executing stty via an IPC_INFO wrapper script, but it doesn't work either.
Because of this I'm willing to bet doing it via a ba6.1 shell script probably won't work either.
-Rob
rmarles
15th June 2007, 17:01
Yup. Tried it, but it didn't seem to work:
bshell6.1> cat $BSE/bin/ba6.1
#!/sbin/sh
stty werase "^?"
stty erase "^H"
exec ba6.1.exec
bshell6.1>