Thread: Kobo Start Menu
View Single Post
Old 06-10-2014, 02:47 PM   #227
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
Quote:
Originally Posted by pazos View Post
@Ken Maltby: I'm aware that reader.lua can be called with some arguments, but when we call koreader (from shell, from start menu or from fmon) we normally don't call the reader.lua itself, but the koreader.sh script, which in kindles does:

./reader.lua $@ 2>crash.log

this means that if you call koreader.sh without arguments in a kindle koreader boot with last opened document ($@ == "")

in kobos koreader.sh does:

./reader.lua /mnt/onboard/ 2>crash.log, ignoring all arguments passed away.

If we wish to keep both files the same as possible calling koreader.sh on kobos without arguments will open koreader with last opened document, and for have the standard behaviour right now we need to call:

koreader.sh /mnt/onboard


I can't explain myself in english very well
Your Kindel version of the file has "./reader.lua $@", where the $@ brings the arguments that were given when the script started, over as arguments to reader.lua. The same could be done with the koreader_kobo.sh, but as it is a simple script it is just as easy to just apply the arguments directly to reader.lua , without passing the arguments during the call to koreader_kobo.

If you really want them to work the same all you need to do is to have the koreader.sh on kobos use the same "./reader.lua $@" that was used for the Kindels, and provide the argument(s) you want the reader.lua to run with, by adding them to the "koreader.sh" call.

But.. with the functional "Start in last opened file" option, why would you be changing the arguments to reader.lua, anymore? Either at the command line for "koreader.sh" or inside it at reader.lua. Once you have the reader pointed to where you want File Manager to open, you would want to keep it opening there. Again, another advantage provided by having the operative koreader launching file in the kbmenu folder not in the more frequently changing koreader folder.

Luck;
Ken
Ken Maltby is offline   Reply With Quote