From owner-freebsd-questions Fri Sep 19 04:25:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA04762 for questions-outgoing; Fri, 19 Sep 1997 04:25:28 -0700 (PDT) Received: from zigg.com (tcgr-59.dialup.alliance.net [207.74.43.59]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA04754 for ; Fri, 19 Sep 1997 04:25:19 -0700 (PDT) Received: from localhost (matt@localhost) by zigg.com (8.8.7/8.8.5) with SMTP id HAA02364 for ; Fri, 19 Sep 1997 07:25:28 -0400 (EDT) Date: Fri, 19 Sep 1997 07:25:26 -0400 (EDT) From: Matt Behrens To: freebsd-questions@freebsd.org Subject: Determining terminal in login script Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Here's some silly questions for you all. I want to determine what the terminal is on login to set up a few things, and if possible on a telnet connection, which host the connection is coming from. Basically: 1. If the connection is a hardwired terminal, I want to invoke screen (just can't get along without it) :) ; 2. If the connection is a network connection, set the DISPLAY variable to point to X display 0 on the originating host; 3. If the connection is a regular pty (usually created by screen), do nothing. TIA! Matt Behrens | matt@zigg.com MST3K #85995 | http://www.zigg.com/