![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? ![]() ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#2 |
0000000000101010
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 Code:
/mnt/ext1/Digital Editions/Lucifero.epub:eink-reader.app /mnt/ext1/Digital Editions/Malinverno.epub:handleacsm.app 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. |
![]() |
![]() |
![]() |
#4 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |