You are not logged in.

#1 2022-11-19 02:40:15

Alynor
Member
Registered: 2022-11-18
Posts: 5

who command - Always more than one user

Every time I use the who command, it will always list these three "users":

$ who
username    tty1         Nov 18 20:24 (:0)
username    pts/0        Nov 18 20:24 (:0)
username    pts/1        Nov 18 20:24 (:0)
$

When I'm only using one single terminal. And, apparently I'm the last one:

$ who am i
username    pts/1        Nov 18 20:24 (:0)
$

Can you help me figure out why? AFAIK it should only display one line when I only have one terminal open. What does the tty and pts stand for?
I'm using Arch x86_64 5.15.53-1-lts with Plasma 5.25.2.

Last edited by Alynor (2022-11-19 18:28:17)

Offline

#2 2022-11-19 03:36:42

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: who command - Always more than one user

tty is a virtual terminal/console, whereas pts is a terminal emulator. So pts/1 says your terminal is running within a graphical session (X or Wayland, maybe). The tty (1) is presumably the one on which your graphical session is running.  The :0 at the end indicates the DISPLAY (at least if this is X - I don't know about Wayland).

I don't know why you get pts/0 (but it is normal).

who -a

will show you more information.

info '(coreutils) who invocation'

explains the output.

Last edited by cfr (2022-11-19 03:38:37)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-11-19 18:26:55

Alynor
Member
Registered: 2022-11-18
Posts: 5

Re: who command - Always more than one user

Thanks for the help! I didn't know

who -a

also showed the PID for the users. Upon investigating them with

ps -ef | grep PID

I found out that

tty1: /usr/bin/startplasma-x11
pts0: /usr/bin/kded5

I don't really like that pts0 user, so I tried disabling kded5 (by disabling KWallet and also by erasing that binary), but KDE does weird things when that happens (stuff like forgetting Wifi passwords or plainly refusing to connect to Wifi). I guess I will have to deal with it.
Anyways, thanks again!

Offline

#4 2022-11-19 19:27:38

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: who command - Always more than one user

Interesting. I didn't realise it was kded.

As far as I can tell, kded is more-or-less mandatory if you want KDE. I think it is a characteristic of any substantive DE - it will depend on a bunch of stuff, including a bunch of stuff you might not otherwise want. Deleting binaries is not a good way to handle not liking what they're doing. Aside from anything else, it will confuse pacman if installed files don't match what it expects.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2022-11-21 19:17:42

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: who command - Always more than one user

Here is my output within KDE desktop

who
lex      tty1         2022-11-21 17:45 (:0)

Ukrainian

Offline

#6 2022-11-21 21:43:07

xerxes_
Member
Registered: 2018-04-29
Posts: 1,065

Re: who command - Always more than one user

You can try also 'w' command.

Offline

#7 2022-11-22 00:21:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: who command - Always more than one user

webcapcha wrote:

Here is my output within KDE desktop

who
lex      tty1         2022-11-21 17:45 (:0)

How did you avoid kded?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2022-11-22 09:49:22

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: who command - Always more than one user

I dont know. I'm not quite experienced on this topic. Just shared my output.


Ukrainian

Offline

#9 2022-11-22 11:12:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,424

Re: who command - Always more than one user

ps aux | grep kded

in the same environment where you ran "who".
Do you use some DM or startx?

Offline

#10 2022-11-22 15:05:24

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: who command - Always more than one user

is it question to me? If yes, then here we go

> ps aux | grep kded
lex          592  0.0  1.2 1889320 97336 ?       Ssl  Nov21   0:30 /usr/bin/kded5
lex        40619  0.0  0.0   6564  2476 pts/0    S+   17:04   0:00 grep --colour=auto kded

regarding second question SDDM is my choice

Last edited by webcapcha (2022-11-22 15:10:43)


Ukrainian

Offline

#11 2022-11-22 15:17:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,424

Re: who command - Always more than one user

So the process is there, now check

ps -ef | grep kded5

Disclaimer: not running KDE and I've no idea whether kded is supposed to run on its own terminal.
We might also want to look at your "who -a" in case Alynor misinterpreted the output.

Offline

#12 2022-11-22 15:19:27

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: who command - Always more than one user

> ps -ef | grep kded5
lex          592     555  0 Nov21 ?        00:00:31 /usr/bin/kded5
lex        41935    3678  0 17:18 pts/0    00:00:00 grep --colour=auto kded5

~

> who -a
           system boot  2022-11-21 17:45
lex      + tty1         2022-11-21 17:45  old          563 (:0)

Ukrainian

Offline

#13 2022-11-22 15:29:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,424

Re: who command - Always more than one user

No.

Wild guess: what's

pacman -Qs libutempter

for both of you (anyone)?

Offline

#14 2022-11-22 15:31:48

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: who command - Always more than one user

> pacman -Qs libutempter
local/libutempter 1.2.1-3
    Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files

Ukrainian

Offline

#15 2022-11-22 15:35:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,424

Re: who command - Always more than one user

Ok, I had hoped that the OP has it and you don't and something just utempters stuff into utmp for him hmm

Offline

#16 2022-11-22 19:46:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: who command - Always more than one user

@webcapcha Do you have kpty installed?

seth wrote:

So the process is there, now check

ps -ef | grep kded5

Disclaimer: not running KDE and I've no idea whether kded is supposed to run on its own terminal.

I said earlier it was normal because it does here, too, unless I'm misinterpreting.

seth wrote:

We might also want to look at your "who -a" in case Alynor misinterpreted the output.

Realise this was aimed at somebody without kded on pts0, but in case it is useful:

$ who -a
           system boot  2022-11-13 23:24
dienw   + tty7         2022-11-13 23:24  old          928 (:0)
dienw   + pts/0        2022-11-13 23:24  old         1036 (:0)
dienw   - pts/27       2022-11-13 23:24  old         1394 (:0)
dienw   - pts/16       2022-11-13 23:24  old         1396 (:0)
dienw   - pts/17       2022-11-13 23:24  old         1403 (:0)
dienw   - pts/18       2022-11-13 23:24 04:22        1409 (:0)
dienw   - pts/19       2022-11-13 23:24   .          1418 (:0)
dienw   - pts/20       2022-11-13 23:24  old         1431 (:0)
dienw   - pts/21       2022-11-13 23:24  old         1445 (:0)
dienw   - pts/22       2022-11-13 23:24  old         1459 (:0)
dienw   - pts/23       2022-11-13 23:24  old         1480 (:0)
dienw   - pts/24       2022-11-13 23:24  old         1502 (:0)
dienw   - pts/25       2022-11-13 23:24  old         1518 (:0)
dienw   - pts/26       2022-11-13 23:24  old         1529 (:0)
dienw   - pts/28       2022-11-13 23:24  old         1543 (:0)
dienw   - pts/15       2022-11-13 23:24  old         1553 (:0)
dienw   - pts/29       2022-11-13 23:24  old         1567 (:0)
dienw   - pts/30       2022-11-13 23:24 12:54        1650 (:0)
dienw   - tty2         2022-11-19 02:10  old        68579
LOGIN      tty3         2022-11-19 03:09             69812 id=tty3
$ w
 19:38:35 up 8 days, 20:14, 19 users,  load average: 0.13, 0.24, 0.32
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
dienw   tty7      13Tach22  8days  1:29m  0.18s /usr/bin/startplasma-x11
dienw   pts/0     13Tach22  8days  0.00s  2:47  /usr/bin/kded5
dienw   pts/27    13Tach22  2days  0.46s  0.46s /bin/bash
dienw   pts/16    13Tach22  2days  0.66s  0.66s /bin/bash
dienw   pts/17    13Tach22  8days  0.04s  0.04s /bin/bash
dienw   pts/18    13Tach22  4:23m  1.35s  1.35s /bin/bash
dienw   pts/19    13Tach22  3.00s  4.68s  0.01s w
dienw   pts/20    13Tach22  2days  0.13s  0.13s /bin/bash
dienw   pts/21    13Tach22  8days  0.03s  0.03s /bin/bash
dienw   pts/22    13Tach22  8days  0.04s  0.04s /bin/bash
dienw   pts/23    13Tach22  8days  0.03s  0.03s /bin/bash
dienw   pts/24    13Tach22  8days  0.03s  0.03s /bin/bash
dienw   pts/25    13Tach22  2days  0.66s  0.66s /bin/bash
dienw   pts/26    13Tach22  3days  7.15s  7.15s /bin/bash
dienw   pts/28    13Tach22  2days  1.95s  1.95s /bin/bash
dienw   pts/15    13Tach22  8days  0.03s  0.03s /bin/bash
dienw   pts/29    13Tach22  8days  0.03s  0.03s /bin/bash
dienw   pts/30    13Tach22 12:55m  1.91s  1.91s /bin/bash
dienw   tty2      Sad02    2days 25:10   0.61s -bash
$ ps -ef | grep kded
dienw      1036     916  0 Tach13 ?       00:02:47 /usr/bin/kded5
dienw    121663    1418  0 19:40 pts/19   00:00:00 /usr/bin/grep --colour=auto kded
$ pacman -Qs libutempter
local/libutempter 1.2.1-3
    Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files
No pacnew files to update.
$ pactree -r libutempter
libutempter
├─kpty
│ ├─kdesu
│ │ └─kde-cli-tools
│ │   └─plasma-workspace
│ │     ├─kdeplasma-addons
│ │     ├─khotkeys
│ │     ├─plasma-browser-integration
│ │     ├─plasma-pa
│ │     ├─powerdevil
│ │     └─systemsettings
│ │       ├─kgamma5
│ │       ├─kinfocenter
│ │       │ └─plasma-disks
│ │       └─plasma-desktop
│ ├─konsole
│ ├─kwrited
│ └─okular
│   └─kile
└─xterm

[Surprised to see screen isn't listed, despite the description.]

Edit: it makes ~/.config/kded5rc. I read the manual page and it doesn't say anything about running on pts0, but I might not have understood the implications of what it does say (especially about dbus, though I never heard of that needing a pts?)..

Last edited by cfr (2022-11-22 20:08:16)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#17 2022-11-22 21:17:47

webcapcha
Member
Registered: 2019-02-14
Posts: 167

Re: who command - Always more than one user

>>> @webcapcha Do you have kpty installed?

I do

Depends On      : kcoreaddons  ki18n  libutempter

Last edited by webcapcha (2022-11-22 21:18:19)


Ukrainian

Offline

Board footer

Powered by FluxBB