Difference between revisions of "Patch webOS Changing the "Turn off after X" time"

From WebOS Internals
Jump to: navigation, search
m
Line 17: Line 17:
 
Steps:
 
Steps:
  
1) Root your pre : go [[Portal:Accessing_Linux]]
+
1) Access Linux on your phone: [[Portal:Accessing_Linux]]
  
 
2) SSH to your pre and sudo to root.  Execute "rootfs_open -w".
 
2) SSH to your pre and sudo to root.  Execute "rootfs_open -w".

Revision as of 16:01, 28 July 2009

Changing the "Turn off after X" time in the Palm Pre ("Screen and Lock Menu")

By Townsend Harris ("tharris-" IRC channel)

Ultimately what this does is allow you to change the idle time value that turns the pre off. So this setting tells the pre "After X seconds of activity go to sleep". Now for me I wanted say 5 minutes so I can test stuff, but the average person might be ok with the 30 seconds, 1 minute, 2 minutes, or 3minutes, now we have an option.


SPECIAL NOTE: Changing this value to less than 30 seconds means you better be acting fast, as a side note I was able to set the value to 1 second and still operate the pre (I do not recommend this), but I had to be very fast. Also changing this value to a high number *can* drain your battery so be aware.

If all you want to do is keep the screen on while charging, you can set that using luna-send. Your screen will stay on when on usb power and wall power. When on the Touchstone, the Pre will still go back to the "lock" screen after the timeout period.

luna-send -n 1 palm://com.palm.display/control/setProperty '{"onWhenConnected":true}'

Steps:

1) Access Linux on your phone: Portal:Accessing_Linux

2) SSH to your pre and sudo to root. Execute "rootfs_open -w".

3) make a copy of the original "/usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js" file by executing the following:

"cp /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js.org"

4) edit the /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js file

Goto line 102 (WebOS 1.1: Line 111) which should like like:

**//Available Timer Values.
 availableTimers: "[{label: $L('30 seconds'), value:30},{label: $L('1 minute'), value:60},{label: $L('2 minutes'), value:120},{label: $L('3 minutes'), value:180}],"**

and add this to the end of the string inside the last "]": ",{label: $L('5 Minutes'), value:300}" and edit it as you see fit. This will add "5 Minutes" to the drop down menu. You can add further options as you require (i.e. 30 minutes, 3 hours, etc.).

REMEMBER the value is based on SECONDS

5) Execute a rescan by running "luna-send -n 1 palm://com.palm.applicationManager/rescan {}" on the command line.

6) Execute "mount -o remount,ro /".

Voila you have changed your idle timeouts.