You are not logged in.

#1 2015-06-22 09:05:46

fallchildren
Member
Registered: 2014-03-23
Posts: 9

last/who/w command doesn't print out users using x

Hello,

I am using sddm (default on tty1) with awesome wm and all above commands don't track my X logins through sddm (if I execute startx on another tty it is displayed). Strange thing is that this seems to be the case since the 4th of may according to last commands output and I have been using this set up quite longer. I changed the display manager to lightdm with no change to the problem.

I'd really like to use the who command in a shell script so if anyone knows what could be wrong with my set up please help me smile

Offline

#2 2015-06-22 09:37:26

fallchildren
Member
Registered: 2014-03-23
Posts: 9

Re: last/who/w command doesn't print out users using x

Okay this has been a misunderstanding of the above commands on my side. I have been switching from xterm to urxvt a bit over a month ago and urxvt does not get listed as logged in (why?). What I actually tried to do was getting all DISPLAY variables of all users running a X session, so I have to find another way around my problem and it has nothing to do with last/w/who commands.

So I guess this can be closed. Sorry for the unecessary post.

Offline

#3 2015-06-22 10:20:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: last/who/w command doesn't print out users using x

ps -C Xorg -o args= | cut -c 28

works for me ;P

You can try parsing

xauth list

Offline

#4 2015-06-23 09:00:04

fallchildren
Member
Registered: 2014-03-23
Posts: 9

Re: last/who/w command doesn't print out users using x

thanks for the advice!

I've found another decent solution for my problem using logind's loginctl. The show-session command reports the user as well as the DISPLAY variable of the given user. Now I only have to parse the output and tada smile

Offline

#5 2015-06-23 09:35:02

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: last/who/w command doesn't print out users using x

fallchildren wrote:

I've found another decent solution for my problem using logind's loginctl. The show-session command reports the user as well as the DISPLAY variable of the given user. Now I only have to parse the output and tada smile

That only works with DMs, doesn't it?


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#6 2015-06-23 11:05:39

fallchildren
Member
Registered: 2014-03-23
Posts: 9

Re: last/who/w command doesn't print out users using x

That is a good point. You are perfectly right xsessions started with startx are not being listed. Maybe even just for a subset of DMs (which use logind)?

Offline

Board footer

Powered by FluxBB