MicroB tweaks

(1:1 import from itt wiki)
(wikify slightly)
 
(10 intermediate revisions not shown)
Line 1: Line 1:
-
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.
+
(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 [[:wikipedia:Mozilla|Mozilla]] based browser, has the same settings as Firefox. These settings are stored in the file <code>/home/user/.mozilla/microb/prefs.js</code>. Only a few of these settings can be changed from the MicroB menus. To change the others open the URL <code>about:config</code> in MicroB to edit them one-by-one, or edit <code>prefs.js</code>. It is better not to edit <code>prefs.js</code> directly but to touch <code>user.js</code> instead. All configuration of <code>user.js</code> will be added to <code>prefs.js</code> during start-up!
== Settings ==
== 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.
+
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.:
+
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
  network.cookie.lifetimePolicy 2
Line 44: Line 50:
To edit it on the tablet itself:
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.
+
<ol>
-
* to save the file click ctrl, x, y, return.
+
<li>
-
sudo gainroot
+
if you don't have [[root access]] already install 'rootsh' through the application manager
-
invoke-rc.d tablet-browser-daemon start
+
</li>
-
exit
+
<li>
 +
if you don't have 'nano' installed get it with application manager
 +
</li>
 +
<li>
 +
close all MicroB windows
 +
</li>
 +
<li>
 +
open xterm
 +
<pre>
 +
sudo gainroot
 +
invoke-rc.d tablet-browser-daemon stop
 +
exit
 +
cd .mozilla/microb
 +
cp prefs.js prefs.js.backup
 +
nano prefs.js
 +
</pre>
 +
</li>
 +
<li>
 +
scroll to the line you want to change/add and type the changes. Be careful to use the exact format:<pre>user_pref("nameofthesetting", thevalue);</pre>If you leave out one '<code>;</code>' , '<code>(</code>' etc. then the settings in the file will be ignored by MicroB. If a setting does not exist then add it yourself.
 +
</li>
 +
<li>
 +
to save the file click ctrl, x, y, return.
 +
<pre>
 +
sudo gainroot
 +
invoke-rc.d tablet-browser-daemon start
 +
exit
 +
</pre>
 +
</li>
 +
</ol>
   
   
-
If you decide to edit prefs.js on your own computer be sure to:
+
If you decide to edit <code>prefs.js</code> 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.
+
* run as root:<pre>invoke-rc.d tablet-browser-daemon stop</pre> before editing and <pre>invoke-rc.d tablet-browser-daemon start</pre> after editing.
-
* use an editor that uses linux style line endings
+
* use an editor that uses Unix-style line endings
* restore the right permissions and ownership of the file when you put it back
* 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.
 +
 +
[[http://mxr.maemo.org/garage/source/browser/mozilla/trunk/microb-eal/include/common.h#70 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==
== 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.
+
If you mess up <code>prefs.js</code> or just want the defaults back then either restore the backup file you just made, or delete <code>prefs.js</code> file so MicroB will regenerate it with default settings.
to restore the backup:  
to restore the backup:  
-
* close all Microb windows
+
close all MicroB windows, and run:
-
sudo gainroot
+
<pre>
-
invoke-rc.d tablet-browser-daemon stop  
+
sudo gainroot
-
exit
+
invoke-rc.d tablet-browser-daemon stop  
-
cd .mozilla/microb
+
exit
-
cp prefs.js.backup prefs.js
+
cd .mozilla/microb
-
sudo gainroot
+
cp prefs.js.backup prefs.js
-
invoke-rc.d tablet-browser-daemon start
+
sudo gainroot
-
exit
+
invoke-rc.d tablet-browser-daemon start
 +
exit
 +
</pre>
 +
 
 +
...or to delete <code>prefs.js</code>:
 +
 
 +
close all MicroB windows,a dn run:
 +
<pre>
 +
sudo gainroot
 +
invoke-rc.d tablet-browser-daemon stop
 +
rm /mozilla/microb/prefs.js
 +
invoke-rc.d tablet-browser-daemon start
 +
exit
 +
</pre>
 +
 
 +
== Also see ==
-
...or to delete prefs.js:
+
* [[Ad_blocking]]
 +
* [http://www.internettablettalk.com/forums/showthread.php?t=24405 Selectively disable JavaScript in MicroB]
 +
* [http://browser-extras.garage.maemo.org Browser-Extras, for MicroB extensions]
-
* close all Microb windows
+
[[Category:Web]]
-
sudo gainroot
+
[[Category:Power users]]
-
invoke-rc.d tablet-browser-daemon stop
+
-
rm /mozilla/microb/prefs.js
+
-
invoke-rc.d tablet-browser-daemon start
+
-
exit
+

Latest revision as of 09:45, 14 February 2011

(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. It is better not to edit prefs.js directly but to touch user.js instead. All configuration of user.js will be added to prefs.js during start-up!

Contents

[edit] 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.

[edit] Editing prefs.js

To edit it on the tablet itself:

  1. if you don't have root access already install 'rootsh' through the application manager
  2. if you don't have 'nano' installed get it with application manager
  3. close all MicroB windows
  4. open xterm
    sudo gainroot
    invoke-rc.d tablet-browser-daemon stop 
    exit
    cd .mozilla/microb
    cp prefs.js prefs.js.backup
    nano prefs.js
    
  5. 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.
  6. 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 Unix-style line endings
  • restore the right permissions and ownership of the file when you put it back

[edit] 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.

[edit] 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, and run:

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,a dn run:

sudo gainroot
invoke-rc.d tablet-browser-daemon stop 
rm /mozilla/microb/prefs.js
invoke-rc.d tablet-browser-daemon start
exit

[edit] Also see