source: xsoft/graphweb/firefox.xml@ 8ee7423

lazarus trunk
Last change on this file since 8ee7423 was 8ee7423, checked in by Ken Moffat <zarniwhoop@…>, 3 months ago

Update to firefox-115.9.0esr.

  • Property mode set to 100644
File size: 25.1 KB
RevLine 
[ab4fdfc]1<?xml version="1.0" encoding="UTF-8"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[f939f05]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[2eae5bc]7 <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;esr/source/firefox-&firefox-version;esr.source.tar.xz">
[8dfc5c3]8 <!ENTITY firefox-download-ftp " ">
[8ee7423]9 <!ENTITY firefox-md5sum "14038d7d382e5c5cbbbb156c4710b24c">
10 <!ENTITY firefox-size "484 MB">
[86249d22]11
[5c2b024]12 <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
[9da4cc6f]13 But the extra cached cargo files, if any, seem to be minimal -->
[0ad86636]14 <!ENTITY firefox-buildsize "6.1 GB (199 MB installed) without tests">
[9a469bc]15 <!-- editors: with ff63 and rust-1.29, ./mach build -j4 is probably the
[fe5f563d]16 most practical way to get a timing on a machine with more cores, if taking
17 cores offline is not practical. If in doubt, round up -->
[20b6996]18 <!ENTITY firefox-time "12 SBU using -j8, without tests">
[f939f05]19]>
20
[ffe47ca2]21<sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
[b81991e1]22 <?dbhtml filename="firefox.html" ?>
23
24
[689207c]25<!-- indicate this is the ESR variant,
[b6cb36ff]26 The point is that the stable release differs slightly.
[b0540bce]27 <title>Firefox-&firefox-version;</title>-->
28 <title>Firefox-&firefox-version;esr</title>
[b81991e1]29
30 <indexterm zone="firefox">
31 <primary sortas="a-Firefox">Firefox</primary>
32 </indexterm>
33
34 <sect2 role="package">
35 <title>Introduction to Firefox</title>
36
[c1ae13c]37 <para>
38 <application>Firefox</application> is a stand-alone browser based on the
39 <application>Mozilla</application> codebase.
40 </para>
[b81991e1]41
[6354d17]42 &lfs121_checked;
[76ae9a2]43
[b81991e1]44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
[c1ae13c]47 <para>
48 Download (HTTP): <ulink url="&firefox-download-http;"/>
49 </para>
[b81991e1]50 </listitem>
51 <listitem>
[c1ae13c]52 <para>
53 Download (FTP): <ulink url="&firefox-download-ftp;"/>
54 </para>
[b81991e1]55 </listitem>
56 <listitem>
[c1ae13c]57 <para>
58 Download MD5 sum: &firefox-md5sum;
59 </para>
[b81991e1]60 </listitem>
61 <listitem>
[c1ae13c]62 <para>
63 Download size: &firefox-size;
64 </para>
[b81991e1]65 </listitem>
66 <listitem>
[c1ae13c]67 <para>
68 Estimated disk space required: &firefox-buildsize;
69 </para>
[b81991e1]70 </listitem>
71 <listitem>
[c1ae13c]72 <para>
73 Estimated build time: &firefox-time;
74 </para>
[b81991e1]75 </listitem>
76 </itemizedlist>
77
[9403c3e]78<!--<bridgehead renderas="sect3">Additional Downloads</bridgehead>
[bf5fb94]79 <itemizedlist spacing="compact">
[8dacd5e]80 <listitem>
81 <para>
82 Required patch:
[9d98701]83 <ulink url="&patch-root;/firefox-&firefox-version;-consolidated-1.patch"/>
[8dacd5e]84 </para>
85 </listitem>
[bca9385]86 <listitem>
87 <para>
88 Required patch for new <xref linkend="ffmpeg"/> API:
[51e9d68c]89 <ulink url="&patch-root;/firefox-&firefox-version;-ffmpeg_6-1.patch"/>
[bca9385]90 </para>
91 </listitem>
[9403c3e]92 </itemizedlist>-->
[bf5fb94]93
[f06c692]94 <note>
[2eae5bc]95 <para>
96 The directory name is firefox-&firefox-version;
97 </para>
98
[f06c692]99 <para>
[8d0bc761]100 Extracting the tarball
101 will reset the permissions of the current directory to 0755 if you
[765c2a7]102 have permission to do that. If you do this in a directory where
[37bf7b1]103 the sticky bit is set, such
[dc9a18a]104 as <filename class="directory">/tmp</filename> it will end with error
105 messages:
106 </para>
107
108<literallayout>tar: .: Cannot utime: Operation not permitted
109tar: .: Cannot change mode to rwxr-xr-t: Operation not permitted
110tar: Exiting with failure status due to previous errors
111</literallayout>
112
113 <para>
114 This does finish with non-zero status, but it does
115 <emphasis>NOT</emphasis> mean there is a real problem.
116 Do not untar as the <systemitem class="username">root</systemitem> user
117 in a directory where the sticky bit is set - that will unset it.
[f06c692]118 </para>
[8d0bc761]119
120 <para>
[406e5ffe]121 As with other large packages which use C++ (or rust), the SBU times
[d5d7cd6]122 to build this vary more widely than you might expect. The build times
123 will increase significantly if your machine has to swap.
[8d0bc761]124 </para>
125
126 <para>
127 Although upstream prefer to use <application>PulseAudio</application>,
128 for the moment <application>Alsa</application> can still be used. Both
129 may need runtime configuration to get sound working.
130 </para>
[f06c692]131 </note>
132
[b81991e1]133 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
134
135 <bridgehead renderas="sect4">Required</bridgehead>
[c1ae13c]136 <para role="required">
[44cd41e]137 <xref linkend="cbindgen"/>,
[703f0ce]138 <xref linkend="dbus-glib"/>,
[6292849]139 <xref linkend="gtk3"/>,
[326f830]140 <xref linkend="libnotify"/>,
[f572dbb]141 <xref linkend="llvm"/> (with clang, used for bindgen even if using gcc),
[fe5f563d]142 <xref linkend="nodejs"/>,
[be0bd12]143 <xref linkend="pulseaudio"/>
[81b3e7fd]144 (or
[9da4cc6f]145 <xref linkend="alsa-lib"/> if you edit the mozconfig;
[326f830]146 now deprecated by mozilla), in either case please read the
147 Configuration Information,
[105d06c]148 <xref linkend="python311"/> (built after installing <xref linkend="sqlite"/>),
[da314782]149 <!--<xref linkend="six"/>,-->
[7877690]150 <xref linkend="startup-notification"/>, and
151 <xref linkend="unzip"/>
[c1ae13c]152 </para>
153
[1555d3d]154 <bridgehead renderas="sect4">Recommended</bridgehead>
[c1ae13c]155 <para role="recommended">
[b84fe71]156 <xref linkend="icu"/>,
[0e37869]157 <xref linkend="libevent"/>,
[569d3364]158 <xref linkend="libvpx"/>,
[e399c12]159 <xref linkend="libwebp"/>,
[f7fe3e6]160 <xref linkend="nasm"/>, and
[569d3364]161 <xref linkend="nss"/>
[c1ae13c]162 </para>
[1555d3d]163
[0e37869]164 <note>
165 <para>
[b9f61df]166 If you don't install recommended dependencies, then internal copies of
167 those packages will be used. They might be tested to work, but they can
168 be out of date or contain security holes.
[0e37869]169 </para>
170 </note>
[8d0bc761]171
[b81991e1]172 <bridgehead renderas="sect4">Optional</bridgehead>
[c1ae13c]173 <para role="optional">
[6c64623f]174 <xref linkend="curl"/>,
[c1ae13c]175 <xref linkend="doxygen"/>,
[babf0a0]176 <xref role="runtime" linkend="ffmpeg"/> (runtime, to play mov, mp3 or mp4 files),
[fe30eab]177 <xref linkend="liboauth"/>,
[0bb7c72]178 <xref role="runtime" linkend="pciutils"/> (runtime),
[566fcae]179 <xref linkend="valgrind"/>,
[6000a3e]180 <xref linkend="wget"/>,
[73b06df]181 <xref linkend="wireless_tools"/>,
[7877690]182 <xref linkend="yasm"/>,
[d5d7cd6]183 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>
[c1ae13c]184 </para>
185
186 <para condition="html" role="usernotes">
[42ddc30]187 Editor Notes: <ulink url="&blfs-wiki;/firefox"/>
[c1ae13c]188 </para>
[b81991e1]189 </sect2>
190
191 <sect2 role="installation">
192 <title>Installation of Firefox</title>
193
[f72a04a]194 <para>
[b9f61df]195 The configuration of <application>Firefox</application> is accomplished
196 by creating a <filename>mozconfig</filename> file containing the desired
197 configuration options. A default <filename>mozconfig</filename> is
198 created below. To see the entire list of available configuration options
[888e303]199 (and an abbreviated description of some of them), issue <command>./mach
[7f1e70b]200 configure -- --help | less</command>. You may also
[888e303]201 wish to review the entire file and uncomment any other desired options.
202 Create the file by issuing the following command:
[c1ae13c]203 </para>
[5a13c45]204
[0e37869]205<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
[dcb0fe6]206<literal># If you have a multicore machine, all cores will be used by default.
207
[703f0ce]208# If you have installed (or will install) wireless-tools, and you wish
209# to use geolocation web services, comment out this line
[6d1bf0e]210ac_add_options --disable-necko-wifi
211
[ad5a97d]212# API Keys for geolocation APIs - necko-wifi (above) is required for MLS
213# Uncomment the following line if you wish to use Mozilla Location Service
214#ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key
215
[5f729f8]216# Uncomment the following line if you wish to use Google's geolocation API
[ad5a97d]217# (needed for use with saved maps with Google Maps)
[9116137c]218#ac_add_options --with-google-location-service-api-keyfile=$PWD/google-key
[ad5a97d]219
[d5d7cd6]220# startup-notification is required since firefox-78
[495ebe07]221
[87fa171]222# Uncomment the following option if you have not installed PulseAudio and
[a72c6662]223# want to use alsa instead
[87fa171]224#ac_add_options --enable-audio-backends=alsa
[89cdb63d]225
[0e37869]226# Comment out following options if you have not installed
227# recommended dependencies:
[569d3364]228ac_add_options --with-system-icu
[0e37869]229ac_add_options --with-system-libevent
[569d3364]230ac_add_options --with-system-libvpx
[0e37869]231ac_add_options --with-system-nspr
232ac_add_options --with-system-nss
[569d3364]233ac_add_options --with-system-webp
[9a469bc]234
[02e19e03]235# Unlike with thunderbird, although using the gold linker can
236# save four megabytes in the installed file it does not make
237# the build faster.
[9a469bc]238
[a737350]239# The libdav1d library (av1 decoder) requires nasm. Uncomment this
240# if nasm has not been installed. Do not uncomment this if you have
[c528a3e]241# ffmpeg installed.
[e399c12]242#ac_add_options --disable-av1
[0a561d8]243
[a737350]244# You cannot distribute the binary if you do this.
[9a469bc]245ac_add_options --enable-official-branding
[0e37869]246
[14de4227]247# Stripping is now enabled by default.
248# Uncomment these lines if you need to run a debugger:
249#ac_add_options --disable-strip
250#ac_add_options --disable-install-strip
251
[e399c12]252# Disabling debug symbols makes the build much smaller and a little
[ec54fa5b]253# faster. Comment this if you need to run a debugger. Note: This is
254# required for compilation on i686.
[e399c12]255ac_add_options --disable-debug-symbols
[9bfa685]256<!-- With Firefox ESR 128 we'd replace the following part with
257"- -enable-elf-hack=relr", or remove it if relr becomes the default. -->
[c9677a35]258# The elf-hack is reported to cause failed installs (after successful builds)
259# on some machines. It is supposed to improve startup time and it shrinks
[a737350]260# libxul.so by a few MB. With recent Binutils releases the linker already
261# supports a much safer and generic way for this.
[c9677a35]262ac_add_options --disable-elf-hack
[a737350]263export LDFLAGS="$LDFLAGS -Wl,-z,pack-relative-relocs"
[c9677a35]264
[d5d7cd6]265# The BLFS editors recommend not changing anything below this line:
266ac_add_options --prefix=/usr
267ac_add_options --enable-application=browser
[5f5dcc2]268ac_add_options --disable-crashreporter
269ac_add_options --disable-updater
[a737350]270
271# Enabling the tests will use a lot more space and significantly
[57a8df2]272# increase the build time, for no obvious benefit.
[0e37869]273ac_add_options --disable-tests
274
[a737350]275# This enables SIMD optimization in the shipped encoding_rs crate.
276ac_add_options --enable-rust-simd
[0e37869]277
[41f2e90]278ac_add_options --enable-system-ffi
[0e37869]279ac_add_options --enable-system-pixman
280
[a0ace670]281ac_add_options --with-system-jpeg
282ac_add_options --with-system-png
283ac_add_options --with-system-zlib
[aed37975]284
[efe8cf09]285# Sandboxing works well on x86_64 but might cause issues on other
286# platforms. If not on x86_64, e.g. i686, it is recommended to
287# uncomment the following switch.
288#ac_add_options --disable-sandbox
289
[e51466a]290# Using sandboxed wasm libraries has been moved to all builds instead
291# of only mozilla automation builds. It requires extra llvm packages
292# and was reported to seriously slow the build. Disable it.
293ac_add_options --without-wasm-sandboxed-libraries
294
[1b0a207]295# The following option unsets Telemetry Reporting. With the Addons Fiasco,
296# Mozilla was found to be collecting user's data, including saved passwords and
297# web form data, without users consent. Mozilla was also found shipping updates
298# to systems without the user's knowledge or permission.
299# As a result of this, use the following command to permanently disable
300# telemetry reporting in Firefox.
301unset MOZ_TELEMETRY_REPORTING
302
[4def8b6]303mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
[0e37869]304EOF</userinput></screen>
[b9b7146]305
[b4079e2]306 <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1859752
307 https://hg.mozilla.org/try/rev/d5f3b0c4f08a -->
308 <para>
309 If building with system ICU, adapt the line break mapping for ICU
310 74 or later. This construct adds five entries to a c++ array.
311 </para>
312
313<screen><userinput>for i in {43..47}; do
314 sed -i '/ZWJ/s/}/,CLASS_CHARACTER&amp;/' intl/lwbrk/LineBreaker.cpp
315done</userinput></screen>
316
[c1ae13c]317 <para>
318 Compile <application>Firefox</application> by issuing the following
319 commands:
320 </para>
[9737271]321<!-- Not needed with clang. Upstream bug at
[e51466a]322 https://bugzilla.mozilla.org/show_bug.cgi?id=1729459
323
[d468e96]324 <para>
325 If building on a 32 bit machine, the following sed works around
[0a0e996]326 an issue with an incompatible <quote>double</quote> type in one
[d468e96]327 header file:
328 </para>
329
330<screen><userinput>case "$(uname -m)" in
331 i?86) sed -e '/typedef[ ]*double/s/double/long double/' \
332 -i modules/fdlibm/src/math_private.h ;;
333esac</userinput></screen>
[9737271]334-->
[ad5a97d]335 <para>
336 If the geolocation APIs are needed:
337 </para>
338
[e5c8de01]339 <note>
340 <para>
341 <!-- Taken from Arch Linux - an immensely helpful link - Thanks -->
342 The Google and Mozilla API Keys below are specific to LFS. If using
343 these instructions for another distro, or if you intend to distribute
344 binary copies of the software using these instructions, please obtain
345 your own keys following the instructions located at
[75b1a338]346 <ulink url="https://www.chromium.org/developers/how-tos/api-keys"/> and
[e5c8de01]347 <ulink url="https://location.services.mozilla.com/api"/> respectively.
348 <!-- BLFS Devs, register an account at Google with your
349 @linuxfromscratch.org email address, and I'll make you an administrator
350 for the 'Google APIs for LFS' project (where the API and OAuth keys
351 were created for use in the book).-->
352 </para>
353 </note>
354
[ad5a97d]355<screen><userinput>echo "AIzaSyDxKL42zsPjbke5O8_rPVpVrLrJ8aeE9rQ" > google-key
[5f18b7a8]356echo "613364a7-9418-4c86-bcee-57e32fd70c23" > mozilla-key</userinput></screen>
[ad5a97d]357
[5b0a978e]358 <note>
359 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
360 href="../../xincludes/mozshm.xml"/>
361 </note>
[686afa98]362
[9403c3e]363<!--<para>
[9d98701]364 Fix building Firefox with Clang 16 or C++ headers from GCC 13.
[fa47dacd]365 And, work around a build failure with Rustc-1.70.0:
[686afa98]366 </para>
367
[9d98701]368<screen><userinput remap="pre">patch -Np1 -i ../firefox-&firefox-version;-consolidated-1.patch</userinput></screen>
[bca9385]369
370 <para>
371 Apply the following patch so that firefox is able to play H.264 videos:
372 </para>
373
[9403c3e]374<screen><userinput remap="pre">patch -Np1 -i ../firefox-&firefox-version;-ffmpeg_6-1.patch</userinput></screen>-->
[686afa98]375
[f91b7bb]376 <!-- https://github.com/rust-lang/rust-bindgen/pull/2689 -->
377 <para>
378 Adapt the shipped <application>rust-bindgen</application> copy for
379 LLVM-18 and later, and tell <command>cargo</command> we've modified
380 the code of <application>rust-bindgen</application> so the checksum
381 verification of this crate should be skipped:
382 </para>
383
384 <screen><userinput>sed -e "/match cursor.kind()/a \
385 CXCursor_LinkageSpec => return Err(ParseError::Recurse)," \
386 -i third_party/rust/bindgen/ir/item.rs &amp;&amp;
387
388cat &gt;&gt; Cargo.toml &lt;&lt; EOF &amp;&amp;
389<literal>[patch.crates-io.bindgen_0_64_0]
390package = "bindgen"
391version = "0.64.0"
392path = "third_party/rust/bindgen"</literal>
393EOF
394
395sed -r '/name = "bindgen"/,+5 s/^source|^checksum/#&amp;/' \
396 -i Cargo.lock</userinput></screen>
397
398 <!-- https://hg.mozilla.org/mozilla-central/rev/ba6abbd36b49 -->
399 <para>
400 Adapt the WebRTC code to use 64-bit timestamp to fix a build
401 failure with Clang-18 and later:
402 </para>
403
404 <screen><userinput>sed 's/uint32_t timestamp/uint64_t timestamp/' \
405 -i dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp \
406 dom/media/gtest/TestGMPRemoveAndDelete.cpp \
407 dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp &amp;&amp;
408
409sed '/mInputImageMap/s/uint32_t/uint64_t/' \
410 -i dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h</userinput></screen>
411
[29b0395]412 <para>
[8d70628]413 Now invoke the Python <command>mach</command> script to compile the package.
[29b0395]414 </para>
[e8d45427]415
[97e8769]416<screen><userinput>export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none &amp;&amp;
[fce78fd]417export MOZBUILD_STATE_PATH=${PWD}/mozbuild &amp;&amp;
[5bd4e666]418export PYTHON311=/opt/python3.11/bin/python3.11 &amp;&amp;
[6dd695f7]419$PYTHON311 ./mach build</userinput></screen>
[3bdfc9fd]420
[0e37869]421 <para>
[57a8df2]422 The <filename>mozconfig</filename> above disables the tests because
423 they use a lot more time and disk space for no obvious benefit. If
[ecffcbbc]424 you have nevertheless enabled them, you can run the tests by executing
425 <command>./mach gtest</command>. This will require a network connection,
426 and to be run from within an Xorg session - there is a popup dialog
427 when it fails to connect to ALSA (that does not create a failed test).
428 One or two tests will fail. To see the details of the failure(s) you
429 will need to log the output from that command so that you can review it.
[0e37869]430 </para>
[01ce75f8]431
[495ebe07]432 <para>
[b9f61df]433 Now, as the <systemitem class="username">root</systemitem> user:
[c1ae13c]434 </para>
[5a13c45]435
[97e8769]436<screen role="root"><userinput>export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none &amp;&amp;
[5bd4e666]437export PYTHON311=/opt/python3.11/bin/python3.11 &amp;&amp;
[01c1ac6]438$PYTHON311 ./mach install</userinput></screen>
[fe5f563d]439
[a5708ba]440 <para>
[8d70628]441 Empty the environment variables which were set above:
[a5708ba]442 </para>
443
[97e8769]444<screen><userinput>unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE
[5bd4e666]445unset MOZBUILD_STATE_PATH
446unset PYTHON311</userinput></screen>
[01ce75f8]447
[b81991e1]448 </sect2>
449
[361df3e]450 <sect2 role="commands">
451 <title>Command Explanations</title>
[7d09fcb9]452
[fe5f563d]453 <para>
454 <command>export MOZBUILD_STATE_PATH=${PWD}/mozbuild</command>: The build
[5bd4e666]455 tells you that it intends to create <filename
[fe5f563d]456 class="directory">~/.mozbuild</filename>, and offer you an option to
457 press &lt;ENTER&gt; to accept this, or Ctrl-C to cancel and restart the
458 build after specifying the directory. In practice, the message may not
459 appear until after &lt;ENTER&gt; is keyed, i.e. the build stalls.
460 </para>
461
462 <para>
463 That directory is used for a (probably random) telemetry identifier.
[5bd4e666]464 Creating this directory within the build directory and deleting it after the
465 installation prevents it being used.
[883e376]466 </para>
467
468 <para>
[16218efb]469 <command>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none</command>: Use the
[e51466a]470 system python to create a virtual environment for <command>mach</command>
[5bd4e666]471 without downloading any python wheels and without using the system python modules.
[9403c3e]472 This prevents version mismatches between system modules and bundled ones.
[883e376]473 </para>
474
[67f44136]475<!--
[883e376]476 <para>
477 <command>./mach configure</command>: This validates the supplied
478 dependencies and the <filename>mozconfig</filename>.
[fe5f563d]479 </para>
[67f44136]480-->
[fe5f563d]481
[c1ae13c]482 <para>
[326f830]483 <option>./mach build --verbose</option>: Use this alternative if you
484 need details of which files are being compiled, together with any C or
[648f873]485 C++ flags being used. But do not add '--verbose' to the install command
486 since it is not accepted there.
[c1ae13c]487 </para>
488
[9a469bc]489 <para>
[fe5f563d]490 <option>./mach build -jN</option>: The build should, by default, use
[d5d7cd6]491 all the online CPU cores. If using all the cores causes the build to swap
492 because you have insufficient memory, using fewer cores can be faster.
[9a469bc]493 </para>
494
[c1ae13c]495 <para>
[f572dbb]496 <option><envar>CC=gcc CXX=g++</envar></option>: BLFS used to
[e51466a]497 prefer to use gcc and g++ instead of upstream's defaults of the
498 <application>clang</application> programs. With the release of
499 gcc-12 the build takes longer with gcc and g++, primarily because
500 of extra warnings, and is bigger. Set these environment variables
501 <emphasis>before you run the configure script</emphasis>
[f572dbb]502 if you wish to continue to use gcc, g++. Building
503 with GCC on i?86 is currently broken.
[c1ae13c]504 </para>
[fa1bc3e]505
[b81991e1]506 </sect2>
507
[88cec02]508 <sect2 role="configuration">
509 <title>Configuring Firefox</title>
510
[c1ae13c]511 <para>
512 If you use a desktop environment like <application>Gnome</application> or
[8dacd5e]513 <application>KDE</application> you may want to create a
[c1ae13c]514 <filename>firefox.desktop</filename> file so that
[1fe05eb]515 <application>Firefox</application> appears in the panel's menus.
[8dacd5e]516 As the &root; user:
[c1ae13c]517 </para>
[31de6e7]518
[eb5f847a]519<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
[28909b72]520mkdir -pv /usr/share/pixmaps &amp;&amp;
[74f73ede]521
[8dacd5e]522MIMETYPE="text/xml;text/mml;text/html;" &amp;&amp;
523MIMETYPE+="application/xhtml+xml;application/vnd.mozilla.xul+xml;" &amp;&amp;
524MIMETYPE+="x-scheme-handler/http;x-scheme-handler/https" &amp;&amp;
[28909b72]525
526cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; EOF &amp;&amp;
[fcd66369]527<literal>[Desktop Entry]
[31de6e7]528Encoding=UTF-8
[0e37869]529Name=Firefox Web Browser
530Comment=Browse the World Wide Web
531GenericName=Web Browser
532Exec=firefox %u
533Terminal=false
[31de6e7]534Type=Application
535Icon=firefox
[0e37869]536Categories=GNOME;GTK;Network;WebBrowser;
[28909b72]537MimeType=$MIMETYPE
[fcd66369]538StartupNotify=true</literal>
[31de6e7]539EOF
[74f73ede]540
[28909b72]541unset MIMETYPE &amp;&amp;
542
[888e303]543ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
[0e37869]544 /usr/share/pixmaps/firefox.png</userinput></screen>
545
[326f830]546 <sect3><title>Configuration Information</title>
547
548 <para>
549 The application settings for firefox are accessible by keying
550 <command>about:config</command> in the address bar.
551 </para>
552
553 <para>
[d5d7cd6]554 Occasionally, getting working sound in
555 <application>firefox</application> can be a problem. Although upstream
556 prefers pulseaudio,
[326f830]557 on balance using <application>Alsa</application> may be easier.
558 </para>
559
560 <para>
561 If you enabled <application>Alsa</application> for sound, you may need
562 to alter one variable to get working sound. If you run
[648f873]563 <command>firefox</command> from a terminal and try to play something
564 with sound you might encounter error messages like:
[326f830]565 </para>
566
567 <para>
568 <literal>Sandbox: seccomp sandbox violation: pid 3941, tid 4030,
569 syscall 16, args 48 2147767296 139909894784796 0 0 0.</literal>
570 </para>
571
572 <para>
573 That was on x86_64, on i686 the syscall number is 54. To allow this
574 syscall, in <command>about:config</command> change
575 <command>security.sandbox.content.syscall_whitelist</command> to 16
576 (or 54 if using i686).
577 </para>
578
579 <para>
580 If you use <command>pulseaudio</command> in a Desktop Environment, it
581 might already be started by that DE. But if it is not, although
[7ebe22e]582 firefox-57 managed to start it, firefox-58 did not. If you run
[648f873]583 <command>firefox</command> from a terminal and this problem is present,
[7ebe22e]584 trying to play sound will
[326f830]585 encounter error messages warning <literal>Can't get cubeb
586 context!</literal>
587 </para>
588
589 <para>
590 The fix for this is to close firefox, start pulseaudio to check it
591 does start (if not, read the information on Configuring in <xref
592 linkend="pulseaudio"/>) and restart firefox to check it is working.
593 If it now works, add the following to your <filename>~/.xinitrc</filename>:
594<phrase revision="sysv">
595<literal>pulseaudio --verbose --log-target=syslog&amp;</literal></phrase>
596<phrase revision="systemd">
597<literal>pulseaudio --verbose --log-target=journald&amp;</literal></phrase>
598 (unfortunately, on some systems this does not work).
599 </para>
600
601 <para>
602 You may wish to use multiple profiles within firefox. To do that, invoke
603 firefox as <command>firefox --ProfileManager</command>. You can also
604 check which profile is currently in use from
605 <command>about:profiles</command>.
606 </para>
607
[d5d7cd6]608 <para>
609 Although WebRender (using the GPU for compositing) is not used by
610 default, it now appears to work well on supported hardware (ATI, Nvidia
[648f873]611 and Intel GPUs with Mesa-18 or later). For an explanation, please see
[d5d7cd6]612 <ulink
613 url="https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-fps-how-webrender-gets-rid-of-jank/">hacks.mozilla.org</ulink>.
614 The only downside seems to be that on a machine with limited RAM it might
615 use more RAM.
616 </para>
617
618 <para>
619 To check if WebRender is being used, look in about:support. In the Graphics
[648f873]620 section, Compositing will either show 'Basic' (i.e. not in use) or
[d5d7cd6]621 'WebRender'. To enable it, go to about:config and change gfx.webrender.all
622 to True. You will need to restart firefox.
623 </para>
624
625 <para>
626 It may be useful to mention the processes from firefox which can appear in
627 <command>top</command> - as well as firefox itself, there may be multiple
628 Web Content processes, and now an RDD Process (Remote Data Decoder) which
629 appears when playing web videos encoded with av1 (libdav1d). If WebRender
630 has been enabled, a GPU Process will also appear when firefox has to
631 repaint (e.g. scrolling, opening a new tab, or playing a video).
632 </para>
633
[326f830]634 </sect3>
[88cec02]635 </sect2>
636
[b81991e1]637 <sect2 role="content">
638 <title>Contents</title>
639
640 <segmentedlist>
641 <segtitle>Installed Programs</segtitle>
642 <segtitle>Installed Libraries</segtitle>
[c5f005b]643 <segtitle>Installed Directory</segtitle>
[b81991e1]644
645 <seglistitem>
[0e37869]646 <seg>
647 firefox
648 </seg>
[c1ae13c]649 <seg>
650 Numerous libraries, browser components, plugins, extensions, and
[8d0bc761]651 helper modules installed in /usr/lib/firefox
[c1ae13c]652 </seg>
[7498751]653 <seg>
[87fa171]654 /usr/lib/firefox
[7498751]655 </seg>
[b81991e1]656 </seglistitem>
657 </segmentedlist>
658
659 <variablelist>
660 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
661 <?dbfo list-presentation="list"?>
662 <?dbhtml list-presentation="table"?>
663
664 <varlistentry id="firefox-prog">
665 <term><command>firefox</command></term>
666 <listitem>
[c1ae13c]667 <para>
[4e207bb]668 is a <application>GTK+-3</application> internet browser that uses
669 the Mozilla Gecko rendering engine
[c1ae13c]670 </para>
[b81991e1]671 <indexterm zone="firefox firefox-prog">
672 <primary sortas="b-firefox">firefox</primary>
673 </indexterm>
674 </listitem>
675 </varlistentry>
[0e37869]676
[b81991e1]677 </variablelist>
[0e37869]678
[b81991e1]679 </sect2>
[0e37869]680
[4d37129]681</sect1>
Note: See TracBrowser for help on using the repository browser.