Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Best place to put `mesg n` into?
- X-seq: zsh-users 2404
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Roland Jesse <jesse@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Subject: Re: Best place to put `mesg n` into?
- Date: Tue, 22 Jun 1999 07:53:25 +0000
- In-reply-to: <19990622092132.A18495@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990622092132.A18495@xxxxxxxxxxxxxxxxxxxxxxxxxx>
On Jun 22, 9:21am, Roland Jesse wrote:
} Subject: Best place to put `mesg n` into?
}
} I have `mesg n` in my ~/.zshrc file to avoid getting all these `talk`
} messages. This works fine for the interactive shell. It does not for
} xterms opened in a way like `xterm -e wnewmail &`. [...] Am I wrong
} here and should I put it into .zshenv to affect _all_ possibly opended
} terminals?
If you put "mesg" in .zshenv, you'll have to protect it with something
like
[[ -t 0 ]] && mesg n
so that you don't get "stdin: is not a tty" or similar errors for shells
that have no associated terminal.
A better solution is
xterm -ut -e wnewmail &
The -ut means that xterm should not write an /etc/utmp (or equivalent)
entry. `talk' et al. won't be able to find the terminal to ask for a
connection if there's no utmp entry.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author