Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bruce.cs.monash.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!cs.utexas.edu!uunet!Germany.EU.net!netmbx.de!zib-berlin.de!irz401!uriah!not-for-mail From: j@uriah.sax.de (J Wunsch) Newsgroups: comp.os.386bsd.questions Subject: Re: xconsole not working [Was: What is advantage of Virtual Console?] Date: 14 Feb 1994 12:55:28 +0100 Organization: Private U**X site; member IN e.V. Lines: 43 Message-ID: <2jnorgINNg30@bonnie.sax.de> References: <2if6nl$pus@pdq.coe.montana.edu> NNTP-Posting-Host: bonnie.sax.de nate@bsd.coe.montana.edu (Nate Williams) writes: >>Incidently, for reasons I've never bothered to investigate, xconsole >>only succeeds when I run under Xdm. If I shut off Xdm and start X with >>xinit, xconsole flashes and disappears. >That's because xdm runs as root and if you look in /usr/X386/lib/X11/xdm >you'll notice that it runs xconsole (which means it's running as root) >whereas if you run xconsole you don't have the correct permissions to >run it. Nope, Nate, this time you failed. The problem is that both, xconsole and xterm -C first check the owner of /dev/console against the *real* userID. The console is attached (for obvious security reasons) only, if both userID's match. When you run Xdm, you probably have it configured to acquire the ownership of /dev/console to the user just logged in (and to revert it to root once the user logged off). Well... If you run xinit, you will have to care for this point yourself. Either you always log in as root (urrrgh!), or you are (almost) alone on your box and chown the console to your ID manually, or you run getty on /dev/console (which acquires the terminal to the user once it logged in), or you lose:-( Note that getty on /dev/console worked ONLY UNTIL (FreeBSD) 1.0-GAMMA! The patch has been suspected to break other things or crash the system and thus removed later. (Though funny, it _always_ worked for me, at least with the pcvt console driver.) So if you run 1.0R (or -current), you're outta luck unless you manually patch back the thing... (The patch idea was: allocating an alias vnode for console pointing to the real console device. When the close() time came, the alias vnode still holded references since the vnode reference count has been shared between console and ttyv0. Thus, the device close routine has been called only when the absolute last reference was about to disappear.) Until we found some better solution, one of the above methods must be chosen... -- in real life: J"org Wunsch | ) o o | primary: joerg_wunsch@tcd-dresden.de above 1.8 MHz: DL 8 DTL | ) | | private: joerg_wunsch@uriah.sax.de | . * ) == | ``An elephant is a mouse with an operating system.''