Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-03-2024, 03:01 PM   #1
EastEriq
Groupie
EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.
 
Posts: 199
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
How do handlers work?

Motivated by https://www.mobileread.com/forums/sh...d.php?t=363115, I'm trying to figure out what is the mechanics by which a handler works on a given file. As is known, I can write in /mnt/ext1/system/config/handlers.cfg the default program associated to a given file, so that it will be opened with it when tapping; I can associate a given file extension to a list of programs in extensions.cfg, so that I get on long press a menu for choosing which of them opens it.
I then created a small script in /mnt/ext1/applications/ in order get more insight. My script reads
Code:
#!/bin/sh
dialog 1 "" "$* $0 $! $1 $@" "Ok"
 echo "$* $0 $! $1 $@" > /mnt/ext1/applications/handle.log

If I call this script from shell with or without command line arguments, I get the expected result, that is a dialog with some text and button labels. However, if I tap on a file associated to that script, I only see a hourglass for a second, and see get no new content in the dump file handle.log. What am I missing?

EastEriq is offline   Reply With Quote
Old 11-06-2024, 11:33 AM   #2
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,887
Karma: 12981955
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
What does the relevant entry within extensions.cfg and/or handlers.cfg look like?
neil_swann80 is offline   Reply With Quote
Advert
Old 11-07-2024, 04:43 PM   #3
EastEriq
Groupie
EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.
 
Posts: 199
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
I was about to write "they look like they should", i.e. for instance in relevant lines
extensions.cfg
Code:
epub:@EPUB_file:1:handleacsm.app,koreader.app,eink-reader.app:ICON_EPUB
handlers.cfg:
Code:
/mnt/ext1/Digital Editions/Lucifero.epub:eink-reader.app
/mnt/ext1/Digital Editions/Malinverno.epub:handleacsm.app
Then I thought I understood what it was: my script (handleacsm.app) was in /mnt/ext1/applications/ which is not in $PATH, and it worked from command line only when I was calling it with its full path. I tried then to copy it in /mnt/secure/bin/ (which is in $PATH), but at no avail.
Finally it occurred to me that koreader.app is, instead, in /mnt/ext1/system/bin. And once the script is moved there it works as a handler...
From that I could speculate that the mechanism of adding additional handlers has something going on behind the scenes (for instance in the long-press pulldown menu the label "PB reader" is shown for eink-reader.app, but "koreader.app" and my "handleacsm.app" are shown with their filename), but whatever, I think I have now a first lead.

Last edited by EastEriq; 11-07-2024 at 04:51 PM.
EastEriq is offline   Reply With Quote
Old 11-08-2024, 07:05 AM   #4
EastEriq
Groupie
EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.EastEriq can program the VCR without an owner's manual.
 
Posts: 199
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
Thinking again at it, that /mnt/ext1/system/bin is in PATH for user applications must have been well known since a while. Maybe that is defined in some .rc file which I haven't located. I refound that I had already a number of tested applications installed there, like utelnetd, cr3-pb.app, epubinfo.app, sh_ivtools,app etc.
As for the OS doing some translation of the names, I remark that a) the name of eink-reader.app in the pulldown menu is localized; b) eink-reader_with_pdfium.app and eink-reader_with_rmsk.app don't appear to correspond to a binary of that name, maybe they are internally aliased to eink-reader.app + parameters.
EastEriq is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion. Highlight handlers GUI diego77 Viewer 0 07-04-2021 06:02 PM
Are there tagging apps for Android, which work well on e-ink, and work w/o swiping? MarjaE Android Devices 0 07-03-2021 07:02 PM
Accessories SD Cards that work or don't work with the eDGe devseev enTourage Archive 31 01-11-2011 04:30 PM
iPad How well does it work outside? TallMomof2 Apple Devices 9 04-04-2010 06:49 PM
How does it work*? Sultan Rahi OpenInkpot 3 12-29-2009 08:59 AM


All times are GMT -4. The time now is 09:09 PM.


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