How do I increase the font size of menus, tabs, and other user interface elements in Firefox 52?

Solution 1:

The suggestion to let layout.css.devPixelsPerPx control UI font sizes on Linux was rejected.

That same bugzilla page recommends to control the UI font sizes with the GDK_DPI_SCALE and GDK_SCALE environment variables.

For example, if you're starting Firefox via a launcher shortcut, you can change its command from firefox %u to env GDK_DPI_SCALE=1.25 firefox %u

Solution 2:

While trying to solve this problem I learned about userChrome.css. It is a configuration file allowing users to change properties of the Firefox UI, using the cascading style sheets language. It works on Firefox 52.

The file does not exist by default; I created it and added the following text:

$ cat ~/.mozilla/firefox/*.Default\ User/chrome/userChrome.css        
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

* {
font-size: 16pt !important
}

Don't forget the semicolon after the @namespace line.

Amazingly, there is a whole website, userchrome.org, dedicated to things you can put in this file. However, the above simple snippet was all I needed. I didn't get it from userchrome.org but from a post on mozillazine.org. On my system the font-size trick is also to be found in a file userChrome-example.css in the same chrome/ directory.

Now I can read the menubar text and tab names and so on, with my screen at full resolution.