user dissapered after connection to GNU Screen - Super User most recent 30 from superuser.com 2019-06-20T08:10:46Z http://asianhospital.com/?id=feeds/question/1354061 http://www.creativecommons.org/licenses/by-sa/3.0/rdf http://asianhospital.com/?id=q/1354061 0 user dissapered after connection to GNU Screen user1244932 http://asianhospital.com/?id=users/443525 2018-08-31T08:51:20Z 2018-08-31T13:22:35Z <p>After the user logged in and before he ran the <code>GNU Screen</code>,</p> <pre><code>[root@15inch ~]# w 11:45:17 up 3:44, 2 users, load average: 0,00, 0,02, 0,00 USER TTY LOGIN@ IDLE JCPU PCPU WHAT user pts/2 09:42 7.00s 0.03s 0.03s -bash [root@15inch ~]# who user pts/2 2018-08-31 09:42 (192.168.1.136) [root@15inch ~]# </code></pre> <p>but after it run <code>GNU Screen</code> I saw nothing:</p> <pre><code>[root@15inch ~]# w [root@15inch ~]# who [root@15inch ~]# </code></pre> <p>only <code>who --all</code> shows something:</p> <pre><code># who --all system boot Aug 31 08:01 LOGIN tty1 Aug 31 08:01 548 id=tty1 pts/2 Aug 31 09:42 3068 id=ts/2 term=0 exit=0 </code></pre> <p>the <code>pts/2</code> is pseudo TTY that was created after his login via <code>ssh</code>. But when I try to send message to him:</p> <pre><code>[root@15inch ~]# write user pts/2 write: user is not logged in on pts/2 </code></pre> <p>only direct usage of pts/2 works:</p> <pre><code>[root@15inch ~]# echo "HI" &gt; /dev/pts/2 [root@15inch ~]# </code></pre> <p>is this expected behavior? Why <code>GNU Screen</code> hide this user from system utils?</p> http://asianhospital.com/?id=questions/1354061/-/1354125#1354125 2 Answer by grawity for user dissapered after connection to GNU Screen grawity http://asianhospital.com/?id=users/1686 2018-08-31T13:22:35Z 2018-08-31T13:22:35Z <p>It's a legitimate feature, although I don't <em>exactly</em> know the original reason for it. I would guess that Screen removes the 'outer' tty from utmp because it's no longer relevant &ndash; as long as you're "attached", for most intents and purposes you're not really interacting with the 'outer' tty.</p> <p>Normally it doesn't cause problems because Screen <strong>should add utmp entries for each <em>inner</em> pty</strong> (corresponding to each screen window). You should be seeing entries with hostnames like "<code>:S.0</code>" or "<code>&lt;originalhost&gt;:S.0</code>" in the <em>who -a</em> output.</p> <p>If this does not happen, make sure the window is marked as "logged in"; try <kbd>Ctrl+A</kbd><kbd>Shift+L</kbd> to toggle the login state. (The default state is set using <strong><code>deflogin on</code></strong> in ~/.screenrc or the system-wide screenrc.)</p>