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 03-29-2012, 02:29 AM   #1
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Arrow tinysh - tiny limited onscreen shell

EDIT: This script pauses the framework to prevent typing on the Kindle 3 keyboard from interacting with the framework (search bar). To exit the shell and resume the framework, type the "exit" command. If you run this script on a Kindle 4 or Touch, you will not be able to type an "exit" command, so you will need to resume the framework from SSH, or restart your kindle (hold power switch for 20 seconds). Do not panic just because the framework is paused. Just restart.



tinysh

UPDATE: This post was changed so the script code is now in a CODE box instead of a PHP box, which was hiding the "triple backslash" in the "eicho" function. It lost its pretty colors!

This is a tiny limited onscreen shell written in /bin/sh with minimal external linux command dependencies. This first version is only for the K3, but I plan to add support for onscreen keyboards for K4 and Touch. I have most of the code nearing completion for that. For now, this is just for the K3, and with a little work it should work on the DXG and earlier. It is severely limited by eips text support not allowing many characters needed in linux shell commands.

Although eips is rather slow on the K3, it is extremely fast on the K4 and Touch, even when scrolling text (so fast that you need to insert delays to not just have a blur of smeared text scrolling faster than you can see it). On the K3, you only get a couple of lines per second or so, but it is better than nothing until we get a faster and better eips replacement. It can be made several time faster by NOT scrolling the text, but instead adding "(Press any key to continue . . .)" and waiting for a key, then redrawing a new screen full of text.
Code:
#!/bin/sh
#===================================================
# tinysh - tiny limited onscreen shell (v1.0) for K3
#---------------------------------------------------
# Copyright (C) 2012 geekmaster
# MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#===========================
# initvar - init global vars
#---------------------------
initvar() {
  SYM=126 ENT=28 SHFT=42 SPC=57 DEL=14
  DN=/dev/null
  KN="1234567890____qwertyuiop____asdfghjkl_____zxcvbnm_."
  KS="1234567890____QWERTYUIOP____ASDFGHJKL_____ZXCVBNM_,"
  KP="1234567890____~@#$%^&*()____<>[]{}?/\_____;:'|-+=_?"
  KM=$KN
  B="     ";B="$B$B$B$B$B";B="$B$B"
  CMD= # cmd line
}

#=============================================
# shcmd - emit shell command, preceeded by pwd
#---------------------------------------------
shcmd() {
  echo "echo \"\$(pwd)> $CMD\";$CMD"
  CMD=
}

