<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phwelo</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phwelo"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Phwelo"/>
	<updated>2026-04-25T05:30:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Contact_Link_Backup&amp;diff=7425</id>
		<title>Contact Link Backup</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Contact_Link_Backup&amp;diff=7425"/>
		<updated>2009-11-25T18:12:25Z</updated>

		<summary type="html">&lt;p&gt;Phwelo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Unconfirmed, but I guess that contact links are store in&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/var/luna/data/dbdata/PalmAccountDatabase.db3&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/var/luna/data/dbdata/PalmDatabase.db3&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It looks like the the table com_palm_pim_Person (in PalmDatabase.db3) has a field contactCount which is the number of contacts that are linked. (For entries just on the phone it is 1.) The linked contacts are then in the com_palm_pim_Contact table. (Connected by the field id in _Person and com_palm_pim_Person_id.)&lt;br /&gt;
(Thanks stephen-wood)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I attempted using these two files to backup and restore my contact links.  After doing this contacts seemed to link but were not accessible.  I then rebooted hoping that this would firm things up or just re-synch the contacts, but unfortunately it seems to have corrupted the contacts app completely.  i can no longer see any accounts in the preferences and i'm also unable to add any new accounts.  just a word of warning for anyone else looking into this  - --[[User:Phwelo|phwelo]] 18:12, 25 November 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Phwelo</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Contact_Link_Backup&amp;diff=7424</id>
		<title>Contact Link Backup</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Contact_Link_Backup&amp;diff=7424"/>
		<updated>2009-11-25T18:12:03Z</updated>

		<summary type="html">&lt;p&gt;Phwelo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Unconfirmed, but I guess that contact links are store in&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/var/luna/data/dbdata/PalmAccountDatabase.db3&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/var/luna/data/dbdata/PalmDatabase.db3&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It looks like the the table com_palm_pim_Person (in PalmDatabase.db3) has a field contactCount which is the number of contacts that are linked. (For entries just on the phone it is 1.) The linked contacts are then in the com_palm_pim_Contact table. (Connected by the field id in _Person and com_palm_pim_Person_id.)&lt;br /&gt;
(Thanks stephen-wood)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I attempted using these two files to backup and restore my contact links.  After doing this contacts seemed to link but were not accessible.  I then rebooted hoping that this would firm things up or just re-synch the contacts, but unfortunately it seems to have corrupted the contacts app completely.  i can no longer see any accounts in the preferences and i'm also unable to add any new accounts.  just a word of warning for anyone else looking into this&lt;/div&gt;</summary>
		<author><name>Phwelo</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=On_Screen_Keyboard&amp;diff=3426</id>
		<title>On Screen Keyboard</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=On_Screen_Keyboard&amp;diff=3426"/>
		<updated>2009-08-01T19:18:43Z</updated>

		<summary type="html">&lt;p&gt;Phwelo: /* On Screen Keyboard: A path forward */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=On Screen Keyboard: A path forward= &lt;br /&gt;
