• Problem with "WHO" command under my unofficial iso


    Hey guys i’ having a weird behaviour and don’t know how to fix:
    I need the who command to work in the installed system (it is perfect for a script). It works in the liveiso but only work at installed system after executed at xterm see screenshot

    0_1508260685050_who.jpg

    UPDATE:
    opening xterm is enough to make work function
    0_1508261000846_who1.jpg

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • may a bug with tilix?

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3 GNOME

  • @joekamprad said in Problem with "WHO" command under my unofficial iso:

    may a bug with tilix?

    i’ll test other terminals here…
    UPDATE: same bug with xfce4-terminal
    And is interesting that running the livecd tilix works… I have made some changes in my installer i’ll revert tham and see how it goes…

    Digging: Seems something related with /var/run/utmp while xterm change it when launched other terminal in my install are unable to do it…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Without opening xterm yet and with who failing, what happens after you invoke bash -l within Tillix?

    For completion also try $ /usr/bin/sh -lc 'who' while who is still failing.

  • @Krugar said in Problem with "WHO" command under my unofficial iso:

    /usr/bin/sh -lc ‘who’

    still the same, no output
    0_1508273483749_who2.jpg

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • Mighty weird. I’m particularly dumbstruck by why would not ALL the terminals fail. You see, from all I know, /var/run/utmp is generated by root at boot. It has got nothing to do with bash configuration files (which you just confirmed to me). And for the most part of normal computer operations, utmp remains unchanged throughout the session.

    I’m not sure I can help any further. Or that I even understand the nature of the problem. In any case, here’s my utmp stat. Hope this helps somehow:

    $ ls -l /var/run/utmp 
    -rw-rw-r-- 1 root utmp 768 Oct 17 10:51 /var/run/utmp
    
  • @Krugar Ok no problem, thanks for your help anyway!

    [email protected] ~ % ls -l /var/run/utmp
    -rw-rw-r-- 1 root utmp 768 out 17 20:17 /var/run/utmp
    

    I found another bug (fixed, firejail related) and i’m trying different solutions.
    The big problem is that i never used this command before, so i’m not sure if this error is new or has been happening for a while.
    Although i test exhaustively the iso before releasing is obvious that i can’t cover everything… I’ll test the old PacBang linux and see if the error is from original installer…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • OK, the problem comes since PacBang, at least the problem is not one of my modifications hehehe.

    0_1508279838418_who3.jpg

    I’ll keep on trying to discover what may be the problem…
    If anyone has more ideas just tell me and i can do more tests.
    Thanks!

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto said in Problem with "WHO" command under my unofficial iso:

    PacBang

    That changes it all. And in light of the information below, PacBang must simply not be creating a valid utmp.

    I found man utmp which you should also read. It explains which processes create the file on boot and which maintain it. It also explains why xterm is working. It actually maintains the file. And in doing so, it certainly fixes whatever is wrong in the original struct created by PacBang installed tools. Because terminal emulators are not required to perform this maintenance task, those who don’t fail.

    PacBang is over an year old. Last version is from April last year and it has been abandoned. So I would really suggest dropping it. It clearly needs maintenance. But if you want to keep using it, to fix this bug you’ll need to somehow update its base packages. The culprit must be within the base group, likely the util-linux package which contains agetty and utmpdump, among other things. The certainly much older systemd version it ships with may also be the problem. From my understanding PacBang was an offline installer. Correct?

  • @Krugar
    Hi! Thanls for helping me with it.

    I guess i didn’t explained it right, sorry:
    My iso is builded with makarchiso and is totally different from PacBang. I just forked the offline installer which i’m improving and adding more functions and code. (i installed pacbang today just to replicate the error and check if was already present)
    I already made a try installing util-linux with force option just to be sure in a VM and who still doesn’t work.

    work works running the livecd but stops working when the system is installed, so probably there is some config in the offline installer missing, permissions problem or something else.

    EDIT: You are right about the xterm quoted in the manual. I just confirmed in my real Antergos that my terminal is also unable to use the command who with some terminals, like lxterminal, xfceterminal, tilix, gnometerminal while others like xterm, guake and any tty work fine. That’s why the command work for both isos, the livecd uses systemd.unit=multi-user.target (terminal login tty) and not graphical.target using login managers (wich is used after install).

    So that’s actually not a bug, but i really need a replacement for that command now :)
    For now i’ll be using cat /etc/passwd | grep "/home" |cut -d: -f1 |head -1

    I’m marking this as solved since is not actually a bug.
    Thank you all for the help and time specially @krugar and @joekamprad

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

Posts 11Views 213
Log in to reply