This seems like it might end up being a lengthy post, but I'll try to be as brief as possible without being too vague....
My situation is as follows:
I have a weird PS1, something I was messing around with for a while just to make it funky. It has many escaped characters (line characters), which usually display fine...except when I use Midnight Commander. Only the last few characters display, and they are not escaped, so it's something like 0qm(B> or something similar.
I've tried to find a solution to this, and so far the best option I've found is to change the term name of aterm when it launches mc, "aterm -tn vt220 -e mc", and place something like this in ~/.bashrc:
if [ $TERM = vt220 ]; then
PS1='\@ \u > '
PS1='<very long string of characters>'
This seems to work ok in X, since all my other terminal apps automatically reset $TERM to "xterm". However, when I'm working in tty, the $TERM variable remains "vt220" until I manually return it to "linux".
I have 3 questions relating to this:
1) Am I likely to run into trouble (apps not running properly, etc) by leaving $TERM=vt220 while I'm in tty?
2) Is there another term name that might be more appropriate? Linux doesn't work properly...in X mc displays its borders all funky, and in tty it would display the shortened PS1 all the time (my $TERM is already "linux" in tty).
3) Is there an altogether better solution to this? By "this" I mean finding out whether mc is the application which is currently being opened, and setting PS1 accordingly.
I'm running SuSE 9, kernel 2.4.21-99, bash 2.05b, and generally aterm in X
Thanks for any help.