From owner-freebsd-bugs Mon Mar 11 3:40: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A531937B404 for ; Mon, 11 Mar 2002 03:40:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2BBe2J54539; Mon, 11 Mar 2002 03:40:02 -0800 (PST) (envelope-from gnats) Date: Mon, 11 Mar 2002 03:40:02 -0800 (PST) Message-Id: <200203111140.g2BBe2J54539@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Crist J. Clark" Subject: Re: bin/35769: w does not correctly interpret X sessions Reply-To: "Crist J. Clark" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/35769; it has been noted by GNATS. From: "Crist J. Clark" To: Michael Wardle Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/35769: w does not correctly interpret X sessions Date: Mon, 11 Mar 2002 03:31:59 -0800 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message