Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!husc6!rice!sun-spots-request From: capmkt!brent@uunet.uu.net (Brent Chapman) Newsgroups: comp.sys.sun Subject: Re: Determining if /dev/console = /dev/fb and not /dev/ttya Keywords: SunOS Message-ID: <4089@kalliope.rice.edu> Date: 22 Jun 89 20:57:49 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 22 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 48, message 2 of 19 # I want to have my .logout script put a rasterfile on the screen when I # logout on a workstation. Using "if (`tty` == /dev/console)" I can reject # logins from the dialup ports and rlogin sessions, the file server has # /dev/ttya as its console. My first misguided attempt to check if # /dev/console is the same as /dev/ttya caused the server to panic with a # bus error. Any suggestions? Assuming that your /etc/ttytype correctly identifies the type of your console terminal as something other than "sun" when the console is to an ASCII terminal through ttya, you can just check the "$TERM" environment variable to see if it's "sun"... For example: if ((`tty` == /dev/console) && ($TERM == sun)) then display_raster endif -Brent -- Brent Chapman Capital Market Technology, Inc. Computer Operations Manager 1995 University Ave., Suite 390 brent@capmkt.com Berkeley, CA 94704 {apple,lll-tis,uunet}!capmkt!brent Phone: 415/540-6400