Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-25-2011, 11:12 AM   #31
B_Lizzard
Member
B_Lizzard began at the beginning.
 
Posts: 10
Karma: 24
Join Date: Feb 2011
Device: Kindle 3
Um, maybe I'm missing something but how do I invoke the client terminal window? I have the server started, I can see it intercepts my keys when I run it with --verbose but by default, the launchpad.ini file has a system command 'terminal' under the T key, but the actual 'terminal' binary doesn't exist. Was this made for pre-3.1 firmware versions which included a 'terminal' binary or what?

EDIT: Ugh, it worked. Time to port nethack.

Last edited by B_Lizzard; 02-25-2011 at 11:33 AM.
B_Lizzard is offline   Reply With Quote
Old 03-16-2011, 01:22 PM   #32
PoP
Fᵘᶻᶻʸ⅓⋚¹¹⫽₃₃⪓¹¹¹⫻₃₃₃ Mᵃᵗʰ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 499
Karma: 6298779
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by centaurian View Post
OK. Just by do it yourself metod, I make some changes in ajaxterm.js and implemented full keyboard support and handles some UTF8 characters from terminal.

Changes from Luigi last version:

Virtual keys:
Zoom: Change font size (to better fit to window), tree steps
Alt: Toggle alt key. Real alt key is working too, but by this way, you can press more combinations such as ATL+Q etc. (ALT+Q on real kindle keyboard meas 0)
Ctrl: Toggle Ctrl key.
Fn: Toggle virtual FN key. Shows help image. In this way, you can use F1-F2 keys, arrows, TAB, ESC etc.
Attachment 61925

Keys on side of Kindle:
Up: Toggle FN key (same as virtual button)
Down: Toggle CTRL key (same as virtual button)

Double UTF8 handling (only some characters).

Screenshots:
Attachment 61922
Attachment 61921

Instalation: just replace ajaxterm.js
Centaurian how did you get the proper caracter set in your last attachment when using mc?

In a Windows console, with export TERM=xterm I have the expected correct output:
Click image for larger version

Name:	windows xterm mc.jpg
Views:	429
Size:	83.4 KB
ID:	68416

But from the Kindle browser + java console, with the same export, I have what follows:
Click image for larger version

Name:	MC [with xterm] portrait sick screen_shot-53763.gif
Views:	488
Size:	49.9 KB
ID:	68417

What am I missing?
PoP is offline   Reply With Quote
Old 03-16-2011, 06:11 PM   #33
NIXin
Junior Member
NIXin began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2011
Device: Kindle 3
How about trying 'shellinabox' ?
http://code.google.com/p/shellinabox/
I think it's VT100 implementation is pretty good. The only problem is the keyboard.
NIXin is offline   Reply With Quote
Old 03-16-2011, 08:26 PM   #34
PoP
Fᵘᶻᶻʸ⅓⋚¹¹⫽₃₃⪓¹¹¹⫻₃₃₃ Mᵃᵗʰ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 499
Karma: 6298779
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by NIXin View Post
How about trying 'shellinabox' ?
http://code.google.com/p/shellinabox/
I think it's VT100 implementation is pretty good. The only problem is the keyboard.
Thanks NIXin but I couldn't get the debian binary to launch:

Code:
[root@kindle root]# cd /mnt/us/sinb
[root@kindle sinb]# ls
shellinabox
[root@kindle sinb]# ./shellinabox
./shellinabox: line 1: syntax error: newline unexpected
And I am at loss to cross compile... Also I think that mc (which is ncurses based) expects a vt320 or an xterm terminfo...
PoP is offline   Reply With Quote
Old 03-16-2011, 09:00 PM   #35
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,961
Karma: 4501011
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
@PoP: That usually means wrong arch.