&lt;br /&gt;
The Palm Pre already COMES with an on-screen keyboard. It works in portrait and landscape, in all apps, in all fields. &lt;br /&gt;
&lt;br /&gt;
Press the &amp;quot;sym&amp;quot; key and a scrollable 5x5 keyboard pops up full of alternate characters. &lt;br /&gt;
&lt;br /&gt;
This is controlled by /usr/palm/frameworks/mojo/submissions/191.15/javascripts/widget_charselector.js&lt;br /&gt;
&lt;br /&gt;
with the layout controlled by 3 files in /usr/palm/frameworks/mojo/submissions/191.15/templates/charselector&lt;br /&gt;
&lt;br /&gt;
the actual list of characters that appear on the screen is controlled by /usr/palm/frameworks/mojo/submissions/191.15/resources/en_us/alternatechars_table.json&lt;br /&gt;
&lt;br /&gt;
At the simplest level then, creating an on-screen keyboard requires editing the alternate characters table json, to add the &amp;quot;regular&amp;quot; charcters to it, and then when you want a keyboard, press SYM and poof, a keyboard. &lt;br /&gt;
&lt;br /&gt;
At the next level, widget_charselector.js needs to be modified to not close the keyboard after each keypress.  &lt;br /&gt;
&lt;br /&gt;
A more sophisticated version would require editing widget_charselector.js to make the widget wider to accomodate more characters at a time, or perhaps a qwerty layout. &lt;br /&gt;
&lt;br /&gt;
A further refinement would require digging into the mojo framework deeper.  It would be really &amp;quot;neat&amp;quot; if you were in a text field and the keyboard &amp;quot;popped up&amp;quot; if the slider was closed.  This would be &amp;quot;harder.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Still, this is a path forward which is something we haven't had before. &lt;br /&gt;
&lt;br /&gt;
Please edit this page with your thoughts, and proposals.&lt;/div&gt;</summary>
		<author><name>Phwelo</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=On_Screen_Keyboard&amp;diff=3425</id>
		<title>On Screen Keyboard</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=On_Screen_Keyboard&amp;diff=3425"/>
		<updated>2009-08-01T19:03:25Z</updated>

		<summary type="html">&lt;p&gt;Phwelo: /* On Screen Keyboard: A path forward */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=On Screen Keyboard: A path forward= &lt;br /&gt;
