Skip to contentSkip to conversation

pasting arbitrary input to consoles

DISCUSSION Brian Craft 3 participants 4 messages Dec 27, 2001 – Dec 28, 2001

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 10 lines · Brian Craft

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/

#2 lore raw
In reply to Brian Craft
Quoted 2 lines · Andreas Dilger

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).

Quoted 1 line

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.

#3 lore raw
In reply to Brian Craft
Quoted 3 lines · Brian Craft

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.

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