Try this (untested, I just didn't have anything better to do ).

You'll probably have to call an SSH client or a patched busybox login applet, unless you know your root password. And disable SSL, it seems sligtly broken, and will call openssl to generate a cert, which will probably take forever on the Kindle HW.

And, if it even works, you probably won't be able to do much, because I assume it expects a full 105 keys keyboard ;o).
Attached Files
File Type: gz shellinaboxd.tar.gz (109.3 KB, 148 views)

Last edited by NiLuJe; 03-16-2011 at 09:56 PM.
NiLuJe is offline   Reply With Quote
Old 03-16-2011, 09:20 PM   #36
Xiaopangzi
Enthusiast
Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.
 
Posts: 29
Karma: 16912
Join Date: Mar 2011
Device: kindle k3, prs-t2
Unhappy

The debian binary works fine for me (after providing the shared libs it depends on) but apart from the keyboard problem (no ctrl-key) it consumes 100% cpu while running...
Xiaopangzi is offline   Reply With Quote
Old 03-18-2011, 11:10 AM   #37
NIXin
Junior Member
NIXin began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2011
Device: Kindle 3
Quote:
Originally Posted by PoP View Post
And I am at loss to cross compile... Also I think that mc (which is ncurses based) expects a vt320 or an xterm terminfo...
MC works great in shellinabox (with UTF-8 and full color even, not really needed in kindle though ), but it does expect a full 101 keyboard.
But it shouldn't be too hard to hack the translation of keys to map out the things we need for the Kindle.

Weird you get 100% cpu. I'll try it myself as soon as I have some free time to play with my Kindle.
NIXin is offline   Reply With Quote
Old 03-19-2011, 11:50 AM   #38
PoP
Fᵘᶻᶻʸ⅓⋚¹¹⫽₃₃⪓¹¹¹⫻₃₃₃ Mᵃᵗʰ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 499
Karma: 6298779
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by NiLuJe View Post
@PoP: That usually means wrong arch.

Try this (untested, I just didn't have anything better to do ).

You'll probably have to call an SSH client or a patched busybox login applet, unless you know your root password. And disable SSL, it seems sligtly broken, and will call openssl to generate a cert, which will probably take forever on the Kindle HW.

And, if it even works, you probably won't be able to do much, because I assume it expects a full 105 keys keyboard ;o).
OK I have the root password... trying... lots of fun playing with openssl... trying... now disabling SSL... trying more with debug:

Code:
[root@kindle shellinabox]# ./shellinaboxd --disable-ssl -b -d
Command line: ./shellinaboxd --disable-ssl -b -d
Substituting "nobody's" primary group for "nogroup"
Listening on port 4200
Substituting "nobody's" primary group for "nogroup"
Connecting to the url:
Click image for larger version

Name:	screen_shot-2960.gif
Views:	297
Size:	6.0 KB
ID:	68575

Oops process terminated:
Code:
[root@kindle shellinabox]# Accepted connection from localhost:32882
Handling "GET" "/"
localhost - - [19/Mar/2011:11:26:46 -0400] "GET / HTTP/1.1" 200 4967
Handling "GET" "/styles.css"
localhost - - [19/Mar/2011:11:26:47 -0400] "GET /styles.css HTTP/1.1" 200 7315
Handling "GET" "/ShellInABox.js"
localhost - - [19/Mar/2011:11:26:47 -0400] "GET /ShellInABox.js HTTP/1.1" 200 186894
Handling "GET" "/keyboard.html"
localhost - - [19/Mar/2011:11:26:49 -0400] "GET /keyboard.html HTTP/1.1" 200 3181
Handling "POST" "/?"
Check failed at shellinabox/session.c:173 in newSessionKey(): (fd = NOINTR(open("/dev/urandom", O_RDONLY))) >= 0
Uh-oh. Dreaded keyboard? To be continued.
PoP is offline   Reply With Quote
Old 03-19-2011, 12:29 PM   #39
Xiaopangzi
Enthusiast
Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.
 
Posts: 29
Karma: 16912
Join Date: Mar 2011
Device: kindle k3, prs-t2
Quote:
Originally Posted by PoP View Post
Code:
[root@kindle shellinabox]# ./shellinaboxd --disable-ssl -b -d
...
Check failed at shellinabox/session.c:173 in newSessionKey(): (fd = NOINTR(open("/dev/urandom", O_RDONLY))) >= 0
Adding --user=0 should fix this.
Xiaopangzi is offline   Reply With Quote
Old 03-19-2011, 02:02 PM   #40
PoP
Fᵘᶻᶻʸ⅓⋚¹¹⫽₃₃⪓¹¹¹⫻₃₃₃ Mᵃᵗʰ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 499
Karma: 6298779
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by Xiaopangzi View Post
Adding --user=0 should fix this.
Worked! Many thanks Xiaopangzi.

Of course the Kindle browser/keyboard is not ideal to use mc
Click image for larger version

Name:	from Kindle Browser.gif
Views:	309
Size:	25.8 KB
ID:	68586

But after opening the firewall
Code:
iptables -A INPUT -i wlan0 -p tcp --dport 4200 -j ACCEPT
The Firefox browser is
Click image for larger version

Name:	from Firefox Browser.jpg
Views:	316
Size:	141.2 KB
ID:	68585

Still my question @centaurian in an earlier post remains on how to get the proper character set in is ajaxterm

And ultimately, I would prefer using @lrizzo myts.arm with better compatibility with mc.

Last edited by PoP; 03-19-2011 at 02:34 PM. Reason: completing the post
PoP is offline   Reply With Quote
Old 03-30-2011, 08:34 AM   #41
PoP
Fᵘᶻᶻʸ⅓⋚¹¹⫽₃₃⪓¹¹¹⫻₃₃₃ Mᵃᵗʰ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 499
Karma: 6298779
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by NiLuJe View Post
@PoP: That usually means wrong arch.

Try this (untested, I just didn't have anything better to do ).
First, thank you NiLuJe for x-compiling shellinaboxd for me, worked perfectly.

As a follow up, wanting to be autonomous, I installed the ct-ng toolchain obediently following the instructions of x-compile in the kindle-x-tc archive.

Then compiling "Hello World" (gcc -o hello hello.c) successfully produced a hello binary with no error message.

hello.zip

Alas, when running it on the Kindle I get a "line 1 ... blah blah expected" wrong arch again I Imagine.

If you still don't have anything better to do, can you offer any suggestion to help me debug my installation?
PoP is offline   Reply With Quote
Old 03-30-2011, 09:03 AM   #42
Xiaopangzi
Enthusiast
Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.Xiaopangzi 's shirt has a full set of merit badges.
 
Posts: 29
Karma: 16912
Join Date: Mar 2011
Device: kindle k3, prs-t2
Quote:
Originally Posted by PoP View Post
Then compiling "Hello World" (gcc -o hello hello.c) successfully produced a hello binary with no error message.
arm-kindle-linux-gnueabi-gcc -o hello hello.c

Use the "file" command (run "file hello" without the quotes) to see if you got an arm, i386 or x86-64 binary.
Xiaopangzi is offline   Reply With Quote
Old 03-30-2011, 12:42 PM   #43
PoP
Fᵘᶻᶻʸ⅓⋚¹¹⫽₃₃⪓¹¹¹⫻₃₃₃ Mᵃᵗʰ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 499
Karma: 6298779
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Code:
normand@5635C04:~/Kindle$ ls
CrossTool  hello  hello1  hello.c  KiTerm
normand@5635C04:~/Kindle$ file hello
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
normand@5635C04:~/Kindle$ export PATH=/home/normand/x-tools/arm-kindle-linux-gnueabi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/normand
normand@5635C04:~/Kindle$ arm-kindle-linux-gnueabi-gcc -o hello hello.c
normand@5635C04:~/Kindle$ ls
CrossTool  hello  hello1  hello.c  KiTerm
normand@5635C04:~/Kindle$ file hello
hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.22, not stripped
normand@5635C04:~/Kindle$
@Xiaopangzi, that was the piece I was missing!

Perfect now:
Code:
[root@kindle root]# cd /mnt/us
[root@kindle us]# ./hello
Hello World
[root@kindle us]#
PoP is offline   Reply With Quote
Old 03-31-2011, 04:14 AM   #44
B_Lizzard
Member
B_Lizzard began at the beginning.
 
Posts: 10
Karma: 24
Join Date: Feb 2011
Device: Kindle 3
You can also set up a toolchain with OpenEmbedded, using "bug" as the MACHINE. You can use "angstrom-2010.x" as the DISTRO, but you'll have to change the configuration files so that it builds with glibc-2.5, which is what the Kindle is using. I compiled SDL this way, and could probably compile anything. I can probably export a toolchain but it's going to be for x86_64 only.
B_Lizzard is offline   Reply With Quote
Old 08-14-2011, 06:26 AM   #45
toastofchaos
Junior Member
toastofchaos began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2011
Device: Kindle 3SO
Hi, I recently got a Kindle 3/3G SO and I jailbroke it, put launchpad on there, put usbnet on there, and then I tried to get lrizzo's terminal app to work for quite a long time. I've read the launchpad readme and the kiterm readme several times over and I can't quite seem to get it to work.

Now... Do I have to put all of the files that are extracted from kiterm or just the 3 that it says in the readme file? (myts.arm, launchpad.ini, and I believe keydefs.ini). And one other question, trying not to ask too many in one post here, but do I use the search box to enable myts.arm? (which I believe actually got enabled when I tried one time, since it didn't search for what i typed and merely blinked back to home).

But I tried the shift + T command and it didn't bring up a terminal. I'm missing something. Help me out if you can. Thanks!
toastofchaos is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle, Calibre, Author sort gdaydigger Calibre 5 03-11-2014 08:21 PM
Kindle app for iPad appears in the App Store pilotbob News 46 04-06-2010 08:25 PM
kindle app? is it possible to design a app to full support PDF? lili1989 Amazon Kindle 12 02-05-2010 05:29 PM
Author Sort & Kindle seagull Calibre 0 12-25-2009 12:42 PM
How does kindle sort pictures? princeofegypt Amazon Kindle 1 04-24-2009 04:54 PM


All times are GMT -4. The time now is 11:41 AM.


MobileRead.com is a privately owned, operated and funded community.