Thread: Kobo Start Menu
View Single Post
Old 03-30-2014, 05:42 PM   #117
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Quote:
Originally Posted by tshering View Post
I cannot see why the Kobo File Monitor is not save
File Monitor is safe, but not if used for launching GUI programs. You have to sleep nickel process, and this is problematic if the program you've launched crashes or hangs. It happened to me, I had to wait the battery end-of-life and database gets corrupted.

Quote:
Originally Posted by tshering View Post
As I understand it, the advantage of Yoq's "trick" is that he can install his night mode and preserve at the same time all modifications a user might have done to the rcS, and also not to have to deal with changes that Kobo might introduce in future rcS files (apart from the one line he is concerned with). I cannot see that this has much to do with safety.
You can't know whow rcS will be modified in a future. For example it could export a variable that it's crucial for another system script. Indeed if you compare your rcS with the last one you can see much lines of codes you missed, most notably the code that adds a factory reset check.

The good news is that if you'll do such an installer, you don't need all the modifications you're doing, because you don't need to modify the update process. You have only to modify the yoq's installer so it does not remove itself and it doesn't apply if it's already applied. So even if the system will be upgraded, Start Menu will be automatically reapplied on the new rcS.

About PRODUCT, PLATFORM and this lines of code, I think you can move them in your external script without problem:
PHP Code:
echo > /sys/devices/platform/mxc_dvfs_core.0/enable 
PHP Code:
if [ -/usr/local/Kobo/plugins/gfxdrivers/libimxepd.so ]; then
  export QWS_DISPLAY
=imxepd
else
  
export QWS_DISPLAY=Transformed:imx508:Rot90
  export QWS_MOUSE_PROTO
="tslib_nocal:/dev/input/event1"
fi 
Ultimately, what you have to substitute in rcS is only
PHP Code:
usleep 400000; /etc/init.d/on-animator.sh ) & 
with
PHP Code:
export PRODUCT
export PLATFORM
/path/to/my/external/script

usleep 400000; /etc/init.d/on-animator.sh ) & 
Quote:
Originally Posted by tshering View Post
What would be the point in doing so [renaming "usb"]?
For the same reason above. The original "usb" file should remain untouched since it's used by nickel and you can't know how it will be modified in a future. On the contrary your program should use a "myusb" file.

Last edited by Lucas Malor; 03-30-2014 at 05:49 PM.
Lucas Malor is offline   Reply With Quote