You are not logged in.

#1 2016-03-10 11:13:52

yoanar
Member
Registered: 2012-06-10
Posts: 24

[SOLVED] No output from neither the w or who commands

~ ❯❯❯ w
 12:07:50 up 9 min,  0 users,  load average: 0,21, 0,20, 0,12
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
~ ❯❯❯ who -a
           systemoppstart 2016-03-10 11:58
BRUKERNAVN   tty1         2016-03-10 11:58               456 id=tty1
~ ❯❯❯ grep "pts" /var/run/utmp

No output. It's very difficult to find help through search engines, I never found anyone with the same problem.
I tried these commands with lots of terminals open, but I still get no results.

Also, which package(s) provide(s) the w and who commands? I attempted to reinstall coreutils.

Last edited by yoanar (2016-03-14 19:44:15)


Meh.

Offline

#2 2016-03-10 11:44:53

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] No output from neither the w or who commands

w is owned by procps-ng. In future, use

pacman -Qo </path/to/file>

to find which package a file belongs to.

What is the output of

ls -l /var/run/utmp

Offline

#3 2016-03-10 12:04:20

yoanar
Member
Registered: 2012-06-10
Posts: 24

Re: [SOLVED] No output from neither the w or who commands

~ ❯❯❯ ls -l /var/run/utmp
-rw-rw-r-- 1 root utmp 1152 mars  10 12:58 /var/run/utmp

Also attempted to reinstall, but still not getting any results. Running the commands with sudo does nothing either.

Last edited by yoanar (2016-03-10 12:06:28)


Meh.

Offline

#4 2016-03-10 12:11:09

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] No output from neither the w or who commands

Well, the file does seem to be populated and updated recently, and the permissions and ownership seem fine too. I am not sure what the problem could be, but at the very least try removing that file and recreating it with the same permissions and ownership. Then launch a new tty and see if any entry shows.

Offline

#5 2016-03-10 12:21:40

yoanar
Member
Registered: 2012-06-10
Posts: 24

Re: [SOLVED] No output from neither the w or who commands

Attempted to recreate the file, but still not getting anything.
Here are the commands used:

run ❯❯❯ sudo mv utmp utmp.bak
run ❯❯❯ sudo touch utmp
run ❯❯❯ sudo chgrp utmp utmp
run ❯❯❯ sudo chmod g+w utmp

Then i logged into tty2, and I could see this in w.

~ ❯❯❯ w
 13:19:09 up  1:20,  1 user,  load average: 0,15, 0,17, 0,15
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
user    tty2      13:17    1:24   0.07s  0.07s -zsh

I attempted to log out of my x-session and log in again, but the x-session is still not showing up in the w output, neither are the /dev/pts/* ttys used by graphical terminal emulators.


Meh.

Offline

#6 2016-03-10 12:28:50

yoanar
Member
Registered: 2012-06-10
Posts: 24

Re: [SOLVED] No output from neither the w or who commands

I just read the wiki-page for slim, apparently it doesn't support logind. I'm not familiar enough with systemd to know how that affects this however, but i tried the following:

Just disabled and stopped slim, then logged in via a console-tty + startx.

Now I'm getting:

~ ❯❯❯ w
 13:26:32 up  1:28,  2 users,  load average: 0,40, 0,37, 0,25
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
user     tty2      13:17    8:47   0.07s  0.07s -zsh
user     tty1      13:23    3:27  57.33s  0.00s xinit /home/user/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -auth /tmp/serverauth.28htDS2BuH

But the /dev/pts/* files are not showing up.


Meh.

Offline

#7 2016-03-10 12:50:26

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] No output from neither the w or who commands

Is logind running?

Offline

#8 2016-03-10 13:12:39

yoanar
Member
Registered: 2012-06-10
Posts: 24

Re: [SOLVED] No output from neither the w or who commands

The problem seems to be with ROXTerm, which is the terminal emulator I use, sakura has the same problem.
Konsole and xterm update the /var/run/utmp file, but some terminals don't.


Meh.

Offline

#9 2016-03-10 18:41:48

Vain
Member
Registered: 2008-10-19
Posts: 179
Website

Re: [SOLVED] No output from neither the w or who commands

yoanar wrote:

some terminals don't.

That's just right. Some terminals simply don't update that file. There's not much you can do about it except for writing to that file by yourself.

Support for utmp/wtmp has "recently" been removed completely from VTE3 which is used by ROXTerm. You can read up on that here: https://bugzilla.gnome.org/show_bug.cgi?id=747046

Offline

#10 2016-03-14 19:43:28

yoanar
Member
Registered: 2012-06-10
Posts: 24

Re: [SOLVED] No output from neither the w or who commands

Thanks for the link Vain, marking this issue as solved now.


Meh.

Offline

Board footer

Powered by FluxBB