View Single Post
Old 06-01-2012, 10:24 AM   #2
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by pwright2 View Post
OK, I think I'd like to try some of these programming things that are suggested, at least the scripting based ones. (no chance I'm going to try to learn C). So far I've just been following install processes.

So, at present I've got a KT that is jailbroken, has Launcher and USBnetwork. On my main computer I am usually in Windows. I can install cygwin if necessary. Or I can boot into Kubuntu 11.04 if needed.

I'm guessing the programming process is to write something on the main machine, using SSH to move it onto the KT, restart the KT, trigger the script somehow, and see what happens. Wash, Rinse, Repeat.

Is that reasonably accurate? Do I need any specialized tools like a development kit? Is there a thread somewhere on getting started?

And, more trivially, is there a Launcher something to give a command line?

------Paul-----
The basic "Getting Started" question. A good one to be asking.
Let me jump around a bit in forming an answer.

Technically, no problem about doing the work under Windows. BUT...
As a practical matter, start doing your work under Linux (your Kubuntu).

Why?
Both the development and the target system are running the same OS.
Makes for a lot less mental "shifting of gears" than working between two different operating systems.
Also, your Kubuntu install is a lot more forgiving than the embedded Linux install of the Kindle.
And, you have the documentation (the "man" and the "info" commands) installed on your Kubuntu.

Scripting...
There are several scripting languages you might use. The command shell (/bin/sh) one might be the one to try first.
Under *buntu(s) the command shell provided by "/bin/sh" may will be "/bin/dash"
Under other systems (or even under some *buntu installs) it may be provided by "/bin/bash".
On the Kindles, it is provided by the "ash" command shell of Busybox.
All of those mentioned above work slightly differently.

On *buntu (and many other distos) you can get into a command shell very similar (different version probably) by:
Code:
/bin/busybox ash
# when done
exit
# that gets you back to your default shell
A very good reference to scripting in the command shell provided by Bash is:
http://www.tldp.org/LDP/abs/html/

The next scripting language you might consider is Lua.
That works the same on __anything__, __anywhere__.
You might have to install it:
Code:
sudo apt-get install lua5.1 lua5.1-doc
Many pre-built extension libraries exist for it,
apt-cache search lua
will give you a mind boggling list of add-ons.

The Lua language is small, simple, powerful and not too hard to learn.
For reference materials, visit lua.org

And your not so trival question:
There are two recent threads here about installable terminal emulators to get an on-kindle command line environment.
Any of the ways of installing ssh on your kindle will give you a command line environment on the kindle, displayed on your *buntu distribution.
knc1 is offline   Reply With Quote