Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-09-2008, 05:04 PM   #1
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
PC and iliad together: ssh? dropbear?

If I understand things correctly I can install dropbear on the iliad and then ssh into it from my PC and run commands on the iliad.

Does this mean that, in principle, I should be able to remotely open a PDF with ipdf? Taking this further, is it reasonably straight-forward to run a script on my PC session that sends the command using ssh to the iliad session to open the pdf?

The iliad has no bibliography manager and even if it did I suspect it would be too slow to work with. I therefore want to be able to use my PC for managing my bibliography but be able to read articles on the iliad. I am hoping that by networking the two I can search using my bibliography manager and if I want to read an article be able to quickly open it on the iliad without having to navigate to the right folder and then use the search function to open the right PDF.

Does it make sense to even think along these lines or do I have things mixed up?

Thanks for any pointers.
daudi is offline   Reply With Quote
Old 01-09-2008, 05:36 PM   #2
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
I think that's possible

To open a PDF file from a ssh session simply type
Code:
DISPLAY=:0 ipdf /path/to/your.pdf
To start that line directly from the PC, you can issue this command (at least in Linux, don't know if it works in Windows):
Code:
ssh -l root (iliads IP) "DISPLAY=:0 ipdf /path/to/your.pdf"
-Thomas- is offline   Reply With Quote
Advert
Old 01-10-2008, 01:59 AM   #3
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Quote:
Originally Posted by -Thomas- View Post
To start that line directly from the PC, you can issue this command (at least in Linux, don't know if it works in Windows):
Code:
ssh -l root (iliads IP) "DISPLAY=:0 ipdf /path/to/your.pdf"
Great! Thanks Thomas (I should have said that I am using linux).
daudi is offline   Reply With Quote
Old 01-11-2008, 05:25 PM   #4
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
OK, I'm almost there with this. I can now open pdfs on my iliad from my bibliography manager on my PC. The only thing I need to sort out now is exiting from ipdf. If I call ipdf with the path to the pdf it opens okay, but when I try to exit on the iliad, e.g. by pressing one of the buttons, I am left with the PDF on screen. I think it has exited to the contentlister because the number of pages shown at the bottom corresponds correctly to the number of pages for each button, but it does not show the contentlister.

I am not familiar with how the contentlister works. I remember seeing in start.sh(?) something like
Code:
contentlister -sync
which looks like it might do "something" but I am reluctant to start prodding it to see what works just in case I make a mess of things.

Anyone got any pointers?
daudi is offline   Reply With Quote
Old 01-12-2008, 01:20 PM   #5
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
Does the number of pdf pages show up correctly? And does ipdf respond to the flip bar?

Maybe the contentlister registers exclusively for receiving key events or something similar?
-Thomas- is offline   Reply With Quote
Advert
Old 01-12-2008, 01:48 PM   #6
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
I open the PDF from my PC biblio manager. The correct number of pages for the PDF are displayed at the bottom of the screen.
When I log in I see this:
Code:
dave@upanga:~$ ssh root@192.168.11.3
root@192.168.11.3's password: 
root@ereader:~# ps ax | grep ipdf
 1287 root        540 S   sh -c DISPLAY=:0 ipdf /mnt/usb/iliad/library/articles/albala02.pdf/albala02.pdf 
 1288 root      10972 S   ipdf /mnt/usb/iliad/library/articles/albala02.pdf/albala02.pdf 
 1289 root      10972 S   ipdf /mnt/usb/iliad/library/articles/albala02.pdf/albala02.pdf 
 1290 root      10972 S   ipdf /mnt/usb/iliad/library/articles/albala02.pdf/albala02.pdf 
 1300 root        448 S   grep ipdf 
root@ereader:~#
Then after I press the Docs button (for example, the number of pages changes to the number of pages that the contenlister would show for Docs (and likewise for Notes, etc) but the PDF is still displayed. The flipbar changes between pages 1 and 2 of the Docs folder, and does not affect image of the PDF displayed.

Code:
root@ereader:~# ps ax | grep ipdf
shows the same as above. If I then start to kills things:

Code:
root@ereader:~# kill 1287
root@ereader:~# ps ax | grep ipdf
 1288 root      10972 S   ipdf /mnt/usb/iliad/library/articles/albala02.pdf/albala02.pdf 
 1289 root      10972 S   ipdf /mnt/usb/iliad/library/articles/albala02.pdf/albala02.pdf 
 1290 root      10972 S   ipdf /mnt/usb/iliad/library/articles/albala02.pdf/albala02.pdf 
 1306 root        448 S   grep ipdf
This still leaves the image of the PDF on the screen.

Code:
root@ereader:~# kill 1288
root@ereader:~# ps ax | grep ipdf
 1308 root        448 S   grep ipdf 
root@ereader:~#
Now it has gone.
daudi is offline   Reply With Quote
Old 01-12-2008, 06:27 PM   #7
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Quote:
Originally Posted by -Thomas- View Post
Maybe the contentlister registers exclusively for receiving key events or something similar?
Aha. Yes, I remember now reading something about how the key events were special. I am beginning to think that using ipdf remotely might be a lost cause. Shame, it felt like I was getting so close. My reason for wanting to do this was to make it easy and quick to open specific PDFs based on searches of my bibliography. I am now thinking about alternative approaches.
daudi is offline   Reply With Quote
Old 01-12-2008, 08:16 PM   #8
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
I just got a new approach to solve your problem - what about a symlink in your documents base directory? An entry in the content lister which takes you to your wanted document.

As soon as you open a new bibliography entry on your PC, a script replaces the existing symlink via SSH to point to the new PDF. This way you can open it in the content lister with 1-2 clicks and get around those key event issues.

Basically, it's something like
Code:
ssh -l root (iliad's ip) "rm /mnt/free/documents/0_actual; ln -s /path/to/your/new.pdf/ /mnt/free/documents/0_actual"
(didn't try this code, but I hope you know what I mean)
-Thomas- is offline   Reply With Quote
Old 01-13-2008, 04:00 AM   #9
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Thanks again Thomas. Great minds think alike (and fools never differ)!
I came to broadly the same solution but using a manifest.xml with a
Code:
<symlink>/path/to/pdf</symlink>
line in it, using samba instead of ssh. Part of the reason for using this approach is that real symlinks won't work with USB (unless I reformat with ext2). I have a little issue to sort out with it (the samba version) but that is probably for another thread (some sort of write problem).
daudi is offline   Reply With Quote
Old 01-13-2008, 08:54 AM   #10
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
You're right, the internal storage is formatted as FAT, so symlinks won't work there too. But the manifest file is a good solution (is there any manifest.xml documentation out there?)
-Thomas- is offline   Reply With Quote
Old 01-13-2008, 09:47 AM   #11
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
There's some in the (rather old) doc on how to make content for the iliad (on the irex website) but it does not mention the symlinks and there might be other things that can be done that we don't know about.

And my samba write problem turned out to be to do with USB being slow. Adding
Code:
sleep 1
at the right place sorted it out.
daudi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH keys with dropbear? enn Kindle Developer's Corner 2 10-07-2010 12:54 AM
iLiad How to make iliad into a SSH server and connect with iLiad tudou331100 iRex Developer's Corner 21 02-06-2009 05:35 AM
iLiad how to use the iLiad as an ssh client? nagyv iRex Developer's Corner 1 05-30-2008 12:54 AM
iLiad dropbear ssh: how to change root password? daudi iRex Developer's Corner 2 01-10-2008 04:49 PM
iLiad How do I get ssh access to my 2.7.1 iLiad? narve iRex Developer's Corner 3 11-28-2006 05:59 PM


All times are GMT -4. The time now is 07:45 PM.


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