MicroB tweaks

(Maemo 4 only. Maemo 5 status not clear at this time of writing.)

MicroB is the default browser in Maemo 4. While there are alternative browsers for Maemo 4 such as Tear and Firefox mobile some users prefer MicroB.

It is possible to tweak the performance and behaviour of MicroB. Please continue to read for some suggestions.

MicroB, being a Mozilla based browser, has the same settings as Firefox. These settings are stored in the file /home/user/.mozilla/microb/prefs.js. Only a few of these settings can be changed from the MicroB menus. To change the others open the url about:config in MicroB to edit them one-by-one, or edit prefs.js.

Contents

Settings

Even though many of the settings only make sense on a notebook or desktop pc, there are some that can be useful for the Internet Tablets.

Removes cookies when closing MicroB (allow only for session). This only applies to new cookies. To also delete earlier cookies go to Tools -> clear ->cookies in MicroB:

network.cookie.lifetimePolicy 2

Activates smooth scrolling. This is useful when the d-pad is configured for scrolling:

general.smoothScroll true

Lets you select the contents of the urlbar with one click, instead of the default triple click:

browser.urlbar.clickSelectsAll true

Sets minimum and default font size in points, in this case 20 points. Depending on the language you use also set font.min-size.fixed.ja (japanese) etc.:

font.min-size.fixed.x-western 20
font.min-size.fixed.x-unicode 20
font.min-size.variable.x-western 20
font.min-size.variable.x-unicode 20
font.size.variable.x-western 20
font.size.fixed.x-unicode 20

Speed tweaks specific for the Internet Tablets:

browser.cache.memory.capacity 8192
browser.sessionhistory.max_entries 4
content.notify.interval 1250000
content.notify.ontimer true
network.http.max-connections 4
network.http.max-connections-per-server 4
network.http.max-persistent-connections-per-server 1
network.http.pipelining.maxrequests 1000
network.http.pipelining true
nglayout.initialpaint.delay 2000

For an explanation of these and other settings in about:config see this article.

Editing prefs.js

To edit it on the tablet itself:

  • if you don't have root access already install 'rootsh' through the application manager
  • if you don't have 'nano' installed get it with application manager
  • close all MicroB windows
  • open xterm
sudo gainroot
invoke-rc.d tablet-browser-daemon stop 
exit
cd .mozilla/microb
cp prefs.js prefs.js.backup
nano prefs.js
  • scroll to the line you want to change/add and type the changes. Be careful to use the exact format user_pref("nameofthesetting", thevalue); . If you leave out one ';' , '(' etc. then the settings in the file will be ignored by MicroB. If a setting does not exist then add it yourself.
  • to save the file click ctrl, x, y, return.
sudo gainroot
invoke-rc.d tablet-browser-daemon start
exit

If you decide to edit prefs.js on your own computer be sure to:

  • run as root "invoke-rc.d tablet-browser-daemon stop" before editing and "invoke-rc.d tablet-browser-daemon start" after editing.
  • use an editor that uses linux style line endings
  • restore the right permissions and ownership of the file when you put it back

Settings that will not stick

Some settings get reset when MicroB starts. This is unfortunate, but you'll have to live with it.

[list of interesting strings]

Replaced:

* snav.keyCode.modifier
* general.useragent.locale
* general.useragent.vendor

Randomly replaced with the value from plugins.flashhack:

* ftv.enabled
* snav.ignoreTextFields
* snav.disableJS
* layout.full.zoom.mode.fast
* plugin.default_plugin_disable
* security.warn_entering_secure
* security.warn_leaving_secure
* security.warn_submit_insecure

For any such setting, you can use bookmarks to

about:config?prefname={name}&prefvalue={value}&sprefname=donotomit

... and just tap on them or if you only have one you can make it your home page.

How to restore the default settings

If you mess up prefs.js or just want the defaults back then either restore the backup file you just made, or delete prefs.js file so MicroB will regenerate it with default settings.

to restore the backup:

  • close all MicroB windows
sudo gainroot
invoke-rc.d tablet-browser-daemon stop 
exit
cd .mozilla/microb
cp prefs.js.backup prefs.js
sudo gainroot
invoke-rc.d tablet-browser-daemon start
exit

...or to delete prefs.js:

  • close all MicroB windows
sudo gainroot
invoke-rc.d tablet-browser-daemon stop 
rm /mozilla/microb/prefs.js
invoke-rc.d tablet-browser-daemon start
exit

Also see