🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #12522

detecting rlogin and TERM types?

#12522
From: Derek E. Terveer
Date: Sat, 06 May 1989 04:04
36 lines
2442 bytes
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 ]]
Technical Details
Message-ID: <898@hawkmoon.MN.ORG>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!husc6!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!husc6!rice!sun-spots-request
From: det@hawkmoon.mn.org (Derek E. Terveer)
Newsgroups: comp.sys.sun
Subject: detecting rlogin and TERM types?
Keywords: Software
Message-ID: <898@hawkmoon.MN.ORG>
Date: 6 May 89 04:04:30 GMT
Sender: usenet@rice.edu
Organization: One of the Eternal Champions - Richfield, MN, 554232523, USA
Lines: 36
Approved: Sun-Spots@rice.edu
Original-Date: 19 Apr 89 21:38:46 GMT
X-Sun-Spots-Digest: Volume 7, Issue 269, message 19 of 23