Jan Vroonhof <vroonhof(a)math.ethz.ch> writes:
> wmperry(a)aventail.com (William M. Perry) writes:
>
> > ** .../linux/drivers/char/console.c in the function
> > ** tioclinux(). The following bit of code is brutal to
> > ** us:
> > **
> > ** if (current->tty != tty && !suser())
> > ** return -EPERM;
> > **
> > ** I even tried setting us as a process leader, removing
> > ** our controlling terminal, and then using the TIOCSCTTY
> > ** to set up a new controlling terminal, all with no luck.
>
> If I read the code correctly you cannot use TIOCSCTTY on a tty that
> already has a sesssion on it (if you are not root).
Looks that way. :(
> > ** What is even weirder is if you run XEmacs in a VC, and
> > ** attach to it from another VC with gnuclient, go back to
> > ** the original VC and hit a key, the mouse pointer
> > ** displays (in BOTH VCs), until you hit a key in the
> > ** second VC, after which it does not display in EITHER
> > ** VC. Bizarre, no?
>
> How do you see both VT's at once? Maybe the kernel just forgets to remove
> the mouse cursor until at least one character is drawn (that would be
> another kernel bug)
If you switch back and forth between then with Alt-F1/Alt-F2 it works,
until you hit a key that actually causes the tty to 'wake up' and see real
input.
> > If anybody cares to wade through linux/drivers/char/ and show me a way to
> > get this working, the appropriate files are tty_io.c and console.c.
>
> #if 0 the check out. If you look in tty_io.c you'll see that almost
> all other such checks have met the same fate.
I did, and now everything works great. Unfortunately, I can't find the VC
stuff in the MAINTAINERS file. I'll mail the patch to
linux-kernel(a)vger.rutgers.edu later today to see if there are any
objections to it, etc.
-Bill P.