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 08-28-2020, 09:16 PM   #1
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: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
NickelDBus - monitor and run actions over d-bus

Introducing NickelDBus

At long last, it's here. It has been teased by @geek1011 the past few weeks and I'm finally ready for an initial release.

So what is NickelDBus? It is a Nickel mod (like NickelMenu) that registers itself as a service on the d-bus system bus. It allows you to invoke a select number of Nickel actions, and listen for some signals from Nickel, all from the comfort of your own application or script.

Some of the things you can do are:
  • Know when 'content import' is complete, by listening for the 'pfmDoneProcessing' signal.
  • Present a confirmation dialog using the 'dlgConfirm*' methods, and get the users response from the 'dlgConfirmResult' signal.
  • Show a temporary toast message on-screen, for a configurable length of time.
  • Invoke a select number of actions from NickelMenu (NM doesn't need to be installed for this).
  • Know what view the user is on, and when it changes, using the 'ndbCurrentView' method and 'ndbViewChanged' signal.
  • Call functions and handle signals directly from applications with DBus.
  • Use the bundled qndb utility to easily call functions from the command line.
  • Plus more features...

It has been tested on firmware 4.6.9995+, although not all functionality is available until firmware 4.13.12638, and therefore 4.13.12638+ is highly recommended.

NickelDBus does not interfere with NickelMenu in any way. It is safe to have both installed.

You can follow the development process over at Github.

Please note, NickelDBus requires Nickel (the Kobo software) to be loaded and running to work.

Installation

Download KoboRoot.tgz (release notes) from the GitHub repository. Copy the KoboRoot.tgz file to the '.kobo' directory on your Kobo, and reboot.

Removal

If you need to remove NickelDBus for any reason, simply delete the nickeldbus file which can be found in the .adds directory. Then, reboot your Kobo.

Documentation

You can find usage and API documentation at the projects Github Pages site.

Credits

This project wouldn't have been possible without the assistance of a couple of key people:
  • geek1011 - A lot of inspiration and code came from NickelMenu. Also he has been the primary tester, code reviewer, and troubleshooter. This project would not have happened without his assistance.
  • NiLuJe - Has provided testing and ideas during the development process. Also, you can blame NiLuJe for this being a d-bus project. I quote: 'I'm going to plug my ears and sing "lalala" before anyone utters the words "dbus"'. Without that suggestion, this probably would have been a much more limited scope project.

Last edited by sherman; 04-24-2024 at 01:47 AM. Reason: Fix documentation link
sherman is online now   Reply With Quote
Old 08-28-2020, 09:18 PM   #2
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,792
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
To add to what sherman said, NickelDBus is as essentially as safe and compatible as NickelMenu (they both have extensive error-checking and a failsafe mechanism through NickelHook).

NickelDBus provides a nicer way to do things which have previously been done with heuristics, hacks, guesswork, or haven't even been possible. This includes detecting when books have been imported, controlling WiFi, cleanly shutting down, detecting the currently open view, and showing confirmation boxes. It also provides a way for scripts to show dialog boxes.

If you want to play with it, you can use qndb over telnet or SSH.

I'll add some examples here later.

Also, if you're wondering why not all NM actions are supported, I review each one to ensure it is safe to call in the background without any user interaction (and I tend to stay on the safer side if possible). This is why, for example, you can't call most actions during USBMS even though it's technically possible to do.

Last edited by geek1011; 08-29-2020 at 02:33 PM.
geek1011 is offline   Reply With Quote
Advert
Old 08-28-2020, 09:41 PM   #3
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 479
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Cool, seems awesome!!!!
Could I launch the Web browser without Wi-Fi with that? If so, it would be even more awesome!

Thanks for your great work!
NiMa is offline   Reply With Quote
Old 08-28-2020, 09:44 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: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by NiMa View Post
Cool, seems awesome!!!!
Could I launch the Web browser without Wi-Fi with that? If so, it would be even more awesome!

Thanks for your great work!
I haven't tested that, but it should behave the same as NickelMenu, as I directly call the NickelMenu code for opening the browser.
sherman is online now   Reply With Quote
Old 08-29-2020, 12:44 AM   #5
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
"From the comfort of your own app or script"... Does that mean that I can basically open nickel's browser from the vlasovsoft program?
Elektron is offline   Reply With Quote
Advert
Old 08-29-2020, 12:59 AM   #6
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: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Does vlasovsoft run within Nickel? If so, then probably yes. Otherwise, no.

EDIT: I've just added a note in the OP to clarify this.

Last edited by sherman; 08-29-2020 at 01:02 AM.
sherman is online now   Reply With Quote
Old 08-29-2020, 01:58 AM   #7
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
Does anything run within nickel?
Elektron is offline   Reply With Quote
Old 08-29-2020, 02:13 AM   #8
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: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Yeah, tools like MiniClock, my own Kobo-UNCaGED. Probably others.

The whole idea of this mod is providing a way of interacting with Nickel from other programs.
sherman is online now   Reply With Quote
Old 08-29-2020, 09:01 AM   #9
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
this is the greatest thing since sliced bread
frostschutz is offline   Reply With Quote
Old 08-29-2020, 09:23 AM   #10
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: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by frostschutz View Post
this is the greatest thing since sliced bread
I look forward to seeing what you do with it
sherman is online now   Reply With Quote
Old 08-29-2020, 11:31 AM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
\o/

Not many things to add, but if you're curious, do take a look at the discussions that happened in the previous issues in the repository, and feel free to poke at it or ask questions, someone will be happy to give you some pointers .
NiLuJe is offline   Reply With Quote
Old 08-29-2020, 02:28 PM   #12
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,792
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by NiLuJe View Post
\o/

Not many things to add, but if you're curious, do take a look at the discussions that happened in the previous issues in the repository, and feel free to poke at it or ask questions, someone will be happy to give you some pointers .
And if you're wondering about gaps where decisions and ideas appear out of nowhere, also note that most of the discussion happened in private.
geek1011 is offline   Reply With Quote
Old 08-30-2020, 12:51 PM   #13
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
Would it be better to use this in alternate readers if KFMon didnt kill nickel, but left it running in the background?

Last edited by Elektron; 08-30-2020 at 12:52 PM. Reason: typo
Elektron is offline   Reply With Quote
Old 08-30-2020, 02:55 PM   #14
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@Elektron: Err, no. That's a terrible idea. And it doesn't even make much sense?

What did you have in mind, exactly?
NiLuJe is offline   Reply With Quote
Old 08-30-2020, 04:27 PM   #15
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
I was thinking sort of "open nickel browser from KOReader or Plato"... :|
Elektron is offline   Reply With Quote
Reply

Tags
kobo, ldpreload, nickel


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
'RUN, RUN, RUN' a crime thriller $1.61 tothepoint Self-Promotions by Authors and Publishers 10 09-01-2014 01:07 PM
Calibre: Bus error migdus Calibre 7 08-16-2011 12:58 AM
/proc/bus/usb ? troymc Calibre 3 09-05-2009 11:35 AM


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


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