Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-04-2017, 11:07 AM   #1
josinalvo
Member
josinalvo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2017
Device: kindle dxg
Load a pdf via ssh

I have the kindle networking hack, and it is working well (thanks, btw!)

I wonder if it is possible to load a pdf via scp and, right after that, open it, using only ssh (that is, without using any of the kindle's buttons)

Interested in doing this either with kindle's native pdf reader or with a program from the forum
josinalvo is offline   Reply With Quote
Advert
Old 12-04-2017, 09:43 PM   #2
coplate
Fanatic
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 505
Karma: 1253584
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by josinalvo View Post
I have the kindle networking hack, and it is working well (thanks, btw!)

I wonder if it is possible to load a pdf via scp and, right after that, open it, using only ssh (that is, without using any of the kindle's buttons)

Interested in doing this either with kindle's native pdf reader or with a program from the forum
You can drop files on over SCP into the documents folder. I dont remmber the command to trigger the 'scan' after wards, but here is the command to launch the built in reader for documents, this should work for PDF:

Code:
lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/Hunted_%20The%20Iron%20Druid%20Chronicles,%20Book%20Six_B00AUSCOIS.kfx
Note in this, that the naming schem is "url formatted" so be careful with spaces and other special characters
https://www.mobileread.com/forums/sh...4&postcount=12


Try it and report back!
coplate is offline   Reply With Quote
Old 12-06-2017, 05:12 PM   #3
josinalvo
Member
josinalvo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2017
Device: kindle dxg
All variations that I tryed ended with the same error:

com.lab126.appmgrd failed to set value for property start (0x3)


for reference, I tryed:

Code:
lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf
Code:
lipc-set-prop com.lab126.appmgrd start "app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf"
Code:
lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader:/mnt/us/documents/rpg/wod.pdf
and also


Code:
lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf
with the filesystem writable (that is, before running that line, I ran mntroot rw)

Also, thank you for your response

Last edited by josinalvo; 12-08-2017 at 01:08 PM.
josinalvo is offline   Reply With Quote
Old 12-06-2017, 06:23 PM   #4
encol
Addict
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 348
Karma: 743844
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
On my PW3 the command works:
Code:
lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/test.pdf


put the commands you tried in a CODE tag
encol is offline   Reply With Quote
Old 12-06-2017, 07:04 PM   #5
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 15,404
Karma: 17000317
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by josinalvo View Post
- - - - -
with the filesystem writable (that is, before running that line, I ran mntroot rw)
- - - - -
That is not required.
Think about it.
lipc is the primary, very heavily used, event handler in an event driven system.
It HAS to work with leaving the file system exactly the way you found it.

Note:
If curious, lipc is a "wrapper" on d-bus.
Start with d-bus, there is much more published on it than on lipc.

Since you are interested in document handling, you probably want to read:
/usr/share/webkit-1.0/pillow/javascripts/lipc_event_handler.js
(a lot of /usr/bin/lipc-* is (or was) in lua - plain text that is)
knc1 is offline   Reply With Quote
Old 12-06-2017, 08:04 PM   #6
coplate
Fanatic
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 505
Karma: 1253584
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by josinalvo View Post
All variations that I tryed ended with the same error:

com.lab126.appmgrd failed to set value for property start (0x3)


for reference, I tryed:

lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf

lipc-set-prop com.lab126.appmgrd start "app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf"

lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader:/mnt/us/documents/rpg/wod.pdf

and also


lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf

with the filesystem writable (that is, before running that line, I ran mntroot rw)

Also, thank you for your response


encole asked you to respond and put the commands you put in 'CODE' tags on the forum, because it is important to know exactly what you have typed and the forum eats some things.


Are you running these in from a terminal after connecting from ssh, or sending them in the ssh command as extra parameters?

Can you copy the whole terminal screen where you are getting this error?
coplate is offline   Reply With Quote
Old 12-08-2017, 01:15 PM   #7
josinalvo
Member
josinalvo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2017
Device: kindle dxg
> encole asked you to respond and put the commands you put in 'CODE' tags on the forum, because it is important to know exactly what you have typed and the forum eats some things.

Thanks for the clarification, edited my previous post

> Can you copy the whole terminal screen where you are getting this error?

Sure!

Code:
[root@kindle root]# lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf
com.lab126.appmgrd failed to set value for property start (0x3)
[root@kindle root]# ls /mnt/us/documents/rpg/wod.pdf
/mnt/us/documents/rpg/wod.pdf
[root@kindle root]#
josinalvo is offline   Reply With Quote
Old 12-08-2017, 02:06 PM   #8
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 15,404
Karma: 17000317
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Something must be wrong with how your arguments are formatted into that command.
Code:
[root@kindle root]# lipc-probe -a

- - - - - snip - - - - - 

com.lab126.appmgrd
        w       Str     loghistory
        w       Str     load
        w       Str     goresult
        w       Str     loadresult
        w       Str     savecontext
        w       Int     startdefault
        w       Str     runresult
        w       Str     stop
        rw      Str     logLevel
        w       Int     forward
        w       Str     unloadresult
        rw      Str     logMask
        w       Str     defer
        w       Str     pauseresult
        w       Str     start
        w       Str     logallapps
        r       Str     activeApp
        w       Int     backward

- - - - - snip - - - - - -
because the start command is certainly valid for that service.
knc1 is offline   Reply With Quote
Old 12-08-2017, 08:17 PM   #9
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: 7,000
Karma: 6667465
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
IIRC, there's a switch to make sure lipc parses the arg as a specific type (int or str, mainly), which, off the top or my head, is -i for ints and -s for strings. See if that helps?

(Warning: that's completely off the top of my head, and I haven't touched an actual kindle in god knows how long ^^).
NiLuJe is offline   Reply With Quote
Old 12-08-2017, 09:25 PM   #10
coplate
Fanatic
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 505
Karma: 1253584
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by josinalvo View Post
> encole asked you to respond and put the commands you put in 'CODE' tags on the forum, because it is important to know exactly what you have typed and the forum eats some things.

Thanks for the clarification, edited my previous post

> Can you copy the whole terminal screen where you are getting this error?

Sure!

Code:
[root@kindle root]# lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.reader/mnt/us/documents/rpg/wod.pdf
com.lab126.appmgrd failed to set value for property start (0x3)
[root@kindle root]# ls /mnt/us/documents/rpg/wod.pdf
/mnt/us/documents/rpg/wod.pdf
[root@kindle root]#


Thanks for this, I found an older post that has the same error:
https://www.mobileread.com/forums/sh...8&postcount=20



Can you confirm that you are using the Kindle DX in your profile?

I have a strong feeling that this is different from what most of us responding are used to. When I saw your question, I just assumed you were using a paper white ( my daily device ), and I know it works on that.


The command knc1 posted "lipc-probe -a" will print all the lipc options, if you want to look for something similar.


If nobody remembers the command for Kindle DX, I can try to get my Keyboard working ( I believe it is the same software as DX )

Last edited by coplate; 12-08-2017 at 09:28 PM.
coplate is offline   Reply With Quote
Old 12-09-2017, 01:18 AM   #11
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 15,404
Karma: 17000317
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
K2 is same as the DX.

The dump messages (;dm) command should be the same, open a few books and then do the ;dm
You could get lucky and have hints in the log.
knc1 is offline   Reply With Quote
Old 12-09-2017, 08:57 PM   #12
coplate
Fanatic
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 505
Karma: 1253584
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by knc1 View Post
K2 is same as the DX.

The dump messages (;dm) command should be the same, open a few books and then do the ;dm
You could get lucky and have hints in the log.
For @josinalvo, ( and future readers ) just to clarify what knc1 is recommending , if you aren't familiar:

Go to the home screen of your device, and open a book from the home screen.
Do this a couple times.

Then go to the home screen and search for ";dm" ( the dump messages command ).

This is a special command to print some technical information on your device.

one of the files it makes may have the command to run ( or some hints ), to open a document from the command line.

Last edited by coplate; 12-09-2017 at 09:02 PM.
coplate is offline   Reply With Quote
Old 12-10-2017, 11:24 PM   #13
josinalvo
Member
josinalvo began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2017
Device: kindle dxg
> Can you confirm that you are using the Kindle DX in your profile?

Yes, I am. Actually, a DXG (a DX Graphite)

@knc1 @coplate

Thanks! The ;dm command is working, and I am trying to read those logs
(to a future user: to type a semicolon, use the sym button on the DX)

So far, what I discovered is just that the string 'pdf' only appears in the context of registering a plugin:
Code:
cvm[20863]: I BookletServicesImpl:RegisteringPlugin:type=pdf,class=com.amazon.ebook.booklet.reader.o:
and that the name of the book does not seem to appear at all

Now, I am trying the following: generating logs, opening the book some times, and generating logs again. This way I can narrow down my search to the diff of those 2 logs.

Will return if I discover something nice.

Last edited by josinalvo; 12-10-2017 at 11:27 PM.
josinalvo is offline   Reply With Quote
Old Yesterday, 12:04 AM   #14
coplate
Fanatic
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 505
Karma: 1253584
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by josinalvo View Post
> Can you confirm that you are using the Kindle DX in your profile?

Yes, I am. Actually, a DXG (a DX Graphite)

@knc1 @coplate

Thanks! The ;dm command is working, and I am trying to read those logs
(to a future user: to type a semicolon, use the sym button on the DX)

So far, what I discovered is just that the string 'pdf' only appears in the context of registering a plugin:
Code:
cvm[20863]: I BookletServicesImpl:RegisteringPlugin:type=pdf,class=com.amazon.ebook.booklet.reader.o:
and that the name of the book does not seem to appear at all

Now, I am trying the following: generating logs, opening the book some times, and generating logs again. This way I can narrow down my search to the diff of those 2 logs.

Will return if I discover something nice.

Good, If you can also capture the output of the command knc1 posted earlier, and post it all here, or attach as a .txt file

the command
Code:
lipc-probe -a
That has all of the lipc commands that can be run.


I notice the class of wha you had in the log where was
"com.amazon.ebook.booklet.reader.o", that is slightly differnet from the com.lab126 reader we have in the newer commands.


appmgrd

Last edited by coplate; Yesterday at 12:06 AM.
coplate is offline   Reply With Quote
Old Yesterday, 08:47 AM   #15
knc1
Analog Forever!
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 15,404
Karma: 17000317
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
There is also a keyboard version of KOreader in its early days (prior to the massive feature-creep).
That will most certainly display pdf and if there are any problems launching it, well, we have the source code.

(some tricky spelling of Liberator - it might be linked to from the first post of the KOreader thread here)
knc1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
M92: password and users (eg. ssh/ssh-server) lepau Onyx Boox 1 11-15-2013 12:46 PM
PDF Will Not Load in Built-In Reader rikugo1 Library Management 2 07-10-2011 04:09 PM
PRS-600 Cannot load scientific american pdf file mjsalman Sony Reader 11 02-06-2010 01:50 PM
Can I load my scanned PDF's into most ereaders? P.X. Fort News 8 01-05-2010 03:07 PM
PDF failes to load after 2.10 upgrade Drops iRex 4 06-13-2007 06:28 AM


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


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