LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-11-2023, 08:38 PM   #1
PsychoHermit
Member
 
Registered: Aug 2021
Location: Carson City Nevada
Distribution: Debian Testing
Posts: 137

Rep: Reputation: Disabled
Question Why am I logged in twice?


Greetings folks,

Running Debian testing. Why do I appear to be logged in twice? This is a recent development. GKRellm used to show 1 users. Searching comes up with two likely looking posts, but it's on stack exchange and there's a cookie dialog that I cannot close so I can't read the posts.
[edit] Actually I was able to scroll line by line and the posts were no help. [/edit]


If I go to a terminal and enter who it shows me on seat0 and tty2.

Code:
glenn@LinuxBox:~$ who
glenn    seat0        2023-08-12 01:05 (login screen)
glenn    tty2         2023-08-12 01:05 (tty2)
Thanks in advance for any suggestions.
--glenn

Last edited by PsychoHermit; 08-14-2023 at 08:24 AM. Reason: solved
 
Old 08-11-2023, 08:48 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,335
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
Try running the "w" command, then post the output here. See man w for more.
 
1 members found this post helpful.
Old 08-11-2023, 08:52 PM   #3
PsychoHermit
Member
 
Registered: Aug 2021
Location: Carson City Nevada
Distribution: Debian Testing
Posts: 137

Original Poster
Rep: Reputation: Disabled
Running the w command as requested

Code:
glenn@LinuxBox:~$ w
 18:50:36 up 6 min,  2 users,  load average: 1.50, 1.11, 0.55
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
glenn    seat0    login-           01:44    0.00s  0.00s   ?    /usr/libexec/gd
glenn    tty2     tty2             01:44     ?     0.06s  0.06s /usr/libexec/gn
Thanks,
glenn
 
Old 08-12-2023, 02:50 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,899

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
if I need to guess you logged in only once, using seat0, and opened a terminal, that is tty2.
probably this helps: https://wiki.archlinux.org/title/Xorg_multiseat
 
1 members found this post helpful.
Old 08-12-2023, 10:31 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Huh ... I guess, in all these years, "I never tried all the letters." I didn't until today know about "w." (Presumed synonyms for it, yes.)
 
Old 08-12-2023, 08:43 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,335
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
To tell the truth, I didn't know about w until yesterday, when I did a web search for something like "how to list logged in users linux."

And I want to thank pan64 for interpreting your findings for me!
 
Old 08-13-2023, 03:42 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,899

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
this is from the old days when short (two-letter) commands were invented (like vi, ex, ls, cd...), when typing grep and find were extremely tiresome. This was the time when the who command was shortened to w. Today they are not the same, they are just very similar. who w. Anyway, that was another century.
 
Old 08-13-2023, 05:50 AM   #8
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Do you have USB plugged in or any graphics device used ?
 
Old 08-13-2023, 07:19 AM   #9
PsychoHermit
Member
 
Registered: Aug 2021
Location: Carson City Nevada
Distribution: Debian Testing
Posts: 137

Original Poster
Rep: Reputation: Disabled
No, no USB or graphics device.

Thanks,
--glenn
 
Old 08-13-2023, 10:19 PM   #10
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,157

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
loginctl << run this command what's the output?

Seat0 is the default seat in Linux. It is the seat that is used when you first boot your system. The login screen is displayed on tty1, and the graphical user interface (GUI) is displayed on tty2.
TTY2 is the second terminal associated with seat0. It is typically used for running command-line programs.

TTY stands for "teletypewriter."
check out this link for more: https://unix.stackexchange.com/quest...d-xorg-session
 
Old 08-13-2023, 10:37 PM   #11
PsychoHermit
Member
 
Registered: Aug 2021
Location: Carson City Nevada
Distribution: Debian Testing
Posts: 137

Original Poster
Rep: Reputation: Disabled
Code:
glenn@LinuxBox:~$ loginctl
SESSION  UID USER  SEAT  TTY  STATE  IDLE SINCE
     11 1000 glenn seat0 tty2 active no        

1 sessions listed.
Thanks,
--glenn
 
Old 08-14-2023, 12:18 AM   #12
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,157

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Lightbulb

Quote:
Originally Posted by PsychoHermit View Post
Code:
glenn@LinuxBox:~$ loginctl
SESSION  UID USER  SEAT  TTY  STATE  IDLE SINCE
     11 1000 glenn seat0 tty2 active no        

1 sessions listed.
Thanks,
--glenn
Then it's good nothing to worry about. and if you type: w

I believe tty2 will be there also since you opened a terminal

If you type loginctl and you see other peoples name that you don't recognize then you need to unplugged the cable quickly or disable the wireless

Last edited by JJJCR; 08-14-2023 at 08:25 PM. Reason: edit
 
1 members found this post helpful.
Old 08-14-2023, 12:19 AM   #13
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,899

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
Quote:
Originally Posted by PsychoHermit View Post
Code:
glenn@LinuxBox:~$ loginctl
SESSION  UID USER  SEAT  TTY  STATE  IDLE SINCE
     11 1000 glenn seat0 tty2 active no        

1 sessions listed.
Thanks,
--glenn
Do you have any other question? If not you might want to mark the thread solved. Also if you want to say thanks just click on yes.
 
1 members found this post helpful.
Old 08-23-2023, 11:10 AM   #14
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,804

Rep: Reputation: 1203Reputation: 1203Reputation: 1203Reputation: 1203Reputation: 1203Reputation: 1203Reputation: 1203Reputation: 1203Reputation: 1203
In the early Unix days every login was a terminal (tty1, tty2, ...).
The login process added an entry to the utmp file.
The commands w and who query the utmp file, and could be used to show the logged in users.

A graphical desktop login does not have a terminal. Nevertheless it should make a utmp entry (X-based desktops used :0 :1 etc.). Every terminal/shell opened from the desktop should make a utmp entry as well (tty1, tty2, ...).
utmp does not really distinguish between a first system access and subsequent terminals.
systemd solves it by creating a user session for each system access (seat0, seat1, ...).
Now the loginctl command shows the logged in users.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is there a cli method of running a command twice without having to type it twice? powderburns Linux - Software 4 03-24-2017 09:55 AM
Logged in users on a Linux server are counted twice walterthered Linux - Security 3 02-05-2015 03:38 PM
Why am I told I'm logged out after I've logged in? Airidh LQ Suggestions & Feedback 1 02-25-2011 10:35 AM
Writing a script to kill users logged in twice scrizo Programming 7 10-10-2007 12:01 PM
Why does who show me logged in twice? dbruso Linux - Newbie 1 10-10-2006 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration