Skip to main content
Topic: tty + who (Read 628 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

tty + who

Hi guys,

When I run w command in terminal I get following output>
Code: [Select]
$ w
 22:09:22 up  3:21,  1 user,  load average: 0.83, 0.43, 0.50
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   tty6      18:49    3:20m  0.00s  0.26s xfce4-session

My question is > Why is there, in previous output, no record that user tokaro is on pst/0 like>
Code: [Select]
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   pts/0      18:49    3:20m  0.00s  0.26s bash

Thanks for suggestions!


Re: tty + who

Reply #2
Hi thanks for reply,

I have libutempter 1.2.1-1 installed. When I run w command in XTERM the output displayed is correct.
Code: [Select]
 w
 11:49:12 up  1:35,  2 users,  load average: 0.18, 0.55, 0.63
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   tty6      10:14    1:34m  0.00s  0.26s xfce4-session
tokaro   pts/2     11:49    0.00s  0.01s  0.00s w


But in XFCE-terminal (with several tabs opened) i still get only>
Code: [Select]
w
 11:51:15 up  1:37,  1 user,  load average: 0.96, 0.73, 0.69
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   tty6      10:14    1:36m  0.00s  0.26s xfce4-session

Any idea what is wrong?

Thanks!

Re: tty + who

Reply #3
wrong is probably XFCE-terminal. My konsole (terminal in Plasma) works right too...

Code: [Select]
[xxx@picasso ~]$ w
 13:18:31 up  5:07,  7 users,  load average: 1,17, 1,34, 1,21
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
xxx   tty2      08:11    5:06m  0.00s  0.00s dbus-run-session /usr/bin/startplasma-x11
xxx   pts/0     08:19    2:56   0.01s  0.01s /bin/bash
xxx   pts/8     13:18    0.00s  0.03s  0.00s w
[xxx@picasso ~]$

Re: tty + who

Reply #4
Hi,

I have installed one more terminal (Sakura terminal) to see whether is the Xfce terminal guilty. But Sakura terminal shows the same output
Code: [Select]
w
 19:28:18 up 26 min,  1 user,  load average: 0.81, 0.63, 0.47
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   tty6      19:03   26:02   0.00s  0.29s xfce4-session

So i think there is something wrong with Xfce?

One more question > How many TTYs is default?

I can move between Ctrl + F1 - > Ctrl +F6. Xorg is on F6.
But sometimes when i boot into Xfce and try to change to other TTY, Xorg is on F5 or F7.

So i am worried about security.
OR is it just bug in Xfce?

Thanks.

Re: tty + who

Reply #5
Not all terminals use libutempter, and it doesn't do anything by itself as it's only a library.
pacman -Sii libutempter shows:
Required By     : guake  kpty  mosh  tmate  tmux  xterm
Possibly one of those might help for other terminals, but  I'm not so sure. It sounds like kpty might be integrated into KDE and possibly that is why it works there.
It seems this command will get you similar info:
Code: [Select]
$ lsof /dev/pts/*
I always get my graphical session on tty7 but I'd be surprised if I didn't because I am using startx and have edited /etc/conf.d/agetty.tty7 to give an autologin. So if that changes,  it's due to whatever you use to start your desktop session, not the desktop itself.

 

Re: tty + who

Reply #6
Hi,

I just run w command again, and got this output>
Code: [Select]
w
 15:00:59 up  3:02,  2 users,  load average: 0.92, 1.11, 1.14
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   tty7      12:09    3:02m  7:59   0.28s xfce4-session

What is interesting is that the tty i am logged into changes, i have already had >
Code: [Select]
w
 15:02:25 up  3:04,  2 users,  load average: 1.08, 1.11, 1.14
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   tty6      12:09    3:03m  8:04   0.28s xfce4-session
And also>
Code: [Select]
w
 15:02:25 up  3:04,  2 users,  load average: 1.08, 1.11, 1.14
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
tokaro   tty5      12:09    3:03m  8:04   0.28s xfce4-session

I am using SDDM as DM, do not know whether it may be related?

Could it be a bug?

I am running Linux-hardened kernel, might it explain this behavior?