Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2014, 09:36 AM   #1
stevejoung
Member
stevejoung began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite
Change Search Prefs

I have a Kindle Paperwhite which is jailbroken and has usbnet installed.

I read German books and would like to be able to have Google Translate as the second option, instead of Wikipedia, in the box that opens when I highlight a word. At the moment when I highlight a word the dictionary translates it but if the word is not in the dictionary Wikipedia opens. I would rather that Google Translate opens if the dictionary doesn't contain the word. (I know that if I press "More" and then "Translation" and then specify source and target languages I can get a translation, but that is extremely longwinded)

I saw a hack here that suggested modifying /opt/amazon/ebook/prefs/search_prefs but that file doesn't exist on the PW. This suggested another path at /usr/share/webkit-1.0/pillow/strings/search_bar_strings.js. This file exists and I altered the Wikipedia entry to http://translate.google.com/?sl=de&tl=en&q={searchTerm}. However this has made no difference to the way the search box works, it still goes to Wikipedia if the word isn:t in the dictionary.

Could anyone tell me where I'm going wrong?

One other thing. I am editing with Vi directly on the PW via ssh from a Ubuntu machine. I have tried mounting the files but I am asked for a password and none of the password suggested by the Root Password Tool work for this. How can I mount the files on a linux machine?

Last edited by stevejoung; 09-17-2014 at 09:41 AM. Reason: Typos
stevejoung is offline   Reply With Quote
Old 09-17-2014, 10:25 AM   #2
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Hmm...

The Kindle IS a "linux machine".

You will not need a password if you access the Kindle over the USB cable.
You DO need a password if you access the Kindle over Wifi.

That *.js file is probably cached somewhere - try doing a full re-boot after changing it.
knc1 is offline   Reply With Quote
Advert
Old 09-17-2014, 10:43 AM   #3
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,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
Remember to test your stuff before doing an actual real reboot. Breaking pillow *will* soft-brick you .
NiLuJe is offline   Reply With Quote
Old 09-17-2014, 12:28 PM   #4
stevejoung
Member
stevejoung began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite
I can access the Kindle via ssh if I use the password "mario" or either of the other two passwords the Root Password Tool suggests. If I try and mount a kindle directory onto a directory on my Ubuntu laptop I am asked for the password to the directory on the kindle that I want to mount and none of the passwords work. This is what I see in the terminal:

/usr/share/webkit-1.0/pillow/@192.168.15.244's password:

The problem with /usr/share/webkit-1.0/pillow/strings/search_bar_strings.js doesn't seem to be a cache problem as it doesn't work even after a full reboot of the Kindle. I have checked the file and the Wikipedia link is pointing at Google Translate.

Last edited by stevejoung; 09-17-2014 at 01:20 PM. Reason: Clarification
stevejoung is offline   Reply With Quote
Old 09-17-2014, 01:28 PM   #5
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by stevejoung View Post
I can access the Kindle via ssh if I use the password "mario" or either of the other two passwords the Root Password Tool suggests. If I try and mount a kindle directory onto a directory on my Ubuntu laptop I am asked for the password to the directory on the kindle that I want to mount and none of the passwords work. This is what I see in the terminal:

/usr/share/webkit-1.0/pillow/@192.168.15.244's password:

The problem with /usr/share/webkit-1.0/pillow/strings/search_bar_strings.js doesn't seem to be a cache problem as it doesn't work even after a full reboot of the Kindle. I have checked the file and the Wikipedia link is pointing at Google Translate.
The Kindle kernel is not built to support remote, network access, multi-path mounts.