#===================================================
# getkb - get translated ascii keys from K3 keyboard
#---------------------------------------------------
getkb() {
  shcmd
  while :;do
    A="_"
    set $(waitforkey); K=$1 D=$2
    [[ $D -eq 0 ]]&& continue
    [[ $K -eq $ENT ]]&& shcmd && continue
    [[ $K -eq $SHFT ]]&& KM=$KS && continue
    [[ $K -eq $SYM ]]&& KM=$KP && continue
    [[ $K -eq $DEL ]]&& if [[ ${#CMD} -gt 1 ]];
      then CMD=$(echo "$CMD"|cut -b-$((${#CMD}-1)))
      else CMD=; fi
    [[ $K -eq $SPC ]]&& A=" "
    [[ $K -le 52 ]]&& A="$(echo \"$KM\"|cut -b$K-$K)"
    [[ "$A" == "_" ]]&& A=""
    CMD="$CMD$A"
    eips "$(echo "~~~> $CMD$B"|cut -b-50)"
    KM=$KN
  done
}

#====================
# eicho - eink echo
# usage: eicho "text"
#--------------------
eicho() {
  eips -z 2 38
  eips 0 39 "$(echo "$1"|tr ";{}\\\`!#$%^" _|cut -b-50)"
}

initvar # init global vars
killall -stop cvm launchpad 2>$DN 
eips -c;eips "~~~~~~~~~~~~ Geekmaster Tiny Shell 1.0 ~~~~~~~~~~~"
getkb|sh 2>&1|while read l;do eicho "$l";done
killall -cont cvm launchpad 2>$DN
This is really limited by eips, which has a lot of characters it refuses to display (especially characters useful for linux commands). You can do simple commands like "pwd", "cd /etc", and "cat shadow", but good luck blind-typing the characters that do not echo to the display.

To improve this, we need to eliminate the dependency on eips for text output. I plan to do graphics blitting (block image copy) from an image of characters using "dd", for graphics text output. Or using Hershey vector fonts, if I finish that first. I plan to start with Hershey Simplex characters -- other language support can be added later.

This only works on the K3, but should be easy to adapt to DX and earlier. I even abstracted the keycodes out to initvar so they are easier to change.

Be sure your kindle is ON for the keyboard to work. If the keyboard is not echoing keys to the eink display, slide your power switch to wake your kindle and unlock the keyboard, then try again.

The "Sym" key is used as a symbol shift key, and all symbols on a standard keyboard can be created on the K3 keyboard except the underscore and double-quote keys (see the KP string assignment in initvar below), but those can be supported too with a little additional code. This script is really just a proof-of-concept example, for educational purposes to show how you can do interesting stuff with shell scripts.

To avoid confusion if you plan to modify this, "|while .. read .. do" loop contents run in a separate process space that uses a COPY of the shell variables. Code outside the loop cannot see changes to values inside the loop. You can only pass STDOUT to code outside the loop. That goes for functions called from inside the loop too. You can pass multiple values with STDOUT then extract them with "set" (like I did here with the "waitforkey" call).

EDIT: This could be used in a RUNME.sh script to provide a simple onscreen linux command shell for debricking. You can type (and use) characters that you cannot see (eips limitation), which is what I called "blind-typing" above.

Enjoy!

EDIT: This script pauses the framework to prevent typing on the Kindle 3 keyboard from interacting with the framework (search bar). To exit the shell and resume the framework, type the "exit" command. If you run this script on a Kindle 4 or Touch, you will not be able to type an "exit" command, so you will need to resume the framework from SSH, or restart your kindle (hold power switch for 20 seconds). Do not panic just because the framework is paused. Just restart.

Last edited by geekmaster; 04-09-2012 at 08:22 PM.
geekmaster is offline   Reply With Quote
Old 03-29-2012, 04:39 AM   #2
JustAMan
Groupie
JustAMan doesn't litterJustAMan doesn't litter
 
JustAMan's Avatar
 
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
Great! Looking forward seeing this working on KTouch
JustAMan is offline   Reply With Quote
Old 03-29-2012, 12:11 PM   #3
aditya3098
Zombie's worst nightmare
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
aditya3098's Avatar
 
Posts: 592
Karma: 1578840
Join Date: Jan 2012
Location: Far, far away (from radio shack) :(
Device: Kindle touch (hacked to the core) 5.3.2.1
How do you plan to make an on screen keyboard?
aditya3098 is offline   Reply With Quote
Old 03-29-2012, 12:47 PM   #4
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by aditya3098 View Post
How do you plan to make an on screen keyboard?
I have 600x800 touchscreen support that is a complete redesign from that used in the "touchpaint" script here: http://www.mobileread.com/forums/sho...d.php?t=170932

It uses a simple "exit button", which shows a primitive form of what is needed to process onscreen keyboard button presses using the touchscreen.

I have a new unpublished "touchpaint" program that outputs a graphics display list, which can be replayed at a later time. I have used it for signature capture, but it has other uses. I used the redesigned touchscreen code mentioned above (which will also be used in the final onscreen keyboard script when I publish it).

For an onscreen keyboard, you just draw an image of a keyboard, or display a screen capture of one, and define bounding-box coordinates of all the buttons. Then you detect a touch release inside a button and perform its action (usually emitting a character that matches the image on the key). It also helps to have feedback, like inverse display or a larger letter popup (like the apple ipod devices), as you finger moves on and off a defined key region.

I plan to support anything with a 5-way pad too (including the K4). And I will keep the keyboard support used here as well. Instead of touches, you can also select keys by moving through them with 5-way arrow keys, which requires that you define "up/down/left/right" links between them. Obviously, the 5-way "select" would perform the action defined by key (just like a touchscreen release).

Meanwhile, I have released plenty of example code you can use to make your own onscreen keyboard. Things will get easier with time, as I release more stuff.

Last edited by geekmaster; 03-29-2012 at 01:04 PM.
geekmaster is offline   Reply With Quote
Old 03-29-2012, 03:59 PM   #5
PoP
Happ𝑒 2.7 Hapπ 3.14 day
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: 444
Karma: 1643361
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
@geekmaster FYI.

For some reason, when viewing your first post, the line
Code:
  eips 0 39 "$(echo "$1"|tr ";{}`!#$%^" _|cut -b-50)"
has its triple back slash before the ` eaten away by the forum software (php interpretation maybe?).

If I quote your post (instead of viewing it) it shows the correct code:
Code:
  eips 0 39 "$(echo "$1"|tr ";{}\\\`!#$%^" _|cut -b-50)"
Quite an ingenious script. Thanks.

Last edited by PoP; 03-29-2012 at 04:06 PM.
PoP is offline   Reply With Quote
Old 03-29-2012, 04:34 PM   #6
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by PoP View Post
@geekmaster FYI.

For some reason, when viewing your first post, the line
Code:
  eips 0 39 "$(echo "$1"|tr ";{}`!#$%^" _|cut -b-50)"
has its triple back slash before the ` eaten away by the forum software (php interpretation maybe?).
I just changed tags on the box containing the script code from a php box to a code box. Those characters show now. Thanks. But now we lost the pretty colors.

That line of code translates all the characters that eips dislikes to underscore, so it does not send complaints to STDERR. The triple-backslash is actually an escaped backslash and an escaped backtick.
Quote:
Originally Posted by PoP View Post
Quite an ingenious script. Thanks.
Thanks for the compliment! I have a lot of interesting code snippets (/bin/sh and C) that I plan to publish when I get around to it. Seeing that others are interested in this makes it seem like less of a waste of my time. Feedback is essential!


Last edited by geekmaster; 03-29-2012 at 04:52 PM.
geekmaster is offline   Reply With Quote
Old 03-29-2012, 08:16 PM   #7
jmseight
Zealot
jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'
 
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
Hi,

This works for me when I telnet into the K3 via USB, but for some reason does not run well when I use it as a kite script.

Also, I think you can break a long line into the next line by the following slight mod:

#====================
# eicho - eink echo
# usage: eicho "text"
#--------------------
eicho() {
st=$1
ii=${#st}
while [ $ii -ge 0 ]
do
eips -z 2 38 # scroll
eips 0 39 "$(echo $st|tr ";{}\\\`!#$%^" _|cut -b-50)" # write to the bottom
st="$(echo $st | cut -b51-$ii)"
ii=$(( ii - 50 ))
done
}

which is good for "ls -l"

BTW, you are right about the "${s:a:b}" not working in a script. It worked fine in telnet does not work in script.

Thanks,
James

Thanks,
James
jmseight is offline   Reply With Quote
Old 03-29-2012, 08:26 PM   #8
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by jmseight View Post
This works for me when I telnet into the K3 via USB, but for some reason does not run well when I use it as a kite script.

Also, I think you can break a long line into the next line by the following slight mod:
...
st="$(echo $st | cut -b51-$ii)"
...
which is good for "ls -l"

BTW, you are right about the "${s:a:b}" not working in a script. It worked fine in telnet does not work in script.

Thanks,
James
Perhaps kite needs the cvm still running? Try commenting out the killall lines...

Actually, I was planning to implement line-wrap like that, but I often leave things incomplete when I need sleep.

There are some odd issues when trying to write code that works in all modes on all the kindles. Some things even behave a little differently between diags and main boots on the same kindle. Then things can change with firmware updates.

Thanks for the update. I may get around to adding that to my script posted above... (later).

By the way, you should wrap code in CODE tags:

[ code ]
... code here ...
[ /code ]


except, leave out the spaces around the brackets, which were added here just so you could see them.


Last edited by geekmaster; 03-29-2012 at 10:04 PM.
geekmaster is offline   Reply With Quote
Old 03-30-2012, 12:10 AM   #9
jmseight
Zealot
jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'
 
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
Hi GM,

Does the script work without telnet into the k3g.

For me it only works if I run ./tinysh from telnet into k3g. I only have kite installed but the kite scripting runs if telnet runs. However, tinysh does not run as a kite script.

I do notice that running from telnet of some of the other scripts that the main screen does not update. But running as kite script does.

Thanks,
James
jmseight is offline   Reply With Quote
Old 03-30-2012, 12:33 AM   #10
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by jmseight View Post
Hi GM,

Does the script work without telnet into the k3g.

For me it only works if I run ./tinysh from telnet into k3g. I only have kite installed but the kite scripting runs if telnet runs. However, tinysh does not run as a kite script.

I do notice that running from telnet of some of the other scripts that the main screen does not update. But running as kite script does.

Thanks,
James
I have not used kite. Perhaps kite is locking resources so this script cannot access them. Did you try running it from launchpad? I actually pause launchpad because it was "eating" the spacebar presses...

I will need to check that out. There is no obvious reason why the keyboard or display should not be available that I can think of right now...
geekmaster is offline   Reply With Quote
Old 03-30-2012, 04:54 PM   #11
kaminkatze
Member
kaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with otherskaminkatze plays well with others
 
Posts: 17
Karma: 2600
Join Date: Mar 2012
Device: Kindle 3
I used this kite script
Code:
#!/bin/sh
/mnt/us/bin/tinysh &
to start tinysh and modified
Code:
[[ $K -eq $ENT ]]&& shcmd && continue
to something like
Code:
if [[ $K -eq $ENT ]]; then
  [[ $CMD == "quit" ]] && exit
  shcmd && continue
fi
so I can exit tinysh.
kaminkatze is offline   Reply With Quote
Old 03-30-2012, 05:42 PM   #12
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by kaminkatze View Post
I used this kite script
Code:
#!/bin/sh
/mnt/us/bin/tinysh &
to start tinysh and modified
Code:
[[ $K -eq $ENT ]]&& shcmd && continue
to something like
Code:
if [[ $K -eq $ENT ]]; then
  [[ $CMD == "quit" ]] && exit
  shcmd && continue
fi
so I can exit tinysh.
That looks good, except now you cannot send "quit" to the shell or to a linux program. I would use something unusual but easy to type, like ".quit.", or use an undefined button (such as Menu) as a "command" key (which sets a "command" flag). Then at Enter key processing, exit if command flag set AND "quit" in CMD buffer. Remember to clear the command flag at end of Enter key processing. A "command" button could support other "local" options as well, such as clearing or refreshing the display, or even executing command macros to save typing long commands.

Remember that the K3 and earlier already have a nicer onscreen shell (I recommend myts-7). This script was meant to be used in special cases, like during debricking, but especially as an example of what you CAN do with a shell script, using ONLY stuff that is already built-in. And modifying this as you are doing is a GREAT learning experience.


P.S. How did you get tinysh working in kite, instead of only telnet as you had previously reported?

Last edited by geekmaster; 03-30-2012 at 06:04 PM.
geekmaster is offline   Reply With Quote
Old 03-30-2012, 07:07 PM   #13
jmseight
Zealot
jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'jmseight knows the difference between 'who' and 'whom'
 
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
Hi GM,

I noticed that I missed copying #!/bin/sh at the very first line, so it ran with telnet by not with kite.

It works quite well now.

Thanks,
James
jmseight is offline   Reply With Quote
Old 04-01-2012, 11:15 AM   #14
PoP
Happ𝑒 2.7 Hapπ 3.14 day
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: 444
Karma: 1643361
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3.₄, PRS-350, SGS3, Rπ, iPad Air
Quote:
Originally Posted by kaminkatze View Post
I used this kite script
Code:
#!/bin/sh
/mnt/us/bin/tinysh &
to start tinysh and modified
Code:
[[ $K -eq $ENT ]]&& shcmd && continue
to something like
Code:
if [[ $K -eq $ENT ]]; then
  [[ $CMD == "quit" ]] && exit
  shcmd && continue
fi
so I can exit tinysh.
I use a similar !/mnt/us/bin/tinysh & launchpad shortcut and I simply enter the exit command in tinysh to exit from the shell. I didn't need to modify the script. Does the kite launcher act differently?
PoP is offline   Reply With Quote
Old 04-01-2012, 12:23 PM   #15
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by PoP View Post
I use a similar !/mnt/us/bin/tinysh & launchpad shortcut and I simply enter the exit command in tinysh to exit from the shell. I didn't need to modify the script. Does the kite launcher act differently?
Good point... Now that you mention it, I remember typing exit to exit from the shell too... Too many details to keep track of while working on all my various projects... (and PM help requests too...)

Thanks for the tip!
geekmaster 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
Help finding tiny towers and tiny zoo mojkadona Kindle Fire 5 04-26-2012 07:02 PM
Kindle onscreen keyboard shortcuts Conniemartin Amazon Kindle 3 12-27-2011 02:59 PM
Night Brothers - Vampire Thriller - 99 cents for a limited timefor a limited time SidneyW Self-Promotions by Authors and Publishers 0 07-11-2011 09:49 AM
Jointech JE100: any bigger onscreen keyboard? datebtraveller More E-Book Readers 1 04-30-2010 06:33 AM
PRS-500 Dictionary for Sony PRS500/5 (autorun from SD card) with onscreen keyboard Clemenseken Sony Reader Dev Corner 3 07-05-2008 08:33 AM


All times are GMT -4. The time now is 08:54 AM.


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