[RndTbl] Linux "write"

Gilles Detillieux grdetil at scrc.umanitoba.ca
Wed Jun 28 11:42:48 CDT 2017


On 2017-06-28 09:33, Gilbert E. Detillieux wrote:
> On 28/06/2017 2:51 AM, Trevor Cordes wrote:
>> Can someone else confirm this bug on another Linux system, preferably a
>> modern one that uses systemd?
>>
>> In X, as non-root:
>>
>> open a term (call it term1)
>> open another term (term2)
>> type "tty" in term2, not your tty number/string
>> in term1: type "write <your-login> <tty-string-from-above>"
>>
>> replace your-login with the output of "who" if you don't know who you 
>> are
>> logged in as
>>
>> please try both /dev/pts/42 and pts/42 format for the tty part of write
>>
>> example: write trevor pts/42
>>
>> When I run this I get:
>> write: trevor is not logged in on pts/42
>>
>> Even though I clearly am.  This used to work perfectly up until last 
>> year
>> (I think), and I think systemd changed something (big surprise).  No
>> chatter about this anywhere that I can see.  Probably the last person on
>> earth to use write (at least on F24).
>>
>> I found some other things to test that indicate that something is really
>> amiss:
>>
>>> write trevor
>> write: trevor has messages disabled
>>
>>> mesg
>> is y
>>
>>> mesg y
>> mesg
>> is y
>>
>>> write trevor
>> write: trevor has messages disabled
>>
>>> ll /dev/pts/42
>> crw--w---- 1 trevor tty 136, 42 Jun 28 02:48 /dev/pts/42
>>
>>
>> If someone else can confirm this bug on a non-Fedora (or a newer one) 
>> that
>> would be great.  If someone can also confirm that the above behaviour is
>> insane, that too would be great.  If anyone has some ideas on what to 
>> try
>> next, shoot away!  Then I'll file a bz.  Thanks!
>
> Works fine for me under SL6.9, SL7.3, and Raspbian/Jessie, all with 
> the latest updates including kernel.  Looks like the latest Fedora is 
> borked.  (And we all know the likely culprit, don't we...)
>
> Gilbert

Not that I'm defending systemd in any way (perish the thought!), but I'm 
wondering if it might have something more basic and Unix-y behind it. 
Does it matter whether you have actual login shells on your ttys? I.e. 
does write depend on entries in /run/utmp or /var/log/wtmp? Do your ttys 
show up in a who listing on both the systems that work and those that 
don't? If not, try something else like the -ls option to xterm, or a 
login via ssh.

-- 
Gilles R. Detillieux              E-mail: <grdetil at scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
Dept. of Physiology and Pathophysiology, Faculty of Health Sciences,
Univ. of Manitoba  Winnipeg, MB  R3E 0J9  (Canada)



More information about the Roundtable mailing list