det@hawkmoon.mn.org (Derek E. Terveer) (05/06/89)
This has probably been hashed out before, but i don't read this group all the time and we only recently have had sun workstations to play around with. We have several servers and several clients with serial ports into which people log in from modems, etc. Obviously people frequently rlogin in another system from the initial system they logged onto. My problem is this: How does one, from the user's .profile, determine the TERM type of a terminal when using rlogin? I'm assuming here that the sun workstations don't understand the ENQ character and thus, i can't read the answerback string (with the terminal type of "sun"). Let me elaborate here. If a user logs onto a sun workstation through the serial port, i can detect that by checking the output of the tty command. It will be something like /dev/ttya. Then i can arbitrarily set the TERM type to vt100, which should cover most of the types of terminals being used. Then the user rlogins to another sun workstation, for which his/her TERM type should be sun, but herein lies the crunch. I can tell that the device is /dev/ttyp?, but how can i tell the difference between a user using rlogin from another sun workstation console (device=/dev/console and TERM=sun) vs. one using rlogin from a serial port on a another workstation (device=/dev/ttya and TERM=vt100)? Is this really easy and i'm missing the boat or what? Any help would be appreciatted. Thanks in advance, derek -- Derek Terveer det@hawkmoon.MN.ORG || ..!uunet!rosevax!elric!hawkmoon!det w(612)681-6986 h(612)688-0667 [[ From the rlogin(1) manual page for 4.0.1: "The remote terminal type is the same as your local terminal type (as given in your environment TERM variable). The terminal or window size is also copied to the remote system if the server supports the option, and changes in size are reflected as well." --wnl ]]