From owner-freebsd-questions Mon Sep 14 18:03:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA01390 for freebsd-questions-outgoing; Mon, 14 Sep 1998 18:03:32 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA01384 for ; Mon, 14 Sep 1998 18:03:29 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.1/8.9.1) id UAA20388; Mon, 14 Sep 1998 20:03:08 -0500 (CDT) Message-ID: <19980914200307.A20197@emsphone.com> Date: Mon, 14 Sep 1998 20:03:07 -0500 From: Dan Nelson To: Malartre Cc: Jim Holthaus , Slyce , freebsd-questions@FreeBSD.ORG Subject: Re: WHY? WAS:Clear screen before login... References: <35FC33DA.76FDBB64@onramp.net> <19980914001932.A6503@emsphone.com> <35FD8866.FC3A76F0@aei.ca> <19980914163455.A18000@emsphone.com> <35FDBA86.A665A32D@aei.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.2i In-Reply-To: <35FDBA86.A665A32D@aei.ca>; from "Malartre" on Mon Sep 14 20:53:26 GMT 1998 X-OS: FreeBSD 2.2.7-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Sep 14), Malartre said: > Dan Nelson wrote: > > > the screen by putting a "clear" comment on their ~/.logout script. > > > I have created a .logout with the clear command on the first line. > But how can I make bash/sh/csh understand than they need to read > .logout when they receive the exit command? >From the man pages: ( csh ) When a login shell terminates it executes commands from the files .logout in the user's home directory and /etc/csh.logout. ( bash ) On exit: if ~/.bash_logout exists, source it. ( sh ) doesn't seem to have a logout script, but you could always simulate one by putting logout() { clear ; exit } in your ~/.profile. ( zsh ) ~/.zlogout /etc/zlogout Since this is a per-user thing, and since each user only has one login shell, you only have to create one of the logout scripts. -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message