OT: linux vs vt100 termcap problems + screen - help!

Bob Rasmussen ras at anzio.com
Wed Dec 8 13:51:10 PST 2010


FWIW:

1) Anzio supports a programmable answerback.

2) Anzio supports sending specified environment variables (if the sshd 
accepts them).

3) The sshd_config can be set to allow only CERTAIN variables (including 
wildcards, such as 
   accept_env=ANZ*
)

4) DISPLAY is another variable that seems to always go through, because 
it's required for X.

On Wed, 8 Dec 2010, Brian K. White wrote:

> On 12/8/2010 3:33 PM, Fairlight wrote:
> >> From inside the gravity well of a singularity, Brian K. White shouted:
> >> I have not looked deeply into it since I haven't cared yet, but trying
> >> to help someone else here the other day I saw that screen sets TERM to
> >> "screen.${TERM}", and in /etc/termcap there are screen.linux,
> >> screen.rxvt etc...
> >
> > THANK YOU!
> >
> > Setting local to linux and remote to screen.linux works perfectly for both
> > yast on Linux, and mutt on Solaris and Linux.
> >
> > My only real annoyance is that I might log into the Solaris server either
> > directly from Anzio (or PuTTY), or I may log in from inside screen--both
> > from the same IP#--and they won't enable sshd environment setting for users
> > due to (valid) security concerns.  So I have yet to figure out an
> > -automated- way of making my login process decide if it should run linux or
> > screen.linux, since I'm coming from the same IP# no matter what (in this
> > case, anyway).  If anyone has a genius solution to that, let me know.  I've
> > been over things six ways from Sunday and can't figure out a decent way to
> > determine a decent way to automate setting TERM to the right one yet.
> >
> > Other than that, the raw solution works.  Got it working with custom
> > TERMINFO and TERMCAP variables and files last night, and got the admin to
> > install screen.termcap into both termcap and terminfo today once I knew it
> > would work.
> >
> > THANKS, Brian!  HUGE help!
> >
> > Thanks to everyone that gave input...the effort is appreciated greatly!
> 
> That is what "answerback" is for.
> 
> I don't know if it's possible to configure screen to respond with an 
> aswerback of your choice, or if it already answers back with something 
> recognizable of it's own. If either is true, then you can put this in 
> /etc/profile /etc/profile.local or .profile
> 
> read -s -t 1 -p $'\005' MYTERM  # bash-specific
> 
> $MYTERM will contain the terminal answerback string, minus a trailing 
> newline, and only up to the first newline for that matter, if any.
> 
> You can do this other ways but if you have bash with it's -t option, 
> that's the most convenient and reliable. Otherwise you can make a little 
> c program (look up an old program called qterm, or I bet Bob has 
> something on Anzio.com just like he has passthru, I have a program that 
> I think doesn't actually work so we'll skip that...) or you can just use 
> regular read (which will wait forever until you press Enter) and ensure 
> that your answerback string includes a trailing ^M if it's configurable 
> at all.
> 
> I usually include the trailing newline even though the host has bash, 
> because that just makes the process go as fast as possible instead of 
> forcing the read command to wait -t seconds for no reason, and of course 
> just as a bonus it means the same string works on hosts without bash.
> 
> It IS configurable in Anzio and Putty, including the ^M. Anzio's syntax 
> isn't litterally ^M but I know it has some sort of syntax to do that 
> because I used it. A pipe | ? But you specifically need to detect 
> screen, not your real terminal, so don't bother with that.
> 
> Conversely, if screen doesn't answerback at all, maybe there is some 
> trick you could cause screen to eat the ^E coming from the host and 
> neither respond to it nor pass it to the terminal, (define a bogus 
> termcap/terminfo field?) I guess you could detect screen by omission 
> that way. Um, blech.
> 
> I'm a little unclear why screen's natural TERM auto-setting doesn't 
> work. You're saying the host isn't letting the client even set TERM? 
> That's beyond security into simply broken. The terminal is supposed to 
> tell the host "I am a XX terminal." via TERM, and screen does so by 
> setting TERM to screen.$TERM. TERM has always been a special case, and 
> now LANG and/or a few LC_* variables are added in the same boat for the 
> same reasons, and no other variables passed. Generally this just works 
> unless you go out of your way to break it by overwriting $TERM. My 
> problems were basically just filepro since I simply haven't made a 
> screen.linux or screen.scoansi termpcap entries for filepro yet. 
> Midnight commander and yast seem to work fully as long as all boxes 
> involved have screen.* termcap and terminfo entries.
> 
> -- 
> bkw
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 

Regards,
....Bob Rasmussen,   President,   Rasmussen Software, Inc.

personal e-mail: ras at anzio.com
 company e-mail: rsi at anzio.com
          voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
            fax: (US) 503-624-0760
            web: http://www.anzio.com
 street address: Rasmussen Software, Inc.
                 10240 SW Nimbus, Suite L9
                 Portland, OR  97223  USA


More information about the Filepro-list mailing list