View Single Post
Old 02-14-2013, 09:05 PM   #122
Fvek
Member
Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.Fvek can program the VCR without an owner's manual.
 
Posts: 23
Karma: 193423
Join Date: Jul 2012
Device: Kindle Touch
Here's a proof-of-concept example of using kterm's -e and -l options to launch a terminal program from KUAL with a custom interface using matchbox-keyboard's layout config, in this case a media player with basic controls (play/pause, forward, back, next, previous, volume +/-, off).

This is just an example and not of much practical use since it just plays *.mp3 in a folder, but the concept can be adapted to other things (or a media player with a better frontend, at least). Hopefully it'll give someone an idea to play with.

No screenshots since I apparently can't do that when kterm's running a program. Just imagine an ugly text-based media player with hastily drawn media buttons under it.

Install:

Put the attached mplayer_test folder in your extensions folder.

You will need mplayer provided by baf from the bottom of the page here: http://www.fabiszewski.net/kindle-xterm/

Put mplayer in any of the following folders (or edit mplayer_test.sh):
/mnt/us/bin
/mnt/us/opt/bin
/mnt/us/extensions/mplayer_test/bin

Put some MP3s in /mnt/us/music (you can change this location in mplayer_test.sh)

Launch it from KUAL.

Notes:

Matchbox-keyboard's README with layout info:
https://github.com/Xlab/matchbox-key...xlab/README.md

There's a bug of sorts with kterm (and xterm before it) where some programs won't execute right if just run with the -e command (e.g. "kterm -e foo" will open kterm but then immediately exit without running foo). I don't know why this is but you can get around this by putting the command in a shell script and using -e on that instead (e.g. "kterm -e foo.sh" where foo.sh contains only "#!/bin/sh [linefeed] foo" -- see attached example for example).
Attached Files
File Type: zip mplayer_custom_layout_test_0.1.zip (7.3 KB, 297 views)
Fvek is offline   Reply With Quote