2001-12-27 22:18:30

by Brian Craft

[permalink] [raw]
Subject: pasting arbitrary input to consoles

Hi all -- I'm looking into ways of extending a voice control utility to work on
the consoles. I was hoping there'd be a way to start the app during boot, or
shortly after -- sorta like gpm starts and allows cut and paste in the console.
It would be cool if the typing impaired could still run kudzu or linuxconf at
boot, and have the consoles come up voice-enabled.

I'm not seeing any easy way to do it, however. Looks like you can only paste to
the consoles from on-screen data (i.e. after first doing a "select" operation
in the manner of gpm).

Another option would be to run a terminal emulator, like screen, that was voice
aware. Can such a program be wedged between the user and the os early during
boot?

All ideas welcome. Please reply to my address, as I'm not subscribed.

b.c.


2001-12-27 22:52:33

by Andreas Dilger

[permalink] [raw]
Subject: Re: pasting arbitrary input to consoles

On Dec 27, 2001 14:17 -0800, Brian Craft wrote:
> Hi all -- I'm looking into ways of extending a voice control utility to
> work on the consoles. I was hoping there'd be a way to start the app
> during boot, or shortly after -- sorta like gpm starts and allows cut
> and paste in the console. It would be cool if the typing impaired could
> still run kudzu or linuxconf at boot, and have the consoles come up
> voice-enabled.
>
> Another option would be to run a terminal emulator, like screen, that was
> voice aware. Can such a program be wedged between the user and the os
> early during boot?

Well, you could also make the voice-aware shell as the default shell for
a given user, but that would not work for install systems like kudzu
where you are not in control of the boot environment (for that matter you
are not in control of the kernel for those systems either, so it doesn't
really matter).

Probably a good example of how this would work is screen(1) (as you have
mentioned) or script(1) which is a lot more light weight but may have
the necessary code to start from.

For X you could also make the voice recognition system an input method
(ala mouse, keyboard, tablet, joystick, etc), but that would only work
for X. Come to think of it, doesn't the kernel already have an "input"
driver section for such things?

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

2001-12-28 00:29:34

by Brian Craft

[permalink] [raw]
Subject: Re: pasting arbitrary input to consoles



On Thu, Dec 27, 2001 at 03:51:57PM -0700, Andreas Dilger wrote:
> Well, you could also make the voice-aware shell as the default shell for
> a given user

Interesting idea, though you'd need to auto login one of the consoles (since
the shell won't be up at the login prompt).

> For X you could also make the voice recognition system an input method

We're currently using the XTest extension, which works well. There are a number
of techniques you can use for X.

I just wrote a proof-of-concept for a truly hideous console solution:

o Read the first line of /dev/vcs0
o Write the to-be-pasted text to /dev/vcs0
o Select the text via ioctl on /dev/tty0
o Restore the first line of /dev/vcs0
o Paste via ioctl on /dev/tty0

Hehehe. It works. And it's good just for the gross-out value.

Thanks,
b.c.

2001-12-28 08:28:20

by john slee

[permalink] [raw]
Subject: Re: pasting arbitrary input to consoles

On Thu, Dec 27, 2001 at 02:17:59PM -0800, Brian Craft wrote:
> Another option would be to run a terminal emulator, like screen, that
> was voice aware. Can such a program be wedged between the user and the
> os early during boot?

[gq}]

there is an example and associated discussion of doing this sort of
wedging (similar to screen or script, as mentioned in another post) in
W. Richard Stevens' "Advanced Programming in the UNIX Environment".

also i think 'expect' may be a useful utility to look at for an example.

good luck, it sounds like a very worthwhile project you are working on.

j.

--
R N G G "Well, there it goes again... And we just sit
I G G G here without opposable thumbs." -- gary larson