![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 25
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
|
RMKIT COMES TO KOBO VIA FBINK
WHAT IS RMKIT?
rmkit is a c++ framework for building e-ink applications and comes with a multi-tasking launcher (remux), a drawing app (harmony), games (minesweeper, dumbskull, wordle) and more! see https://rmkit.dev for more info or search around the MR forums to see what others are saying with help from many others, we've managed to get rmkit + fbink working together to support rmkit applications on more kobo devices ![]() USAGE https://build.rmkit.dev/master/latest/kobo/ - the KoboRoot.tgz will install a few useful applications. to show remux, swipe up the side of the screen (https://imgur.com/a/NyP6Mt9) If you have any trouble, remove the `enable_remux` file from `.adds/rmkit/` to disable it NOTES this is currently in development, so I expect that there may be bugs lurking - i'd appreciate any reports + info, so we can continue to improve rmkit for kobo usage. devices that are known to work: libra h20, clara hd, elipsa 2e. if you have any success on other devices, please comment here! KNOWN ISSUES * on devices with screens that are lower res (e.g. kobo aura one), the UI may look a bit weird for some applications. we need to go back and adjust the UIs for these devices. * on the KA1, the swipe input to launch remux is also not working properly. it still has to be debugged. * rmkit is not very smart with rotations! if your device supports rotation and rmkit apps are not doing the right thing, please report what happens and what you expect to happen ACKNOWLEDGEMENTS special thanks to NiLuJe, elinkser, pgaskin, sherm_p, Szybet, Clouds and others for all the help along the way! Last edited by raisjn; 02-17-2024 at 12:19 AM. |
![]() |
![]() |
![]() |
#2 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 228
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
***
So cool to have a community toolkit (in addition to KOReader's) like rmkit running on all these quirky devices via FBInk... I tried the new binary KoboRoot.tgz package from https://build.rmkit.dev/fbink/latest/kobo/ and it ran without a problem on my Clara HD. People who need to debug can still invoke it from an SSH shell to the Kobo as: # RMKIT_KOBO_ANY=1 sh /opt/bin/remux.sh A couple of notes: 1. Rmkit is not guaranteed to start at boot. Since rmkit is started by /etc/udev/rules.d/99-rmkit.rules, which "runs early at boot", and "onboard *might*" (i.e. *might not*) be mounted at that point - as per the comments - that means rmkit is not guaranteed to start every boot. So we take the command from 99-rmkit.rules, and wrap it in a nice NickelMenu item, so we can start it manually: Code:
menu_item :main :rmkit :cmd_spawn :quiet :/usr/local/rmkit/startup.sh chain_success :dbg_toast :Started rmkit chain_failure :dbg_toast :Error starting rmkit Code:
menu_item :main :rmkit status :cmd_output :500:ps | grep remux As a possible workaround, you can delete the /opt symbolic link to /mnt/onboard/.adds/rmkit: (*Note WITHOUT the trailing slash, i.e. /opt NOT /opt/) # rm /opt Second, recreate /opt as a normal folder: # mkdir /opt Then recreate symbolic links for rmkit subfolders: # ln -s /mnt/onboard/.adds/rmkit/bin/ /opt/bin # ln -s /mnt/onboard/.adds/rmkit/data/ /opt/data # ln -s /mnt/onboard/.adds/rmkit/etc/ /opt/etc # cp /mnt/onboard/.adds/rmkit/enable_remux /opt/ Now, check everything is still there: # ls /opt/ bin data enable_remux etc # ls /opt/bin/ apps/ remux.sh 3. To use dithering_demo, you need to put colorspace.png, gradient.png, and palette.png (get them from the source package) in the /mnt/onboard/.adds/rmkit/etc/dithering_demo/ folder. 4. To try menu.sh (a simple application script from the source package), you need to put both menu.sh and simple in the /mnt/onboard/.adds/rmkit/bin/apps/ folder. 5. If you're artistic, you can draw cool scenes with Harmony tools: https://rmkit.dev/apps/harmony If you're not artistic, you can trace cool scenes from your cellphone camera photos with Harmony layers: https://www.mobileread.com/forums/sh...62&postcount=8 6. Like puzzles? https://github.com/mrichards42/remarkable_puzzles 7. The entire rmkit (including apps) builds in 6-7 minutes on my low-end Acer chromebook (converted to MXLinux). Now try Qt (lol). Me I probably won't be venturing too much into C++ because of stuff like: https://blog.tartanllama.xyz/initialization-is-bonkers/ , but Harmony alone already makes this port worthwhile to me. *** Last edited by elinkser; 03-13-2024 at 06:12 PM. Reason: remove old puzzle link,KOReader toolkit |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 25
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
|
thanks for the extra instructions! do you think it is worth adding the nickelmenu items to the koboroot? it would be an easy change
I'm also curious if you have thoughts on how to rearrange the fs (opt mount) that is more sensible, even this 2nd solution doesn't feel too clean. PS: aside from a new note taking app, any more feature requests? |
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,352
Karma: 142887248
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
This may be a duplicate thread. Have a look at this thread on RMKIT was was posted in September 2023.
https://www.mobileread.com/forums/sh...d.php?t=356282 |
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 228
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
***
@JSWolf It's so raisjn, as rmkit author, can control the info in the top rmkit post. The previous thread was when raisjn didn't have a mobileread presence. Edit: title of other thread has been scaled down to avoid confusion. @raisjn - adding the nickelmenu items to the koboroot Go for it - can be done as a stub file, or autogenerated as with KOReader/Plato (don't ask me how though). - how to rearrange the fs (opt mount) In Kobo world we are encouraged to install to user mount filesystem, e.g. /mnt/onboard/.adds/rmkit. - aside from a new note taking app, any more feature requests? Hmm, note-taking with gesture recognition on an ereader would be amazing, but I understand it to be no small task. I guess I'm pretty content as it is, with Harmony. Another cool feature of rmkit is the scriptable GUI with SAS, but I wasn't successful with this script, which is supposed to invoke luajit to convert temperature between Farenheit and Celsius: Code:
while true; do app=" textinput 250 100 200 50 label 250 200 200 50 you entered: ${temp} button 150 400 200 50 c2f button 350 400 200 50 f2c label 250 600 200 50 you clicked: ${option} [paragraph 250 800 500 500 Result = ${output}] " echo "APP IS" echo "${app}" option=`echo "${app}" | /mnt/onboard/.adds/rmkit/bin/apps/simple | grep 'selected:' | sed 's/selected: //'` temp=`echo "${app}" | /mnt/onboard/.adds/rmkit/bin/apps/simple | grep 'input:' | sed 's/input: //'` if (${option} == "c2f") then output=`/mnt/onboard/.adds/koreader/luajit -e "print((9/5) * tonumber(${temp}) + 32 + ' C')"` fi if (${option} == "f2c") then output=`/mnt/onboard/.adds/koreader/luajit -e "print((5/9)*(tonumber(${temp}))-32 + ' F')"` fi sleep 0.1 done 1. It wouldn't run if I named it anything other than "menu.sh". 2. Each input had to be done twice (e.g. text entry, button click). The first input would not register. 3. The luajit execution of "output" never gets displayed. Anything obvious I'm doing wrong? A scriptable GUI like SAS can give birth to unlimited apps! *** Last edited by elinkser; 02-14-2024 at 04:50 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 90
Karma: 3892
Join Date: Feb 2022
Device: Kobo nia
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#7 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 228
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
Well I wouldn't know enough to say whether it's stupid or not, but my limited exposure to C++ is screaming at me that it requires expertise, practice, and maybe a really good memory. To do properly I mean.
So bravo for those who can do that..</language war> |
![]() |
![]() |
![]() |
#8 | ||
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 25
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
|
@elinkser:
Quote:
Code:
#!/bin/ash while true; do app=" textinput 250 100 200 50 ${temp} label 250 200 200 50 you entered: ${temp} button 150 400 200 50 c2f button 350 400 200 50 f2c label 250 600 200 50 you clicked: ${option} [paragraph 250 800 500 500 Result = ${result}] " echo "APP IS" echo "${app}" output=`echo "${app}" | /mnt/onboard/.adds/rmkit/bin/apps/simple` echo "SELECTED: ${output}" if (expr "${output}" : "input" > /dev/null); then echo "CLICKED INPUT" temp=`echo ${output} | sed 's/input:.*://'` fi if (expr "${output}" : ".*c2f" > /dev/null); then echo "CLICKED C2F" option="c2f" result=`/mnt/onboard/.adds/koreader/luajit -e "print((9/5)*(tonumber(${temp}))+32, ' F')"` fi if (expr "${output}" : ".*f2c" > /dev/null); then echo "CLICKED F2C" option="f2c" result=`/mnt/onboard/.adds/koreader/luajit -e "print((5/9)*(tonumber(${temp})-32), ' C')"` fi sleep 0.1 done Quote:
1) when I use usbnet and ssh in, I am put into NiLuJe's version of `ash` (oops), which supports more operations than the built in `ash` from busybox in /bin/ 2) the formulas were slightly off - i adjusted them 3) when you finish typing a value into the textinput, simple exits and prints the selected value - this is why you had to do it twice: once for the textinput, once for the button being clicked. i re-arranged the logic so it is only one invocation of simple per loop PS: take a look at the source of nao in the repo: that's a bash script that supports multiple scenes. I didn't rewrite this script into such a structured form, but we could possibly come up with a similar template to make it easier to write future apps (by creating functions for common operations). screenshots here: https://rmkit.dev/apps/nao --- i will re-visit the NickelMenu stubs in a few days (or sooner) and check them in. |
||
![]() |
![]() |
![]() |
#9 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 228
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
|
It works!
Even with different script names. Thanks for this great feature, raisjn . It opens the door to multiple scriptable GUI apps on Kobo. *** Another example: We used netpbm's pnmscale and pnmtopng to help with converting our phone camera jpeg images to rmkit's Harmony drawing app png layers here: https://www.mobileread.com/forums/sh...62&postcount=8 Now with rmkit's SAS we can do the image conversion in a GUI app instead of runnning the script in a terminal: # nano -l /mnt/onboard/.adds/rmkit/bin/apps/j2p.sh Code:
#!/bin/ash # j2p.sh - rmkit SAS script to convert jpeg images to png while true; do app=" label 200 50 300 50 Jpg searchterm textinput:input1ID 200 100 300 50 ${inputSearch} [paragraph 200 200 500 400 ${jpgList}] label 200 800 300 50 Jpg to convert: ${jpgSelected} label 200 850 300 50 Png to output: ${pngFilename} textinput:input2ID 200 900 300 50 ${inputFilename} button 150 1000 200 50 Portrait button 350 1000 200 50 Landscape @fontsize 48 label 200 1100 200 50 ${option} " echo "APP IS" echo "${app}" output=`echo "${app}" | /mnt/onboard/.adds/rmkit/bin/apps/simple` if (expr "${output}" : "input: input1ID" > /dev/null); then echo "CLICKED inputSearch" inputSearch=`echo ${output} | sed 's/input:.*://'` inputSearch=`echo ${inputSearch} | sed 's/[^-A-Za-z0-9_\.]//g'` jpgSearch=`echo "${inputSearch}"*.jpg` jpgList=`cd /mnt/onboard/.adds/rmkit/data/harmony/ && ls -a ${jpgSearch}` jpgTemp=`echo ${jpgList} | sed 's/ .*/ /'` jpgSelected=${jpgTemp} inputFilename=`echo ${jpgSelected} | sed 's/\.jpg/\.png/'` pngFilename=${inputFilename} fi if (expr "${output}" : "input: input2ID" > /dev/null); then echo "CLICKED inputFilename" pngFilename=`echo ${output} | sed 's/input:.*://'` pngFilename=`echo ${pngFilename} | sed 's/[^-A-Za-z0-9_\.]//g'` inputFilename=${pngFilename} fi if (expr "${output}" : ".*Portrait" > /dev/null); then echo "CLICKED Portrait" option="Output to Portrait" cd /mnt/onboard/.adds/rmkit/data/harmony/ && export PATH=$PATH:/mnt/onboard/.adds/koreader/scripts && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/onboard/.adds/koreader/libs && jpegtran -grayscale ${jpgSelected} | djpeg -pnm | pnmscale -width 1088 -height 1488 | pnmtopng -alpha a50.pgm > ${pngFilename} fi if (expr "${output}" : ".*Landscape" > /dev/null); then echo "CLICKED Landscape" option="Output to Landscape" cd /mnt/onboard/.adds/rmkit/data/harmony/ && export PATH=$PATH:/mnt/onboard/.adds/koreader/scripts && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/onboard/.adds/koreader/libs && jpegtran -rotate 90 -grayscale ${jpgSelected} | djpeg -pnm | pnmscale -width 1088 -height 1488 | pnmtopng -alpha a50.pgm > ${pngFilename} fi sleep 0.1 done Last edited by elinkser; 02-23-2024 at 10:30 AM. Reason: jtop SAS example-cleaned up |
![]() |
![]() |
![]() |
#10 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43,304
Karma: 165124318
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Just as an FYI, I have closed the (Pre-FBInk) rmkit on my Clara HD thread.
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
|
Reporting back with some more results from the KA1:
Remux works fine, even with the default swipe gesture. Apps that just work: animation_demo, dumbskull, harmony, input_demo, mines, rpncalc, wordlet Apps with an attitude:
|
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 25
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
|
thanks Clouds!
1. drawing_demo: updated, but not tested on KA. the build server should have a new version that may work with touch 2. sharenote: also updated, but not tested on KA. the build server should have a new version that may work with touch 3. puzzles: https://build.rmkit.dev/puzzles/latest/ - i updated puzzles to use the KOX build chain and tested on the KA. the UI is a little messy on the main screen since its low res (PS: sorry for the lack of local testing on KA) Last edited by raisjn; 03-03-2024 at 10:53 AM. |
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
|
Thanks raisjn!
drawing_demo and sharenote seem to be doing the same thing as before. No visible response to drawing, but sharenote responds to buttons being clicked. When the apps are started from SSH Nickel and the app seem to be fighting for input and priority to draw on screen. For example, clearing the screen in sharenote is possible, but results in Nickel showing. Spoiler:
And the great news: puzzles....works!!! Which is beyond awesome to me ![]() ![]() Tiny tiny thingy is that the puzzles main screen is so wide it blocks the slide gesture to launch remux menu; this is easily solved by selecting one of the puzzles and slide up/down there. |
![]() |
![]() |
![]() |
#14 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 25
Karma: 11102
Join Date: Jan 2022
Device: kobo libra h2o, kobo clara hd, kobo elipsa 2e
|
Quote:
Please try the new ones from the build server (https://build.rmkit.dev/master/latest/kobo/)? The KoboRoot I linked only has the puzzles app. I tried them out on the KA and they sort of work, but my KA has touch screen issues. |
|
![]() |
![]() |
![]() |
#15 | |
Member
![]() Posts: 24
Karma: 10
Join Date: Aug 2017
Device: Kobo Aura One
|
Quote:
Quite interesting that it sort of works on your KA1. I wonder what the difference is? I have NickelMenu installed, would that be an issue? |
|
![]() |
![]() |
![]() |
Tags |
rmkit |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Clara HD (Pre-FBInk) rmkit on my Clara HD | elinkser | Kobo Developer's Corner | 67 | 02-28-2024 08:00 PM |
Thinking of buying a Kobo Aura H20 Edition 2 ... looking for insight from Kobo owners | FulciLives | Which one should I buy? | 27 | 05-05-2019 11:05 PM |
Kobo H2O Question - [Post moved out of a thread and forum unrelated to Kobo] | Millie1366 | Kobo Reader | 10 | 03-20-2016 12:35 PM |
New Kobo User becomes burned EX-Kobo user aka KOBO is horrible | tvuongpham | Kobo Reader | 140 | 09-18-2015 08:42 AM |
Changing fonts issue on Kobo Aura HD/Kobo Glo [PROBLEM SOLVED] | Dr. Drib | Kobo Reader | 19 | 05-13-2014 04:35 PM |