source: xsoft/graphweb/firefox.xml@ 597ad450

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 597ad450 was 686afa98, checked in by Douglas R. Reno <renodr@…>, 15 months ago

Fix building Firefox with LLVM-16.

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