You are not logged in.

#1 2015-10-26 19:34:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Why does /usr/bin/{users,w,who} not output me when logged into xfce4

Within the past few months, I am invisible from /usr/bin/users it seems (running it gives a null).  Is this true for others?  I am running lxdm+xfce4 and logging locally.

EDIT:  Neither /usr/bin/w nor /usr/bin/who nor /usr/bin/users finds me hmm

Even running them as root gives no output that is reflective of who is logged into the box.  Has loginctl totally taken over or...?

Last edited by graysky (2015-10-26 19:45:17)

Offline

#2 2015-10-26 19:45:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

Log in without lxdm and see if that makes a difference.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-10-26 19:46:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

jasonwryan wrote:

Log in without lxdm and see if that makes a difference.

Yes, Logging into a tty or ssh makes me show-up in those tools.

Offline

#4 2015-10-26 19:48:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

Seems most display managers break things implement their own unique approach.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2015-10-26 19:52:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

Well, if my goal is to find users logged into my box through loginctl:

loginctl --no-legend list-users | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ /g'

Does that seem sane?

Offline

#6 2015-10-26 20:02:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,541
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

I can see why the X session wouldn't be listed if the DM does things it's own way - but once you open a virtual terminal, that session should count - I would think.

For me each 'window' in tmux under X counts as a distinct login (so I show up 4 times when I have 3 tmux windows/panes/tabs open).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2015-10-26 20:08:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

graysky wrote:

Well, if my goal is to find users logged into my box through loginctl:

loginctl --no-legend list-users | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ /g'

Does that seem sane?

Close:

loginctl --no-legend list-users | awk '{ printf "%s ",$2 }'

smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2015-10-26 20:24:46

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

jasonwryan wrote:
graysky wrote:

Well, if my goal is to find users logged into my box through loginctl:

loginctl --no-legend list-users | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ /g'

Does that seem sane?

Close:

loginctl --no-legend list-users | awk '{ printf "%s ",$2 }'

smile

That ends in an odd, highlighted symbol for me:

facade love %

Offline

#9 2015-10-26 20:34:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

That's Zsh's symbol for the lack of a new line. It shouldn't be an issue if you are scripting.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2015-10-26 21:33:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Why does /usr/bin/{users,w,who} not output me when logged into xfce4

Thanks, learn something new every day.

Offline

Board footer

Powered by FluxBB