Gaia/Hacking: Difference between revisions

(Added section on httpd.js logs)
Line 293: Line 293:
=== Launching an App Directly ===
=== Launching an App Directly ===


Want B2G desktop to directly launch your? You want these preference lines to your profile/user.js fileBecause this file gets regenerated when you run "make profile", it is best to add these to custom-prefs.js (in the root of the gaia dir) if you want the preferences to be sticky:
A "--runapp" option has been added to the b2g-desktop command-line. It takes an argument that it normalizes by lower-casing and removing dashes and spaces, and then checks the argument against the similarly normalized app names from app manifestsFor example, the name of the e-mail app is currently "E-Mail", but "--runapp email" will run it.  Partial matching is not supported right now, but you can enhance b2g/chrome/content/runapp.js if your app name is unwieldy.


  user_pref("browser.homescreenURL","http://myapp.gaiamobile.org:8080");
If you invoke "--runapp" without an argument (or an empty argument), the command will print out a list of all the apps it knows about as well as a brief usage message.
  user_pref("browser.startup.homepage", "http://myapp.gaiamobile.org:8080");


You will need to remove the preferences if you want to be able to use the homescreen again.
In summary:
 
  ./b2g --runapp email
 
runs the e-mail app.


=== Touch events ===
=== Touch events ===
Confirmed users
360

edits