05-05-2023, 01:57 PM | #256 |
Junior Member
Posts: 4
Karma: 10
Join Date: May 2023
Device: K4
|
Yes I had seen your note but I tried entering fbink in ssh and it didn't work, "which fbink" didn't return anything and I couldn't find the binary by poking around, so I am not sure it's in there. I had installed the Update_usbnetwork_0.57.N_k4_install.bin from kindle-usbnetwork-0.57.N-k4.zip.
|
05-05-2023, 03:47 PM | #257 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
IIRC, `which` is broken on Kindle (for... fuse proxy reasons, I think).
Also, I may have some PATH shenangians going on in ZSH, so try in that shell instead? And, I imagine, the broken manual install of this package may very well have screwed things up, too ;o). |
Advert | |
|
12-20-2023, 03:14 PM | #258 |
Junior Member
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Kindle PW2
|
FBInk: Rotate Viewport for Kindles?
Hello everyone!
First of all, thank you NiLuJe, for all your contributions! Specially for fbink, which I'm happily using from my python script on my jail broken Kindle PW2. I'm currently working on putting my kindle into a photo frame and displaying our family calendar on it. Unfortunately, I now placed it in landscape format in the frame, but the default way of using fbink is printing stuff in portrait mode (same orientation as the stock UI, KUAL, etc. at least on the Kindle PW). So my question would be: is there an easy way rotate everything that fbink prints on the screen (open type text, image, etc.)? |
12-20-2023, 03:43 PM | #259 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
For images, you could rotate your input data on your end (e.g., Pillow probably has a gazillion ways to do something like that), but that won't help for text drawn by fbink.
Which leaves rotating the framebuffer entirely via `fbdepth` (or `fbink_set_fb_info`). If the native framework is still running (specifically, X11), that *will* upset it, though . Last edited by NiLuJe; 12-20-2023 at 03:47 PM. |
12-22-2023, 10:51 AM | #260 |
Junior Member
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Kindle PW2
|
ok thank you! Do you think it's feasible to do all graphic generation (text, elements, ...) on pillow and then just print the output as images? Sounds like not so ideal performance wise, but haven't tried it yet.
|
Advert | |
|
12-22-2023, 01:05 PM | #261 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
That'd be a perfectly viable approach, AFAICT.
|
12-22-2023, 04:15 PM | #262 | |
the rook, bossing Never.
Posts: 11,581
Karma: 87456643
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
In some situations it improves performance. |
|
01-21-2024, 04:41 PM | #263 |
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
Hi,
Im playing a bit with the daemon mode, is there a reason you can load only one ? I tried to run two, but the second one does nothing. (even when I set FBINK_NAMED_PIPE=/tmp/something_else) It would be nice to run a second one, like this (a bit like the -g logo= option) fbink -y-20 -pm -d pipe=/tmp/pipe_stdout,5 fbink -y-14 -pmh -d pipe=/tmp/pipe_stderr,2 Its a very nice tool, must have taken quite some time to create |
01-21-2024, 05:52 PM | #264 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@bitfreak: There's no limit, that's just not the right syntax . (So what's happening with what you quoted is that it's just attempting to use the default path twice, which obviously doesn't work. c.f., logread, you'll see the error messages).
Specifically, -d is not a suboption, it only takes a single value, the amount of lines. The pipe's path can only be customized via an env var. Code:
FBINK_NAMED_PIPE=/tmp/root/fb_1 fbink -y -14 -d 2 FBINK_NAMED_PIPE=/tmp/root/fb_2 fbink -y -20 -d 5 Last edited by NiLuJe; 01-21-2024 at 05:54 PM. |
01-22-2024, 03:29 PM | #265 |
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
Ahh, I feel like a moron
Thanks |
01-24-2024, 04:09 PM | #266 |
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
Taken from the help:
For more complex & long-running use-cases involving *text* only (or a progress/activity bar), you can also switch to daemon mode, So, how would that work with a progress bar then? fbink keeps throwing me the help or there is no process or I just get text. |
01-24-2024, 06:09 PM | #267 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
You need an initial progress/activity bar value (e.g., -P 0).
|
01-25-2024, 01:37 PM | #268 |
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
Using: FBInk v1.25.0 for Kobo
I figured out my problem, apparently it has multiple causes. 1. Remember that LFs are honored! When echoing percentages the LFs are detected and the percentage is ignored, so nothing happens on screen. You have to echo without an LF: "echo -n " or use "printf". So command1 2>/tmp/fbink-fifo | command2 > /to/file does not work because the percentage stream has to be made LF free. So with some shell-shenanigans that becomes: { command1 | command2 >/to/file;} 2>&1 | tr -d '\n' >/tmp/fbink-fifo which does work. 2. Otherwise, you may want to ensure that it doesn't already exist *before* launching a daemon mode session. If you mess up the command line and the process is not running, all data piped will end up in a file /tmp/fbink-fifo. Next time you run fbink, it exits because it detects a file /tmp/fbink-fifo and thus cannot create the pipe. But silently ignores it (going from memory). BitFreak Last edited by bitfreak; 01-25-2024 at 03:07 PM. |
01-26-2024, 12:09 AM | #269 |
BLAM!
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
1. Yeah, `strtoul` calls are heavily validated . Out of curiosity, what are you running that's spitting out LFs?
2. Yup, check the syslog for failures. (The same applies for 1., actually, the strtoul validation errors will be spit out there, too) |
01-26-2024, 01:02 PM | #270 |
Enthusiast
Posts: 36
Karma: 3790
Join Date: Jan 2024
Device: Kobo
|
Linux's most prestigious pipe viewer: pv (https://www.ivarch.com/programs/sources/pv-1.8.5.tar.gz) Use switch -n to spit out percentage instead of a progress-bar.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura HD Small tool for filling book library in Kobo Aura | Paxerus | Kobo Developer's Corner | 2 | 12-31-2013 07:05 PM |
Small print | Broadback | Conversion | 12 | 12-12-2011 02:31 PM |
Small Tool to change book order (PRS-x50) | goaspy | Sony Reader | 113 | 10-14-2011 03:28 PM |
small print | breezeman | Introduce Yourself | 13 | 07-03-2011 09:02 AM |