I have a strange problem: In a GUI session, depending on the terminal being used the following two (related) problems appear:
who
andw
doesn't list the user's active sessionlogname
returnslogname: no login name
It happens in the following terminals:
- lxterminal
- xfce4-terminal
- rxvt
On the other hand, in the following scenarios it works perfectly (who/w lists the user and logname functions):
- ssh-ing in
- xterm / lxterm / uxterm
whoami
?sudo ps h -o cmd $$ | awk '{print $1}' | sed 's/\/bin\///'