Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-17-2021, 06:02 PM   #1
ambition-kinsman
Junior Member
ambition-kinsman began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kobo Clara HD
Launch binary from the user

Hello there,

I wrote my own code to synchronize my Kobo with a self-hosted NextCloud instance. I am aware that there exists some solution that does this already but I was curious to develop on the Kobo, and it was a fun project.

Now the code fully works (tested via netcat in the Kobo itself) and I'm happy with it. However, one last thing remain: how to start the executable from the Kobo, and not from a netcat terminal

I have spent some time reading this forum, and I've seen a couple of solutions which all look great (and creative!) but I can't really implement then:

- Kobo Cloud / Wallabako udev rules. It looked easy to implement, but my opinion is that it's a bit unreliable and also I don't really trigger it myself. I need to connect/disconnect from the WiFi or reboot.
I have tried to watch the bus for other kind of events (e.g. on press, on access to a specific settings section, etc) but to no avail.

- fmon / Kute File Monitor: I was really impressed by how creative this is. However I'd like my program to be standalone, and not to depend on another one's code, and I don't think re-implementing this myself would be wise.

- Use NickelDbus / NickelMenu. Same cons as fmon / KFM.

- Go hardcore and use NickelHook to reimplement a NickelMenu like behavior. This looks to be too much effort for what started with a sync script, though I admire the effort and reading the code was really interesting!

I feel like it can't be that hard to start a simple binary from the user's point of view?

If you have any suggestions or see things I've missed I'd be more than happy to hear!!

Thanks
AK
ambition-kinsman is offline   Reply With Quote
Old 11-18-2021, 11:49 AM   #2
rtiangha
Evangelist
rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.
 
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
If you're talking about launching an executable on demand, then you'll need a launcher, which is what kfmon and NickelMenu are. Otherwise, you'd need to code your own launcher program to monitor for and take in user input, but then what would be the point?

But if you mean launch automatically from device boot up, you'll probably need to do it through udev. You can read dstaley's write up on Tailscale for hints.
rtiangha is offline   Reply With Quote
Old 11-18-2021, 03:03 PM   #3
ambition-kinsman
Junior Member
ambition-kinsman began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kobo Clara HD
@rtiangha, thanks for the reply.

I meant indeed to launch an executable on demand. Sorry that was not clear.

If there's no other way than a launcher, it does look indeed a bit overkill for a simple sync program.
Thank you for the link about Tailscale, I'll read that carefully. Maybe udev is the 'necessary evil' for a simple yet functioning solution.
ambition-kinsman is offline   Reply With Quote
Old 11-18-2021, 03:35 PM   #4
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Personally, I'd just use NickelMenu and call it a day. Chances are, the people who would want to use your script are also the sort of people who already have it installed. You can simply bundle your own NickelMenu config.

Out of curiosity, how are you getting Nickel to scan for new content?
sherman is offline   Reply With Quote
Old 11-27-2021, 04:37 AM   #5
ambition-kinsman
Junior Member
ambition-kinsman began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kobo Clara HD
Hi @sherman,

Thanks for your input. I'm not so sure about your first assumption: NickelMenu is a full featured add-on that has "no purpose" for the end-user if they just want a quick sync script. But I do see your point.

I am using the "Library refresh trick" which I've found on the source of kobo-wget-sync: https://github.com/wernerb/kobo-wget...esh_library.sh
ambition-kinsman is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PW3 Is there a netsurf binary for Kindle? tva2000hn Kindle Developer's Corner 5 02-19-2022 02:03 PM
binary vs source iomari Calibre 16 06-22-2013 12:21 PM
Searching in binary field Manichean Calibre 2 06-14-2010 06:29 AM
Problem with binary install ferridder Calibre 1 11-18-2008 01:27 PM
Binary Install of calibre Glenendale Calibre 1 11-10-2008 12:58 PM


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


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