If I do "w" on my system, I get this output: ----- w: /dev/:0: No such file or directory w: /dev/air.:0: No such file or directory 9:04PM up 20:32, 0 users, load averages: 0.04, 0.06, 0.02 USER TTY FROM LOGIN@ IDLE WHAT ----- I guess it tries to interpret the terminal (usually something like ttyv1) as an entry in /dev, however a user can also be logged in on an X session such as :0 or remotehost:0. These "terminals" should not be interpreted as entries in /dev. Running "who" on my system shows what is really happening: ----- michael :0 Mar 11 20:57 alison air.:0 Mar 11 20:52 ----- I have configured this host as a remote X server, so most logins are actually performed remotely using XDMCP, but I expect this will also work if only a local X session is active. How-To-Repeat: establish an X session on the host, then issue "w".
On Mon, Mar 11, 2002 at 02:10:17AM -0800, Michael Wardle wrote: [snip] > >Description: > If I do "w" on my system, I get this output: > ----- > w: /dev/:0: No such file or directory > w: /dev/air.:0: No such file or directory > 9:04PM up 20:32, 0 users, load averages: 0.04, 0.06, 0.02 > USER TTY FROM LOGIN@ IDLE WHAT > ----- > > I guess it tries to interpret the terminal (usually something like ttyv1) as an entry in /dev, however a user can also be logged in on an X session such as :0 or remotehost:0. These "terminals" should not > be interpreted as entries in /dev. You should bet getting the pty(4) associated with the session. > Running "who" on my system shows what is really happening: > ----- > michael :0 Mar 11 20:57 > alison air.:0 Mar 11 20:52 > ----- > > I have configured this host as a remote X server, so most logins are > actually performed remotely using XDMCP, but I expect this will also > work if only a local X session is active. Hmmm... $ echo $DISPLAY blossom.cjclark.org:10.0 $ tty /dev/ttyp3 $ w 3:31AM up 33 days, 3:08, 7 users, load averages: 1.02, 1.03, 1.00 USER TTY FROM LOGIN@ IDLE WHAT cjc p0 vegeta Wed08AM 1 emacs /var/tmp/tmp_cjc/mutt-blossom-57999-1626 cjc p1 blossom.cjclark. Wed08AM 35 tcsh cjc p2 blossom.cjclark. Wed08AM 49 tcsh > >How-To-Repeat: > establish an X session on the host, then issue "w". What does 'tty' return for one of these sessions? -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org
[...] > What does 'tty' return for one of these sessions? This is precisely the problem -- it is not a terminal, indeed there is no way to issue "tty". I can only issue "tty" if I start a terminal emulator, but the problem is when w tries to look directly at the X session itself, not any terminal I have spawned from within the X session. In the same way, I can't "write" a user on one of these X sessions unless they have opened a terminal emulator (such as xterm or konsole). __________________________________________________ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/
On Mon, Mar 11, 2002 at 05:09:30AM -0800, Michael Wardle wrote: > > [...] > > > What does 'tty' return for one of these sessions? > > This is precisely the problem -- it is not a terminal, indeed there is > no way to issue "tty". I can only issue "tty" if I start a terminal > emulator, but the problem is when w tries to look directly at the X > session itself, not any terminal I have spawned from within the X > session. Ah. Now I realize what you are talking about. You're using xdm(8). xdm(8) is well known for putting broken entries into utmp(5). There isn't much w(1) can do about it. xdm(8) is feeding it invalid data. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org
--- "Crist J. Clark" <crist.clark@attbi.com> wrote: > On Mon, Mar 11, 2002 at 05:09:30AM -0800, Michael Wardle wrote: > > > > [...] > > > > > What does 'tty' return for one of these sessions? > > > > This is precisely the problem -- it is not a terminal... [...] > Ah. Now I realize what you are talking about. You're using > xdm(8). xdm(8) is well known for putting broken entries into > utmp(5). There isn't much w(1) can do about it. xdm(8) is feeding it > invalid data. > -- So we could file bugs against xdm, kdm, and gdm, and hope that they change their manipulation of utmp, but as I stated in my original bug, "who" gives some useful information about users logged in on X sessions, presumably derived from utmp, so I'm guessing what we get from utmp isn't about to change. At the very least, as there seems to be agreement that this is a common problem, could "w" be modified to first test whether a corresponding entry exists in /dev for that "terminal", and if it does not, "w" ignores that one? I would actually wonder whether "w" should indeed print useful information about each session (including non-terminal logins), to give it parity with "who", but at least ignoring non-terminals would workaround the error messages. ===== MICHAEL WARDLE MAIL michael@endbracket.net MOBILE +61-415-439-838 WWW http://www.endbracket.net/michael/ __________________________________________________ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped