How to enable Webgl in Firefox on Ubuntu

By | July 30, 2020


WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 3D graphics and 2D graphics[2] within any compatible web browser without the use of plug-ins. 

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

Test it

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.

About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].


How to enable Webgl in Firefox on Ubuntu
  1. ed

    installed as proposed (thinkpad t430s, firefox 88.0, linux mint cinnamon 20.1, webGL not working). search for goes on forever without result. what is found is this:

    in about:config webgl.osmesalib cannot be found. the site loads forever and stays empty. sorry, but this method does not work here to help me getting webGL work on my notebook.

Leave a Reply

Your email address will not be published. Required fields are marked *