Linux kiosk for Oracle MSCA

Recently, I was asked to explore building a kiosk image for use in our manufacturing facilities.  All the system would need to do would be to allow the user to telnet into an Oracle MSCA/MWA service.  I thought going in that this would be a straightforward task, but it turned out to be more complicated than I realized.

There were two problems that I was experiencing. The first was that F1-F4 were mapped differently, for what appears to be historical reasons (VT100 terminals did not have these keys). The other was that the telnet client needed to be in character mode, instead of line mode, and there was no easy way to do this in the Linux telnet client except through the user manually changing the mode.

So I used Expect to translate the F1-F4 keys to what the remote MSCA telnet server wanted, and then used C-Kermit as my telnet client. The scripts I wrote to perform these two steps are as follows:

 #!/usr/local/bin/kermit

 set telnet newline-mode nvt raw
 set telnet echo remote

 telnet /nowait host.company.com 12345

 quit

and

 #!/usr/bin/expect

 eval spawn -noecho "/usr/local/bin/ktelnet.sh"

 interact {
 "\033[[A" { send "\033[P" }
 "\033[[B" { send "\033[Q" }
 "\033[[C" { send "\033[R" }
 "\033[[D" { send "\033[S" }
 }

Leave a Reply