(Probably, your 'stock' Ubuntu kernel isn't either. )

- - - -

Install Kterm on the kindle and use busybox vi to edit the file directly.

Install the ARMhf system files (which include Nano) and edit the file directly.
knc1 is offline   Reply With Quote
Advert
Old 09-17-2014, 02:44 PM   #6
stevejoung
Member
stevejoung began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite
Thank you for taking the time to reply.

I can mount the directory now using:
Quote:
sshfs root@192.168.15.244:/usr/share/webkit-1.0/pillow/strings/ kindle
I still have the main problem that editing search_bar_strings.js to link the Wikipedia tab to the Google Translator is having no effect on the Kindle's actions, even after a reboot. I can see that the file has actually been edited.
stevejoung is offline   Reply With Quote
Old 09-19-2014, 03:09 AM   #7
stevejoung
Member
stevejoung began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite
Chaging search_bar_strings.js not having desired effect

I still have the main problem that editing
Quote:
search_bar_strings.js
to link the Wikipedia tab to the Google Translator is having no effect on the Kindle's actions, even after a reboot. I can see that the file has actually been edited.

Does anyone know which file I need to edit to change this behaviour?
stevejoung is offline   Reply With Quote
Old 09-19-2014, 06:09 AM   #8
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
AFAIK Kindle no longer uses search_bar_strings.js to translate with Bing or to access Wikipedia.

Everything is handled by ACX plugins now.
See this thread for more info: https://www.mobileread.com/forums/sho...d.php?t=235859
dsmid is offline   Reply With Quote
Old 09-19-2014, 10:09 AM   #9
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by dsmid View Post
AFAIK Kindle no longer uses search_bar_strings.js to translate with Bing or to access Wikipedia.

Everything is handled by ACX plugins now.
See this thread for more info: https://www.mobileread.com/forums/sho...d.php?t=235859
Right!
Thanks for the reminder, this thread has been:
Might also be why that user named dsmid authored the ACX enabler.
knc1 is offline   Reply With Quote
Old 10-08-2014, 02:18 PM   #10
stevejoung
Member
stevejoung began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite
Change Search Prefs

This thread has been closed by knc1. As the originator of the thread it would have been nice if I'd been asked if my problem had been solved before closing the thread.

As it happens the problem hasn't been solved because the solution offered by dsmid doesn't work on the paperwhite as opposed to the pw2. At least not for me.

Let me state the issue once again to be clear: I read German books and would like to be able to have Google Translate as the second option, instead of Wikipedia, in the box that opens when I highlight a word. At the moment when I highlight a word the dictionary translates it but if the word is not in the dictionary, Wikipedia opens. I would rather that Google Translate opens if the dictionary doesn't contain the word. (I know that if I press "More" and then "Translation" and then specify source and target languages I can get a translation, but that is extremely longwinded). Is this possible? And if so, how?

Last edited by stevejoung; 10-08-2014 at 02:38 PM.
stevejoung is offline   Reply With Quote
Old 10-08-2014, 03:38 PM   #11
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by stevejoung View Post
This thread has been closed by knc1. As the originator of the thread it would have been nice if I'd been asked if my problem had been solved before closing the thread.
- - - -
Say what?

This thread is not closed, not by anyone.

It is just that the thread is about modifying a file which is no longer used by the firmware.
Expecting to change some behavior by changing a file that is not used is like trying to beat a dead horse into pulling the plow again.
knc1 is offline   Reply With Quote
Old 10-09-2014, 03:31 AM   #12
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
stevejoung, it's reported to work on PW1, just not as a Wikipedia replacement but as another option in the context menu.
If you want to replace Wikipedia box with Google Translate outcome, then edit wikipedia.acx and replace it's logic with something similar to gtranslator.acx.
dsmid is offline   Reply With Quote
Old 10-10-2014, 07:30 AM   #13
stevejoung
Member
stevejoung began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Sep 2014
Device: Kindle Paperwhite
To knc1.
The thread is not about modifying a file which is no longer used by the firmware! It is about asking how to do something, ie change the Wikipedia tab to a translate tab. dsmid understands this so I don't know why you are having such difficulty understanding it. Your smiley flogging a horse with the comment "this thread has been:" made me assume the thread was closed.

To dsmid.
Thanks for your patience. I will try what you suggest as soon as I get home tonight.
stevejoung is offline   Reply With Quote
Reply

Tags
paperwhite, search, ssh, usnnet


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are toolbar prefs saved? copyrite Calibre 2 05-01-2014 12:44 PM
Change in Search Result? geormes Calibre 2 04-05-2014 07:08 PM
its possible change google search in windows for pc arcadecuentas Amazon Kindle 0 02-24-2014 05:10 PM
change default search action Sachiko Kindle Developer's Corner 0 02-20-2011 11:16 AM
Change in Search Features? polly Calibre 5 04-24-2010 07:36 PM


All times are GMT -4. The time now is 03:48 AM.


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