bash via ved:imsh under Redhat 7.3 
Author Message
 bash via ved:imsh under Redhat 7.3

Having installed Redhat 7.3, and rebuilt poplog all went fine until I
happened to use imsh in ved.

Before proceeding, I should explain that I run pop-11 from a standard
(non-X) login, however, I have replicated the problem under X.

Anyway Bash starts up, but a line of the form (sorry this is from memory)
appears in the Bash shell every time return is typed:
readline: warning: rl_prep_terminal: unable to determine terminal type: imsh
$

After some detective work, I find that the message is coming from GNU
readline via bash, i.e. it is not a fault with ved or pop-11.

I believe that this occurs because bash tries to set up in-line edit
facilities, which we probably we don't want under ved. I believe that this
can (not tested) be overcome by starting bash with '--noediting'. If this is
true its fine for RH7.3 with bash but it would be better to determine if
bash is running inplace of sh and what version is running.

Any ideas?

This problem does not occur with csh.

Thanks



Sun, 21 Nov 2004 04:28:41 GMT  
 bash via ved:imsh under Redhat 7.3

Quote:

> Date: Tue, 4 Jun 2002 21:28:41 +0100

> Having installed Redhat 7.3, and rebuilt poplog all went fine until I
> happened to use imsh in ved.

Just out of curiosity, did imsh work OK in earlier versions of
Redhat?

I was wondering whether bash had changed in RedHat 7.3 or whether
you simply had not tried this in earlier versions of poplog on
linux. I seem to remember that ved_imcsh worked fine but I had
problems with ved_imsh (using 'sh', not 'bash' as shell).

I suppose that in principle it should be possible to create
a library ved_imbash by copying and editing everything that
is used in ved_imsh. It could then run bash with the
'--noediting' flag.

Here's a much simpler stopgap, if all you want to do is repeatedly run
bash with a command and read the output of the command back into Ved.
(I do this with tcsh all the time).

Put this in $poplocal/local/auto/ved_dobash.p
or your private autoloadable directory:

define ved_dobash();
    ;;; Use the current line in the Ved buffer as an argument
    ;;; for bash. Run bash with the argument, and read the
    ;;; output back into a temporary Ved file, with the heading
    ;;; FROM BASH

        dlocal vedargument = copy(vedthisline());

                vedgenshell('/bin/bash', 'FROM BASH');

enddefine;

Then you can put a command, e.g.

    who

in the Ved buffer, but the cursor on it, and do ENTER dobash.

Obviously you can abbreviate the name if you wish. Or you can use
vedsetkey to map that onto a key sequence or functionkey. (The REDO
key can be used to repeat the ENTER command after editing the
bash command.)

This will not work if you want to run interactive programs launched via
bash from inside a Ved buffer. But those rarely work in any case.

Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK

PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html



Sun, 21 Nov 2004 05:40:36 GMT  
 bash via ved:imsh under Redhat 7.3

Quote:

> Just out of curiosity, did imsh work OK in earlier versions of
> Redhat?

On a Redhat machine here running kernel 2.4, ved_imsh works with two
versions of bash, called bash-1.14.7-23.6x and bash2-2.03-8.  

If the error message saying "unable to determine terminal type" is
coming from bash, could the problem be that the TERM environment
variable isn't getting set for some reason?

Or could this be the problem with libtermcap that has been mentioned
before?  Something like poplog looking for /lib/libtermcap.so.2, when
the library file from the linux distribution is called
/lib/libtermcap.so.2.xxx.  If that is it, the solution is
ln -s /lib/libtermcap.so.2.xxx /lib/libtermcap.so.2
(where you replace xxx by whatever the file is really called).  

Steve



Sun, 21 Nov 2004 19:35:17 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. oh *drat*, xved falls over on redhat 7.3

2. strange behaviour of LIB mkind on redhat 7.3 (sysfileok problem)

3. relinking poplog for redhat 7.3

4. Ruby in Redhat 7.3

5. PHP 4.2.2 or 4.2.3 on RedHat 7.3

6. RedHat 7.3

7. RedHat 7.3 (Kevin Dahlhausen)

8. RedHat 7.3 and Python2.2.1

9. Redhat 7.3 PHP RPM + Payflow Pro functions -- HELP

10. PyXML-0.7.1, python-2.2.1, and Redhat 7.3

11. PHP 4.1.2 on apache 1.3.23, on RedHat 7.3 - weird problem with LoadModule php4_module

12. Help Porting PHP Sites from Solaris to RedHat 7.3

 

 
Powered by phpBB® Forum Software