View Single Post
Old 05-18-2015, 09:36 AM   #260
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by AlterusPrime View Post
I don't know if anybody will ever want to do the same thing as i did but i was trying to find the best way to do this for 2 days (i haven't changed, still bad at scripting).
I was trying to launch CoolReader directly and then exit directly to ksm, not to vlasovsoftlauncher. Found some not_updated_for_a_long_time scripts for that in KSM but even if i've updated them - CR loses sleeping function + sleepcover and a bunch of other things. "Not an option" i thought, and came up with this WEEEEIRD solution. But hey, it works at least. (AS IS. Even though it actually works and with 99,99% chance won't damage your device cause.. well, it just won't. This is just a bunch of shell scripts)

So, here's how.
WARNING: do NOT run vlasovsoft apps until you're done!
WARNING: only use UNIX-like editor to do this!
WARNING: you should be careful and/or know what you're doing!
SUGGESTION: you may want to backup everything you edit. or may not want. depends on you.
Spoiler:
1. You gotta prepare yourself a launcher.ini file. To do that, run vlasovsoftlauncher, press options and set everything as you like except for autorun option - it should be "none" for this to work right.
2. When you're done, connect your Kobo to PC, go to /mnt/onboard/.adds/vlasovsoft and rename launcher.ini to launcher.ini.dfl
2.5. You can rename cr3.sh to cr3.sh.bkp in the same folder if you feel like it.
3. Next you gotta get yourself a copy of start_vlasovlauncher.sh (if you're using CR 2015.05 - get it from the post above (https://www.mobileread.com/forums/sho...&postcount=257)
4. Now "magic begins". You gotta find a
Code:
# run launcher
section and change it to this
Spoiler:
cat $ROOT/launcher.ini.dfl > $ROOT/launcher.ini
echo "#!/bin/sh" >> $ROOT/cr3.sh
echo "exec cr3/cr3 -stylesheet $STYLESHEET" >> $ROOT/cr3.sh
$ROOT/launcher -qws -stylesheet $STYLESHEET

5. Anywhere after
Code:
$ROOT/launcher -qws -stylesheet $STYLESHEET
line (i suggest in the # remove fifo section, just because if already contains 2 rm commands, why not add some more) you gotta add these lines
Spoiler:

rm $ROOT/launcher.ini
rm $ROOT/cr3.sh

6. After all the modifications you've done, you should put it to /mnt/onboard/.adds/kbmenu/onstart and replace existing start_vlasovlauncher.sh with the one you've just made.
7. Now, copy the file you've just made and copy it to the very same folder and name it cr3.sh (notice: there's already one with this name, you gotta remove it first; notice 2: i'm talking about /mnt/onboard/.adds/kbmenu/onstart)
8. Now open it and find
Code:
# run launcher
section.
9. This section in this file should look like this:
Spoiler:
cat $ROOT/launcher.ini.dfl > $ROOT/launcher.ini
echo "autorun=CoolReader" >> $ROOT/launcher.ini
echo "#!/bin/sh" >> $ROOT/cr3.sh
echo "cr3/cr3 -stylesheet $STYLESHEET" >> $ROOT/cr3.sh
echo "echo "exit" > $VLASOVSOFT_FIFO1" >> $ROOT/cr3.sh
$ROOT/launcher -qws -stylesheet $STYLESHEET

10. Everything else remains the same, save changes and close the file.
11. Now go to /mnt/onboard/.adds/kbmenu/onstart/ksmhome.sh. (WARNING: You should be EXTREMELY careful while editing this, if you mess something up - you'll have to factory reset your kobo)
12. Find
Code:
insertCRportrait=false
, it's not far from beginning of the file
13. Change false to true, save, if you don't want to setup launching CoolReader from nickel - reboot the device, if you want this - proceed to 14.
14. Go to /mnt/onboard/.adds/vlasovsoft and edit launcher.sh
15. Add this to
Code:
#run launcher
section:
Spoiler:

cat $ROOT/launcher.ini.dfl > $ROOT/launcher.ini
echo "#!/bin/sh" >> $ROOT/cr3.sh
echo "exec cr3/cr3 -stylesheet $STYLESHEET" >> $ROOT/cr3.sh

16. And this to
Code:
#remove fifos
section
Spoiler:

rm $ROOT/launcher.ini
rm $ROOT/cr3.sh


Now KSM has 2 options - start vlasovsoftlauncher and start coolreader. Second option starts CoolReader "directly" (actually, it's still using the launcher, so all the launcher dependant options are working) and when you close CR - you're going straight to KSM. And first option starts vlasovsoftlauncher as always, with selection of all the additional things like sudoku.
There may be a better way to do this, i still didn't figure it out.
But hey, it works great (for me at least), so i'll leave it be until (not sure it would but still) it screws me over somehow.
Thank you for the valuable contribution. I modified things a little bit in order to adjust it closer to the KSM style.

Spoiler:
Since pbchess 2015-05 is marked as "in progress", I do not publish an KSM update now. Therefore if one likes to try this one has to install it manually.

  • copy the two files start_vlasovlauncher.sh and cr3.sh into .adds\kbmenu\onstart (this will overwrite the already existing files of the same names)
  • add in .adds\kbmenu\confoptions\ksm_ini_options.txt these lines (use only a unix style editor!)
    Code:
    [vlasovsoft]
    insertCRportait=false
    insertCRportait=true
  • safely eject and disconect


configure:
  1. select (home) > configure
  2. select add section > [vlasovsoft] (do this only if this section does not already exist)
  3. select [vlasovsoft] > add item > insertCRportait=true
  4. select return
  5. select save and exit


Use this only with pbchess 2015.05!

Edit: I removed the archive from this post, since it is now included in update 4. The description of how to configure is still valid.

Last edited by tshering; 10-28-2015 at 07:14 AM.
tshering is offline   Reply With Quote