LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   repeat entries in 'who' answer (https://www.linuxquestions.org/questions/linux-newbie-8/repeat-entries-in-who-answer-402234/)

Lordandmaker 01-11-2006 06:52 PM

repeat entries in 'who' answer
 
If i say 'who' to console, i get the response:
Code:

avi      :0          Jan 11 12:43
avi      pts/0        Jan 11 12:43
avi      pts/1        Jan 12 00:04
avi      pts/3        Jan 11 13:24

(my username is 'avi').

Is it supposed to come up four times, and if so, why? If not, why is it, and how do i fix it?

pixellany 01-11-2006 07:02 PM

It has to do with terminals--look at "man pts" for some leads.

(You guessed correctly--I don't know the answer....;) )

General rule: if the machine says something like xyz, chances are good that either "man xyz", or "info xyz" will help translate.
If not, try "xyz linux" on Google

Lordandmaker 01-11-2006 07:09 PM

'Man pts' and 'info pts' return nothing. 'man who' just gives the switches.

I know the info comes from the file /var/run/utmp. The contents of this are:
Code:

==> append : to filename to view the  data source
reboot
runlevel
tty1
LOGIN
tty2
LOGIN
tty3
LOGIN
tty4
LOGIN
tty5
LOGIN
tty6
LOGIN
pts/0
pts/1
pts/2
pts/3
~
~

And the tildes keep going.

If i append the colon, i get something that's very non-human readable.

Through Google i find that 'pts' is a Pseudo Terminal Session, and they're used for XTerm sessions. But i can't find reason for four....

I've got four desktops, which was my first thought, but i figured this would be at GUI level, and not affect the logins details.

gilead 01-11-2006 07:14 PM

It normally reports each of your active logins. How many console windows, terminals and/or ssh sessions did you have active when you ran this?

You can also run the `last` command to see the listing of the last logged in users.

bulliver 01-11-2006 07:20 PM

Quote:

avi :0 Jan 11 12:43
avi pts/0 Jan 11 12:43
avi pts/1 Jan 12 00:04
avi pts/3 Jan 11 13:24
This is because you are logged in on several different virtual consoles. To see what processes are attached to each, you could run:
Code:

$  ps aux | grep "pts/"
I do not see this line:
Code:

avi      :0          Jan 11 12:43
on my own system, but I do not use a display manager. I suspect that you are using xdm,kdm or gdm, and that is where this login is coming from.


All times are GMT -5. The time now is 01:32 PM.