From: alex.sarafian@analog.com (Alex Sarafian)
Newsgroups: fj.mail-lists.x-window
Subject: SUMMARY: Stopping broadcast messages to xterms
Date: 9 Oct 92 23:39:24 GMT
Distribution: fj
Organization: Analog Devices, Inc.

Date: 7 Oct 92 19:17:38 GMT
Message-Id: <1992Oct7.191738.10891@analog.com>
Newsgroups: comp.windows.x


Last week, I wrote:

>Is there a way to stop broadcast messages (wall, rwall, etc..) from appearing
>in all the xterms on system.

>Can I restrict them to just the console ?


I received six responses from the following people:

vemula@eola.cs.ucf.edu (Udaya B. Vemulapati)
pjs@euclid.JPL.NASA.GOV (Peter J. Scott)
"Uwe Waldmann" <uwe@mpi-sb.mpg.de>
tonyf@ims.com (Antonio Freixas)
lvirden@cas.org (Larry W. Virden)
der Mouse  <mouse@Thunder.McRCIM.McGill.EDU>

The most common response was stated best by  vemula@eola.cs.ucf.edu (Udaya B. Vemulapati):

Try invoking xterm with -ut option. This won't make an entry in the
/etc/utmp file. All my xterms are invoked that way, except the Console
and I've not encountered any general problem. Since wall, rwall ..etc
braodcast to "logged on" users only and and since your entry is not
there in /etc/utmp, it may not display in those windows (but I've no
personal experience :-).


Other responses:

>>>> From: pjs@euclid.JPL.NASA.GOV (Peter J. Scott)

Disable utmp entries for those xterms (see +/-ut flag and
utmpInhibit resource for xterm).

>>>> From: "Uwe Waldmann" <uwe@mpi-sb.mpg.de>:

Broadcast messages are sent to an xterm only if this xterm has a utmp entry.
So you can prevent them, if you put the following line into your .Xdefaults:

  XTerm.utmpInhibit: true

If you actually want to get broadcast messages on some xterm (say, the
console), you use

  xterm -C -xrm 'XTerm.utmpInhibit: false' -geometry 80x58-0+0
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Drawback: The missing utmp entry not only prevents broadcast messages,
it may also make it impossible to use "talk", etc.  On my sparc station,
even "passwd" does not work anymore, so I can issue all these commands
only from the console window.

Hope this helps (it works for me)


>>>> From: tonyf@ims.com (Antonio Freixas)

Set XTerm*utmpInhibit: True

in your ~/.Xdefaults file (or equivalent).

This will stop messages going to all xterms EXCEPT the console.

>>>> From: lvirden@cas.org (Larry W. Virden)

there are two ways.  The first is to set the xterm flag/resource that
tells xterm not to place an entry in the utmp file.  There is a negative
here - if you do this, then certain programs will not be able to 
recognize you - who for instance (and tools which use who to determine
what tty you are on, etc.).

The second - our own approach - is to modify the X11R4 source code so
that if the xterm is running on the same machine as the server and does not
have the -C flag specified, the utmp entry does not get the DISPLAY info
inserted into it.  This way, all local xterm's except the console window
appear to be normal.  Note that this also allows rsh host xterm to continue
to work the same as long as host != to the server host.

And lastly...

>>>> From: der Mouse  <mouse@Thunder.McRCIM.McGill.EDU>

> Is there a way to stop broadcast messages (wall, rwall, etc..) from
> appearing in all the xterms on system.

(I assume that's supposed to be a question, in spite of the lack of a
question mark.)

Tell them not to write utmp entries, is the obvious one, it seems to
me...is there some reason you can't do that?



Thanks to all the respondants


-- 
+----------------------+
    Alex Sarafian 
  Analog Devices, Inc.
alex.sarafian@analog.com