Enable webgl in firefox on ubuntu
Software based renderer
Webgl might not work directly on your system if there is no supporting hardware or graphics card available. Even then webgl can be made available inside firefox through the mesa software based renderer. To enable it following steps below
Install the Mesa off-screen rendering extension
$ sudo apt-get install libosmesa6
Next find out the location of the library installed by the package. On my system it was located at the following location for example
The actual location on your system can be different.
Now open firefox and do the following
1. Go to about:config 2. Search for webgl.osmesalib 3. Type in the path of the mesa library in the value of this preference. 4. Restart firefox
Now open the following url
It would say "Your browser supports WebGL" and play a spinning cube animation.
Cssdeck also has a webgl item here
For technical information about webgl support in firefox check
It should say Yay and display additional information about the webgl support.
If they all work fine, then webgl is enabled properly.