[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X's "default console input source" = /dev/what? [Solved]



On Sat, 2003-07-12 at 13:32, Pigeon wrote:
> On Fri, Jul 11, 2003 at 09:27:46PM +0100, Pigeon wrote:
> > On Fri, Jul 11, 2003 at 12:23:15PM -0400, Mark L. Kahnt wrote:
> > > My own
> > > suspicion is that it *could* be looking for the virtual console on which
> > > X11 is running, particularly if the virtual consoles are broken into
> > > multiple input and output file descriptors.
> > 
> > Unfortunately neither /dev/tty7 nor /dev/tty-I-started-X-from appear
> > to be valid choices.
> > 
> > Since my original post I've been poking through the source (a daunting
> > task; it's quite clearly written as source goes, but there's so f**g
> > much of it :-) ) I'm getting somewhere... if Option "Device" isn't
> > set, it uses the already-opened xf86Info.consoleFd, so an obvious next
> > possible step is to find where it opens that.
> 
> Which I have now done... it looks first in /dev/vc/* and then in
> /dev/tty* for the VT it's running on. So the answer is:
> 
> "In a standard Debian installation, X's "default console keyboard
> input source" referred to in 'man 4 kbd' is /dev/tty7."
> 
> > If Option "Device" is set, it takes the string as a filename and tries
> > to open it (in mode O_RDONLY | O_NONBLOCK | O_EXCL). The problem now
> > is to find out exactly what it expects to be reading from that... I
> > found some example code for a keyboard driver kernel module on the net
> > (apparently part of a programming course) and hacked it to buffer the
> > raw scancodes and present them on /dev/kbd. It's doing that OK, but if
> > I give it to X to read, I get *nothing*... Garbage, I could understand.
> 
> And this turns out to be because I had Option "XKBDisable" "yes" set
> in the ServerFlags section of my XF86Config. If I enable XKB I can
> feed it raw scancodes from /dev/kbd and it works fine. So:
> 
> "When using the Option "Device" "string" option of X's "kbd" driver to
> define a keyboard input device for X, make sure that XKB is enabled."
> 
> Thanks for your time, Mark.

N/P, even though all I did was ask some wild questions to see if I
understood what you were doing ;) That said, I work on a distress line,
and our main tool is careful questions to get the client to talk things
out for themselves so they see the problem from different perspectives.
Maybe I did that here without directly intending that.

Says something of the broad flexibility of the design of X11 if it can
actually support such functionality :)
-- 
Mark L. Kahnt, FLMI/M, ALHC, HIA, AIAA, ACS, MHP
ML Kahnt New Markets Consulting
Tel: (613) 531-8684 / (613) 539-0935
Email: kahnt@hosehead.dyndns.org

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: