Firefox transparent glitch headless

This is a weird mix of conditions, so let me start with the overview. You are logged in remotely and most everything works fine, except Firefox. Extra details are that I changed the input on my LCD last night, so technically it’s a headless display since my Windows 10 PC does not see an active display hooked up.

Extra rub with that, is my normal display is running DisplayPort. When I switch inputs to HDMI to play Switch games, my open program windows resize to native resolution for Windows 10 (1024×768 iirc). Back to the issue at hand, over a remote session firefox does not load.

Stepping back, I figure this is related to the GPU hardware support, but its failing since there is no active display. I would turn that off in the program, but well, it doesn’t load beyond a transparent window. How else is there to change the program configuration? prefs.js has the option flags we want to change for disabling hardware rendering.

You can use the system variable to get into you AppData folder by typing %appdata% in a cmd prompt or into the file path of an explorer window. Once in your user AppData roaming folder, you should see Mozilla\Firefox\Profiles\{random}.default.
In that folder, open prefs.js with a text editor.

Keying off this guide, I was able to add the below 2 lines to my prefs.js (making sure Firefox is not running while doing so)

user_pref(“layers.acceleration.disabled”, true);
user_pref(“gfx.direct2d.disabled”, true);

After saving the file then loading firefox, I was able to get a working browser without an active display. Weird glitch to keep in mind if you are running a headless Windows 10 install. Be in intentional or on accident.