&lt;br /&gt;
The Palm Pre already COMES with an on-screen keyboard. It works in portrait and landscape, in all apps, in all fields. &lt;br /&gt;
&lt;br /&gt;
Press the &amp;quot;sym&amp;quot; key and a scrollable 5x5 keyboard pops up full of alternate characters. &lt;br /&gt;
&lt;br /&gt;
This is controlled by framework/javascripts/widget_charselector.js&lt;br /&gt;
&lt;br /&gt;
with the layout controlled by 3 files in templates\charselector &lt;br /&gt;
&lt;br /&gt;
the actual list of characters that appear on the screen is controlled by /usr/palm/frameworks/mojo/submissions/191.15/resources/en_us &lt;br /&gt;
&lt;br /&gt;
At the simplest level then, creating an on-screen keyboard requires editing the alternate characters table json, to add the &amp;quot;regular&amp;quot; charcters to it, and then when you want a keyboard, press SYM and poof, a keyboard. &lt;br /&gt;
&lt;br /&gt;
At the next level, widget_charselector.js needs to be modified to not close the keyboard after each keypress.  &lt;br /&gt;
&lt;br /&gt;
A more sophisticated version would require editing widget_charselector.js to make the widget wider to accomodate more characters at a time, or perhaps a qwerty layout. &lt;br /&gt;
&lt;br /&gt;
A further refinement would require digging into the mojo framework deeper.  It would be really &amp;quot;neat&amp;quot; if you were in a text field and the keyboard &amp;quot;popped up&amp;quot; if the slider was closed.  This would be &amp;quot;harder.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Still, this is a path forward which is something we haven't had before. &lt;br /&gt;
&lt;br /&gt;
Please edit this page with your thoughts, and proposals.&lt;/div&gt;</summary>
		<author><name>Phwelo</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Portal:Patches_to_webOS&amp;diff=3327</id>
		<title>Portal:Patches to webOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Portal:Patches_to_webOS&amp;diff=3327"/>
		<updated>2009-08-01T03:31:20Z</updated>

		<summary type="html">&lt;p&gt;Phwelo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__notoc__&lt;br /&gt;
{{portal-header&lt;br /&gt;
|This page lists patches to webOS existing apps which modify the behavior as shipped.  '''Note''' that these patches may be version specific and may be broken by future webOS updates.  Proceed with caution. If you get one that works please move it under the correct column, alphabetically, and title the page:&lt;br /&gt;
'''&amp;quot;Patch [application] [description]&amp;quot;'''&lt;br /&gt;
}}&lt;br /&gt;
This page is undergoing structuring please contribute moving or adding new entries under the appropriate headings. For now put pages in alphabetical order. Each page should contain at least the basic headings&lt;br /&gt;
*1. '''Introduction''': A brief description to introduce people to the patch.&lt;br /&gt;
**1.1 '''Usage''':An explanation if it is needed on how to use the modification see Add/Delete Pages in the Launcher as an example.&lt;br /&gt;
*2. '''Editing Process''': Step by step instructions to manually edit. &lt;br /&gt;
*3. '''Patching Process''': Details for making the edits with a patch file and pointing people to the [[Applying Patches]] page if the patch is also provided in the webos-internals gitorious repository.&lt;br /&gt;
&lt;br /&gt;
{{portal-three-columns&lt;br /&gt;
|column1= &lt;br /&gt;
===webOS Update Information===&lt;br /&gt;
* [[Update 1.1.0|Update 1.1]]&lt;br /&gt;
* [[Update 1.0.4|Update 1.0.4]] &lt;br /&gt;
* [[Update 1.0.3|Update 1.0.3]]&lt;br /&gt;
&lt;br /&gt;
===Patches that Need Work===&lt;br /&gt;
* [[Bugs]]&lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
===Patch Ideas to be Created or in Progress===&lt;br /&gt;
&lt;br /&gt;
* [[Add_Ability_To_Choose_Snooze_Length|Add Ability to Choose Snooze Length]]&lt;br /&gt;
* [[Changing_clipboard_data_from_the_shell|Changing Clipboard Data from the Shell]]&lt;br /&gt;
* [[Development_%26_Tweak_Ideas | Development &amp;amp; Tweaking Ideas]]&lt;br /&gt;
* [[Longer Vibrate|Longer Vibrate]]&lt;br /&gt;
* [[More_Calculator_Functions|Accessing additional built-in calculator functions]]&lt;br /&gt;
&lt;br /&gt;
|column3=&lt;br /&gt;
===Notes===&lt;br /&gt;
These modifications lack a patch process, please add one to the details to the page and have it added to the webOS-internals gitorious repository. Info for the repository is on [[Applying Patches]].&lt;br /&gt;
&lt;br /&gt;
*Empty&lt;br /&gt;
}}&lt;br /&gt;
{{portal-three-columns&lt;br /&gt;
|column1= &lt;br /&gt;
==Patches to webOS apps==&lt;br /&gt;
===webOS 1.1 OK===&lt;br /&gt;
&lt;br /&gt;
* [[Always_Show_Details_of_New_Tasks|Always Show Details of New Tasks]]&lt;br /&gt;
* [[Patch Browser Global Search Addons|Browser: Global Search Addons]]&lt;br /&gt;
* [[Bookmarking_MediaPlayer|Bookmarking MediaPlayer]]&lt;br /&gt;
* [[Camera Mod Shutter Sound On-Off Button]]&lt;br /&gt;
* [[Camera Mod 10 Second Countdown Timer]]&lt;br /&gt;
* [[Patch Clock Enabling the Hidden Theme|Clock: Enabling the Hidden Theme]]&lt;br /&gt;
* [[Confirm Deletion on Email|Confirm Deletion on Email]]&lt;br /&gt;
* [[Patch Email Change Default Font for Replies-Forwards from Navy to Black|Email: Change Default Font for Replies/Forwards from Navy to Black]]&lt;br /&gt;
* [[GPS Tracking|GPS Tracking]]&lt;br /&gt;
* [[Patch Launcher Add or Delete Pages|Launcher: Add/Delete Pages]]&lt;br /&gt;
* [[Patch Launcher Hide-Delete The NASCAR App|Launcher: Hide/Delete The NASCAR App]]&lt;br /&gt;
* [[Patch Launcher Hide Media Sync Option|Launcher: Hide Media Sync Option]]&lt;br /&gt;
* [[Patch Launcher Unhide the DeveloperMode App|Launcher: Unhide the DeveloperMode App]]&lt;br /&gt;
* [[Display_Full_Status_Messages(Messenger)|Display Full Status Messages(Messenger)]] &lt;br /&gt;
* [[Patch Messaging Character Counter|Messaging: Character Counter]]&lt;br /&gt;
* [[Patch Messaging Forward Messages|Messaging: Forward Messages]]&lt;br /&gt;
* [[Patch Messaging New Cards For Each Conversation|Messaging: New Cards For Each Conversation]]&lt;br /&gt;
* [[Patch MCraig Enabling Personals Category|mCraig: Enabling Personals Category]]&lt;br /&gt;
* [[Patch Phone Disable Missed-Dropped Call Sound|Phone: Disable Missed-Dropped Call Sound]]&lt;br /&gt;
* [[Patch Phone Edit Dialer Theme|Phone: Edit Dialer Theme]]&lt;br /&gt;
* [[Patch Phone Editing the Lock Screen|Phone: Editing the Lock Screen]]&lt;br /&gt;
* [[Using Volume Buttons to Take a Picture|Using Volume Buttons to Take a Picture]]&lt;br /&gt;
* [[Changing Alarm Clock Button Order and Snooze Duration]]&lt;br /&gt;
* [[Download Amazon Music over EVDO]]&lt;br /&gt;
* [[Change_Running_Late_Email|Change &amp;quot;Running Late&amp;quot; Email]]&lt;br /&gt;
* [[Patch PDF Viewer|PDF Viewer]]&lt;br /&gt;
&lt;br /&gt;
===Fixed in 1.1 - No longer needed===&lt;br /&gt;
* [[Patch Email Fix Broken Formatting|Email: Fix Broken Formatting for E-mails]]&lt;br /&gt;
&lt;br /&gt;
===Not 1.1 compatible===&lt;br /&gt;
* [[Camera_Remote_View|Camera Remote View]]&lt;br /&gt;
* [[Downloading From The Browser|Downloading From The Browser]] &lt;br /&gt;
* [[Enable Landscape Viewing in Email|Enable Landscape Viewing in Email]] &lt;br /&gt;
* [[Fix Email Attachments|Fix Email Attachments]] &lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
==Patches not part of a specific app==&lt;br /&gt;
===webOS 1.1 OK===&lt;br /&gt;
* [[Boot_Themes|Boot Themes]]&lt;br /&gt;
* [[Brightness]]&lt;br /&gt;
* [[Bypassing_Activation|Bypassing Activation]]&lt;br /&gt;
* [[Change_Carrier_String|Change Carrier String]]&lt;br /&gt;
* [[Changing_the_%22Turn_off_after_X%22_time|Changing the &amp;quot;Turn off after X&amp;quot; Time]]&lt;br /&gt;
* [[CPU Frequency or Voltage Scaling|CPU Frequency or Voltage Scaling]]&lt;br /&gt;
* [[Disable Charging Event Alerts Sounds|Disable Charging Event Alerts Sounds]]&lt;br /&gt;
* [[Graphics]]&lt;br /&gt;
* [[Keep Phone From Entering Standby While in Remote Session]]&lt;br /&gt;
* [[Logging information from within scripts|Logging information from within scripts]]&lt;br /&gt;
* [[Message Sound|Message Sound]]&lt;br /&gt;
* [[Modifying a Stock App While Keeping the Original|Modifying a Stock App While Keeping the Original]] &lt;br /&gt;
* [[Add_Words_to_AutoCorrect_Dictionary|Modify AutoCorrect Dictionary]]&lt;br /&gt;
* [[Radio_Power_Switch|Phone On/Off Switch]]&lt;br /&gt;
* [[Random Wallpaper Switching|Random Wallpaper Switching]]&lt;br /&gt;
* [[Reverse Tunnel|Reverse Tunnel]] &lt;br /&gt;
* [[Roam Control|Roam Control]]&lt;br /&gt;
* [[Show_Actual_Battery_Percent | Show Actual Battery Percentage]]&lt;br /&gt;
&lt;br /&gt;
===Fixed in 1.1 - No longer needed===&lt;br /&gt;
* Empty&lt;br /&gt;
&lt;br /&gt;
===Not 1.1 compatible===&lt;br /&gt;
* [[Email App Patch to Prompt for IPK Installation|Email App Patch to Prompt for IPK Installation]] &lt;br /&gt;
&lt;br /&gt;
|column3=&lt;br /&gt;
==== The following have not been checked for compatibility with webOS 1.1. ====&lt;br /&gt;
&lt;br /&gt;
* [[Adding Timestamps to All Received Messages]]&lt;br /&gt;
* [[Browser_Plugins|Browser Plugins]]&lt;br /&gt;
* [[Camera Mod Alternate Sound Disable]]&lt;br /&gt;
* [[Change_Enter_To_Create_Newline_Instead_of_Send_Message|Change Enter to Create Newline Instead of Send Message]]&lt;br /&gt;
* [[Change_the_default_notification.wav_Sound|Change the Default notification.wav Sound]]&lt;br /&gt;
* [[Changes_Alert/Notification_Sounds|Changes Alert/Notification Sounds]]&lt;br /&gt;
* [[Hourly Chime|Hourly Chime]] &lt;br /&gt;
* [[Ignore 'A', 'An', and 'The' In Artist and Album names|Ignore 'A', 'An', and 'The' In Artist and Album names]] &lt;br /&gt;
* [[Installing Homebrew Apps With A Rooted Pre|Installing Homebrew Apps With A Linux Accessed Pre]]  &lt;br /&gt;
* [[Messaging Mod Force Offline Send Without Dialog]]&lt;br /&gt;
* [[Modifying Stock Applications|Modifying Stock Applications]] &lt;br /&gt;
* [[My notification|My notification]] &lt;br /&gt;
* [[Myavatar In Messaging App|Myavatar In Messaging App]] &lt;br /&gt;
* [[Packaging Homebrew Apps for Stock Pre without Rooting|Packaging Homebrew Apps for Stock Pre without Accessing Linux]] &lt;br /&gt;
* [[Photos Slideshow|Photos Slideshow]] &lt;br /&gt;
* [[Screenlock On When Connected|Stay On While Connected]]&lt;br /&gt;
* [[Show allday events in calendar month view]] &lt;br /&gt;
* [[Show Call Duration in the Call Log]] &lt;br /&gt;
* [[Patch Sudoku Disable Zooming|Sudoku: Disable Zooming]]&lt;br /&gt;
* [[Turning Off Dialpad Noise]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Phwelo</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Random_Wallpaper_Switching&amp;diff=3278</id>
		<title>Patch webOS Random Wallpaper Switching</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Random_Wallpaper_Switching&amp;diff=3278"/>
		<updated>2009-07-31T15:34:23Z</updated>

		<summary type="html">&lt;p&gt;Phwelo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Homebrew App for Random Wallpaper Switching===&lt;br /&gt;
&lt;br /&gt;
There is now a homebrew application (no rooting required) that allows this same function without performing the patch below.  It can be found at http://forums.precentral.net/homebrew-apps/195990-switcharoo-random-wallpaper-switching-v0-9-0-7-30-a.html&lt;br /&gt;
&lt;br /&gt;
=== Goal===&lt;br /&gt;
&lt;br /&gt;
On my desktop I have installed desktop drapes and my wallpaper switches every few hours to a random image in a wallpapers folder.  I wanted to have the same functionality on my pre.&lt;br /&gt;
&lt;br /&gt;
=== Requirements===&lt;br /&gt;
&lt;br /&gt;
* [[Portal:Accessing_Linux | Access to Linux]] on your Pre.&lt;br /&gt;
* [[Next_steps | Installed backdoor with sudo]]&lt;br /&gt;
* The PATH variable should be set up in your .profile in your backdoor account, for example mine is set as follows: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin/:/usr/local/bin:/opt/bin:/opt/sbin&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Procedure===&lt;br /&gt;
&lt;br /&gt;
Note: I prefer doing everything with sudo and not logging in as root via the backdoor.  I would recommend getting into the same habit.&lt;br /&gt;
&lt;br /&gt;
==== Transfering Wallpapers====&lt;br /&gt;
&lt;br /&gt;
* Connect your Pre to your computer as a USB drive.&lt;br /&gt;
* Create a folder named 'wallpapers' on the Pre (if its not already there).&lt;br /&gt;
* Put all your wallpapers there.&lt;br /&gt;
* Disconnect the Pre from your PC.  You might want to make sure to disconnect it safely so everything writes to storage okay.&lt;br /&gt;
&lt;br /&gt;
Make sure to remove any wallpapers which you don't want to show up, though, since the switcher will pick a random one.&lt;br /&gt;
&lt;br /&gt;
==== Enable Write Access====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo mount -o remount,rw /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling Cron====&lt;br /&gt;
&lt;br /&gt;
Go [[Crond | here ]] to enable crond.&lt;br /&gt;
&lt;br /&gt;
==== The Wallpaper Switcher Script====&lt;br /&gt;
&lt;br /&gt;
First lets make a place for the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo mkdir /opt/share/wallswitcher&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit wallswitcher.sh inside /opt/share/wallswitcher directory and place the following code there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
  DIR='/media/internal/wallpapers/'&lt;br /&gt;
  IFS=&amp;quot;&lt;br /&gt;
&amp;quot;&lt;br /&gt;
  NUM_FILES=0&lt;br /&gt;
  for cur in `ls -1 $DIR`; do&lt;br /&gt;
    if [ -f &amp;quot;$DIR$cur&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
      NUM_FILES=$((NUM_FILES+1))&lt;br /&gt;
      eval &amp;quot;FILE_$NUM_FILES=$cur&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  RANDOM_NUMBER=`awk &amp;quot;BEGIN{srand();print int($NUM_FILES * rand()) + 1;}&amp;quot;`&lt;br /&gt;
  eval &amp;quot;RANDOM_FILE=\$FILE_$((RANDOM_NUMBER))&amp;quot;&lt;br /&gt;
  IMPORT_STRING=&amp;quot;{ \&amp;quot;target\&amp;quot;: \&amp;quot;$DIR$RANDOM_FILE\&amp;quot; }&amp;quot;&lt;br /&gt;
  SET_STRING=&amp;quot;{ \&amp;quot;wallpaper\&amp;quot;: { \&amp;quot;wallpaperName\&amp;quot;: \&amp;quot;$RANDOM_FILE\&amp;quot;, \&amp;quot;wallpaperFile\&amp;quot;: \&amp;quot;$DIR$RANDOM_FILE\&amp;quot; } }&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;Found $NUM_FILES in $DIR&amp;quot;&lt;br /&gt;
  echo &amp;quot;Using random file: $RANDOM_FILE&amp;quot;&lt;br /&gt;
  echo &amp;quot;JSON Import String: $IMPORT_STRING&amp;quot;&lt;br /&gt;
  echo &amp;quot;JSON Set String: $SET_STRING&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  eval &amp;quot;luna-send -n 1 palm://com.palm.systemservice/wallpaper/importWallpaper '$IMPORT_STRING'&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  eval &amp;quot;luna-send -n 1 palm://com.palm.systemservice/setPreferences '$SET_STRING'&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
main&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and make sure it has execute permissions. The following command will insure that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo chmod 755 /opt/share/wallswitcher/wallswitcher.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some notes on the script:&lt;br /&gt;
* I am a Java/Groovy developer mostly and am not as good at shell scripting as I would like.  Any improvements on the script itself are welcome&lt;br /&gt;
* The main piece of code that performs the switch are the two luna-send commands. T he first command is required if a wallpaper has never been used before and will generate some thumbnails and copy the main image into /media/internal/.wallpapers.  The second luna-send command actually performs the switch.&lt;br /&gt;
* This method currently only supports wallpapers sized to exactly 320 x 480 px.  The import luna-send call can take more parameters in its JSON string, such as scaling and x/y offsets from center.  I have not used these yet since all my wallpapers are correctly sized.&lt;br /&gt;
* Again, being a not-so-good shell developer, the way I obtain random numbers and use them is a bit wrong.  Awk is used to get a random number.  Instead of arrays (as in bash), dynamic variable naming is used.&lt;br /&gt;
* The DIR variable controls where the script looks for wallpapers—you can change it to where your pictures are instead.  Currently the scan is not recursive.&lt;br /&gt;
&lt;br /&gt;
==== Testing the Script====&lt;br /&gt;
&lt;br /&gt;
If you have more then one wallpaper in /media/internal/wallpapers, you can test the switcher with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo /opt/share/wallswitcher/wallswitcher.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Found 24 in /media/internal/wallpapers/&lt;br /&gt;
Using random file: wall_409.jpg&lt;br /&gt;
JSON Import String: { &amp;quot;target&amp;quot;: &amp;quot;/media/internal/wallpapers/wall_409.jpg&amp;quot; }&lt;br /&gt;
JSON Set String: { &amp;quot;wallpaper&amp;quot;: { &amp;quot;wallpaperName&amp;quot;: &amp;quot;wall_409.jpg&amp;quot;, &amp;quot;wallpaperFile&amp;quot;: &amp;quot;/media/internal/wallpapers/wall_409.jpg&amp;quot; } }&lt;br /&gt;
** Message: serviceResponse Handling: 2, { &amp;quot;returnValue&amp;quot;: true, &amp;quot;wallpaper&amp;quot;: { &amp;quot;wallpaperName&amp;quot;: &amp;quot;wall_409.jpg&amp;quot;, &amp;quot;wallpaperFile&amp;quot;: &amp;quot;\/media\/internal\/.wallpapers\/wall_409.jpg&amp;quot;, &amp;quot;wallpaperThumbFile&amp;quot;: &amp;quot;\/media\/internal\/.wallpapers\/thumbs\/wall_409.jpg&amp;quot; } }&lt;br /&gt;
** Message: serviceResponse Handling: 2, { &amp;quot;returnValue&amp;quot;: true }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the two service calls are not returning correctly, something is wrong. Contact me (fxdemolisher[at]gmail[dawt]com) if you are stuck debugging it.&lt;br /&gt;
&lt;br /&gt;
==== Schedule the Script====&lt;br /&gt;
&lt;br /&gt;
This step is pretty easy. Since you have an empty root crontab set up all that needs to be done is a scheduling command.  Edit /etc/cron/crontabs/root and place the following scheduling test line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;*/1 * * * * /opt/share/wallswitcher/wallswitcher.sh &amp;gt; /opt/share/wallswitcher/wallswitcher.log 2&amp;gt;&amp;amp;1&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will execute the switcher every minute and log to the /opt/share/wallswitcher/wallswitcher.log log.  After you have it switching correctly every minute you can edit the cron definition to run as often as you like.  Mine is set to run at the top of the hour using this line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;0 * * * * /opt/share/wallswitcher/wallswitcher.sh &amp;gt; /opt/share/wallswitcher/wallswitcher.log 2&amp;gt;&amp;amp;1&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: Do not use crontab -e as this does not really write to /etc/cron/crontabs/root and will be overriden when the device restarts.&lt;br /&gt;
&lt;br /&gt;
==== Restore Read-Only Filesystem====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo mount -o remount,ro /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tested and verified as written by optik678.&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements===&lt;br /&gt;
&lt;br /&gt;
I would like to thank this site and the wonderful hackers on it. I would not be able to do this without various examples from other pages.&lt;/div&gt;</summary>
		<author><name>Phwelo</name></author>
	</entry>
</feed>