The userChrome.css in the user's profile will be overwritten when the
package is upgraded.
Any change should therefore be made to the file located under /etc,
which should then be left untouched by most package managers.
Firefox can run an autoconfig Javascript on startup, which can be used to
install and update userChrome.css, both when creating a new profile and
using a pre-existing one.
This removes the need for a wrapper script and related complications
(changes to $PATH, different processing for new and pre-existing
profiles...)
Co-Authored-By: Oliver Smith <ollieparanoid@postmarketos.org>
In some cases, such as the ESR package on Debian, Firefox can be
installed to a different directory.
This commit alters the Makefile so it's possible to specify the Firefox
directory from the command-line.
The reason for disabling these was, to free up space in the menu. The
menu entry is hidden in userChrome.css now, so we can enable it again.
Having this enabled is required to use the Firefox remote debugger,
which is very useful for developing userChrome.css.
Always start with --profile if there is no profiles.ini. Otherwise,
firefox will create and use the profile for the first start only, but
not set it as default. It would create a new profile on the second start
then.
Instead of trying to override the .desktop entry of Firefox by
installing the custom one and adjusting XDG_DATA_DIRS, just wrap the
firefox binary directly and adjust PATH. The former did not work with
Phosh, and on second thought, wrapping the binary is what's really
necessary. The launcher would have been just another useless layer.