08-16-2013, 02:44 PM | #1 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
kobo menu and message
I wrote two little tools and hope they might be useful for some people here.
The idea behind kobomenu is to let bash scripts interact with the user. Example code: Code:
mychoice=$(kobomenu Coffee Tea Cocoa) kbmessage can be used to display some text and offers zoom in and out. Example code: Code:
kbmessage 'Hello world!' Code:
kbmessage -f /mnt/onboard/mytext.txt Code:
choice=$(kobomenu Coffee Tea Cocoa) if [ "$choice" != "EXIT" ]; then kbmessage "Your choice was $choice" fi kobomenu and kbmessage are depending on libraries and drivers provided by Sergey with his KoboLauncher. If you call your script from the KoboLauncher the necessary environment variables are already exported. If you call your script from a Qt neutral context you have to export the variables yourself and add the argument -qws when calling kobomenu or kbmessage. You can take KoboLauncher.sh as a model, or kobosubmenu.sh of kbmenuOnStart.zip of post 2. I would like to thank Sergey for providing the drivers. Last edited by tshering; 08-23-2013 at 12:15 PM. |
08-16-2013, 02:49 PM | #2 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
[edit: the package provided here, is out of date, cf. post #26.]
I am providing here an example of how kobomenu and kbmessage can be used. After installing the package, you will be presented with a menu each time the reader is powered on. The this menu has several entries:
The entries "start update" and "start partial update" are only available, if there is a KoboRoot.tgz in .kobo. "start koreader" is only available, if koreader is installed. If you are using Yoq's night mode hack, please re-install it in order to use it with the regular kobo reader. As for the reader started by "start kobo reader", please use additionsTokbmenuOnStart03.zip, no re-installation of the night mode hack required. [I will include this in the next update.] Install and uninstall as described in install.txt and uninstall.txt. If the previous version is already installed on your reader, uninstall it according to the description in uninstall.txt. If you install the new version without unistalling the old one, there will remain some unneccessary files on the device [but they don't do any harm, apart from wasting space]. When you uninstall the start menu, it is important that you follow strictly the instructions provided in unistall.txt. If not, you can get into trouble. Important: You cannot use this with FW older than 2.6.1. As always, use the package on your own risk. The pictures below are taken from the first version. Last edited by tshering; 01-15-2014 at 04:54 AM. |
08-16-2013, 05:26 PM | #3 |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
o my goodness: kepubs and epubs in landscape? this is terrific!
|
08-17-2013, 05:59 PM | #4 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
|
08-17-2013, 06:04 PM | #5 |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
hi tshering, well actually I did play around with it before your exhaustive instructions, and I noticed that after a couple of times it hangs! I've managed to mess my device big time, but that is my fault - but I cannot test it at least for the moment as my device is not working.
The landscape mode did work, though the covers of the books in the Home screen were somewhat cut (I have a Mini, so the screen is smaller than the other devices). |
08-17-2013, 07:25 PM | #6 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
I am pondering about why it hangs after a couple of times (of switching between the kobo reader and the main menu, I guess). One thing that I realise now is that I do not kill hindenburg when killing nickel, but start hindenburg each time nickel starts. Maybe the several instances of running hindenburg are the problem. I should have added "killall hindenburg" in .kobo/kbmenu/onstart/killnickel.sh. I will upload a new version after testing (not earlier then on Monday).
|
08-18-2013, 04:33 AM | #7 | |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
|
|
08-18-2013, 05:34 AM | #8 |
Zealot
Posts: 129
Karma: 34471
Join Date: Aug 2013
Location: Cracow, Poland
Device: Kobo Touch N905C
|
Hi thsering! This is a very useful tool! I like it! Thanks for sharing!
|
08-18-2013, 06:43 AM | #9 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
|
08-18-2013, 06:50 AM | #10 | |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
While you work on this, I wonder whether the following is relevant: when I tried the uninstall routine and disconnected the device, the "updating" screen did appear, though it went on for a handful of seconds, maybe 5 or so. I then discovered as you know that the file was still there. I was still on 2.6.1 in case that makes any difference. |
|
08-19-2013, 03:36 AM | #11 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
You are welcome. I hope it won't do any harm to anybody. After Paola's experience I feel a little bit uneasy. I guess the problem might be in the extensive example rather then the tool itself.
Last edited by tshering; 08-19-2013 at 07:28 AM. |
08-19-2013, 03:46 AM | #12 |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
tshering, please don't! First of all, I plunged into it even before you had given any explanations; secondly, I behaved like a monkey just pressing buttons without knowing what it's doing, so that is entirely my fault. Indeed, I am ready to go again
|
08-19-2013, 03:58 AM | #13 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
I am glad your mini has come back to life! This must have been a terrible weekend for you.
I am now trying to reproduce this. I am switching constantly between the main menu and the kobo reader in portrait and landscape mode, sometimes opening an epub, sometimes a kepub.epub. I have now switched over 50 times without any hang up. Do you think you did more switches before it hang up, or did you anything else? Starting and closing the koreader of course will lead to an hang up, but I think this is not what you were talking about. |
08-19-2013, 04:18 AM | #14 | ||
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
Quote:
I had to wait for a couple of minutes for the on/off switch on the Mini to be responsive, then I switched on, and all I did now was to try to replicate the landscape rotation, but now neither menu nor menu 2 gave it to me, and after the second menu (in whichever order I used them, as far as I can recall) it would hang when trying the X. I did not try to launch koreader or anything else. Unfortunately I did not think of writing down all the steps in the order I took them. I am now testing to see my Mini is working properly, then I'd be glad to have another go and try and reproduce the problem. I should also say that my problems (besides hanging) where not generated by the install process, but I suspect the uninstall was what did it for me: it is as if the Mini did not unpack the uninstall KoboRoot.tgz, or did not do so properly: it flashed for a few seconds, but then both the .tgz file and the directories for your hack were still there (and then I messed up all on my own). However now I know what I did wrong, namely I did expect the tgz to unpack on its own and did not follow your instructions (as I did not have them at the time: too impatient :-)) Quote:
Last edited by paola; 08-19-2013 at 04:22 AM. |
||
08-22-2013, 05:34 PM | #15 |
Wizard
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
|
ok, so I have been playing around with this again and can report the following (for a Mini running on 2.6.1 firmware):
1. set rotation to 90 gives landscape mode (not 180) 2. calling "X" from kobo menu 2 hangs the reader (but I guess this is normal) 3. changing the sort order of books in "books" view in the library hangs the reader; calling the library "books" sometimes hangs the reader; one restart called the setup menu, at least it launched a choice of language and "meet your reader", but then the normal home menu appeared. Some of the functions of 4. on the mini, the landscape mode is not displayed correctly (some rows are only partially visible). However kepubs read beautifully, and so do footnotes. some screenshots are attached. 5. uninstalling: after the disconnection there was a quick reboot, and then the standard home screen appeared. Tried to browse the library, and the reader hung; soft reset, and then yyour menu reappeared. I "installed the update", the device restarted, and all seems to be working fine - however the "exit" png file does not disappear. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
section menu/ main menu link auto added even if output-profile was set to kindle | flyingfoxlee | Recipes | 1 | 05-20-2013 11:42 PM |
Kobo WiFi - Battery indicator outside menu? | Cyberman tM | Kobo Reader | 1 | 03-06-2013 04:42 AM |
Kobo constantly crashes back to Reading menu | avalanches | Kobo Reader | 0 | 04-11-2011 09:35 PM |
main menu, section menu, css for calibre mobipocket output | naisren | Calibre | 2 | 08-23-2010 11:42 PM |
Metadata downloads via Edit menu but not via Download menu | mfyahya | Calibre | 10 | 06-20-2010 06:50 AM |