https://wiki.archlinux.org/api.php?action=feedcontributions&user=Jamespole&feedformat=atomArchWiki - User contributions [en]2024-03-29T02:09:17ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Avahi&diff=719294Avahi2022-02-19T08:30:22Z<p>Jamespole: /* systemd-resolved prevents nss-mdns from working */ Add note re this solution breaking reverse lookups in certain networking utilities.</p>
<hr />
<div>[[Category:Multicast DNS]]<br />
[[fr:Avahi]]<br />
[[ja:Avahi]]<br />
From [[Wikipedia:Avahi (software)]]:<br />
:[https://avahi.org/ Avahi] is a free [[Wikipedia:Zero-configuration networking|Zero-configuration networking]] (zeroconf) implementation, including a system for multicast DNS/DNS-SD service discovery. It allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example you can plug into a network and instantly find printers to print to, files to look at and people to talk to. It is licensed under the GNU Lesser General Public License (LGPL).<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|avahi}} package.<br />
<br />
You can manage the Avahi daemon with {{ic|avahi-daemon.service}} [[systemd#Using units|using systemd]].<br />
<br />
{{Note|[[systemd-resolved]] has a built-in mDNS service, make sure to disable systemd-resolved's multicast DNS resolver/responder (refer to {{man|5|resolved.conf}}) or [[disable]] {{ic|systemd-resolved.service}} entirely before using Avahi.}}<br />
<br />
== Using Avahi ==<br />
<br />
=== Hostname resolution ===<br />
<br />
Avahi provides local hostname resolution using a "''hostname''.local" naming scheme. To enable it, install the {{Pkg|nss-mdns}} package and [[start/enable]] {{ic|avahi-daemon.service}}.<br />
<br />
Then, edit the file {{ic|/etc/nsswitch.conf}} and change the {{ic|hosts}} line to include {{ic|1=mdns_minimal [NOTFOUND=return]}} before {{ic|resolve}} and {{ic|dns}}:<br />
<br />
hosts: mymachines '''mdns_minimal [NOTFOUND=return]''' resolve [!UNAVAIL=return] files myhostname dns<br />
<br />
{{Note|<br />
* If you experience slowdowns in resolving {{ic|.local}} hosts try to use {{ic|mdns4_minimal}} instead of {{ic|mdns_minimal}}.<br />
* The line above makes {{ic|nss-mdns}} authoritative for the {{ic|.local}} domain, unless your unicast DNS server responds to {{ic|SOA}} queries for the top level {{ic|local}} name, or if the request has more than two labels. See {{ic|nss-mdns}} [https://github.com/lathiat/nss-mdns/blob/master/README.md#activation activation notes].<br />
** [[systemd-resolved]] responds to these queries even if its mDNS support is disabled. See [[#systemd-resolved prevents nss-mdns from working]].<br />
}}<br />
<br />
==== Configuring mDNS for custom TLD ====<br />
<br />
The {{ic|mdns_minimal}} module handles queries for the {{ic|.local}} TLD only. Note the {{ic|<nowiki>[NOTFOUND=return]</nowiki>}}, which specifies that if {{ic|mdns_minimal}} cannot find {{ic|*.local}}, it will not continue to search for it in {{ic|dns}}, {{ic|myhostname}}, etc.<br />
<br />
In case you want Avahi to support other TLDs, you should:<br />
<br />
* replace {{ic|1=mdns_minimal [NOTFOUND=return]}} with the full {{ic|mdns}} module. There also are IPv4-only and IPv6-only modules {{ic|mdns[46](_minimal)}}<br />
* customize {{ic|/etc/avahi/avahi-daemon.conf}} with the {{ic|domain-name}} of your choice<br />
* whitelist Avahi custom TLDs in {{ic|/etc/mdns.allow}}<br />
<br />
==== Tools ====<br />
<br />
Avahi includes several utilities which help you discover the services running on a network. For example, run<br />
<br />
$ avahi-browse --all --ignore-local --resolve --terminate<br />
<br />
to discover services in your network.<br />
<br />
The Avahi Zeroconf Browser ({{ic|avahi-discover}} – note that it needs Avahi's optional dependencies {{Pkg|gtk3}}, {{Pkg|dbus-python}} and {{Pkg|python-gobject}}) shows the various services on your network. You can also browse SSH and VNC Servers using {{ic|bssh}} and {{ic|bvnc}} respectively.<br />
<br />
=== Firewall ===<br />
<br />
Be sure to open UDP port {{ic|5353}} if you are using a [[firewall]].<br />
<br />
=== Link-Local (Bonjour/Zeroconf) chat ===<br />
<br />
Avahi can be used for Bonjour protocol support under Linux. Check [[Wikipedia:Comparison of instant messaging clients]] or [[List of applications#Instant messaging clients]] for a list of clients supporting the Bonjour protocol.<br />
<br />
=== Obtaining IPv4LL IP address ===<br />
<br />
{{Merge|dhcpcd|should be merged into the main page}}<br />
<br />
By default, if you are getting IP using DHCP, you are using the {{Pkg|dhcpcd}} package. It can attempt to obtain an IPv4LL address if it failed to get one via DHCP. By default this option is disabled. To enable it, comment noipv4ll string:<br />
<br />
{{hc|/etc/dhcpcd.conf|<br />
...<br />
#noipv4ll<br />
...}}<br />
<br />
Alternatively, run {{ic|avahi-autoipd}}:<br />
<br />
# avahi-autoipd -D<br />
<br />
== Adding services ==<br />
<br />
Avahi advertises the services whose {{ic|*.service}} files are found in {{ic|/etc/avahi/services}}. Files in this directory must be readable by the {{ic|avahi}} user/group.<br />
<br />
If you want to advertise a service for which there is no {{ic|*.service}} file, it is very easy to create your own.<br />
As an example, let us say you wanted to advertise a quote of the day (QOTD) service operating per [[RFC:865]] on TCP port {{ic|17}} which you are running on your machine<br />
<br />
The first thing to do is to determine the {{ic|<type>}}. {{man|5|avahi.service}} indicates that the type should be "the DNS-SD service type for this service. e.g. '_http._tcp'". Since the [http://www.dns-sd.org/ServiceTypes.html DNS-SD register was merged into the IANA register in 2010], we look for the service name on the [https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml IANA register] or in {{ic|/etc/services}} file. The service name shown there is {{ic|qotd}}. Since we are running QOTD on tcp, we now know the service is {{ic|_qotd._tcp}} and the port (per IANA and RFC 865) is {{ic|17}}.<br />
<br />
Our service file is thus:<br />
<br />
{{hc|qotd.service|<nowiki><br />
<?xml version="1.0" standalone='no'?><!--*-nxml-*--><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<br />
<service-group><br />
<br />
<name replace-wildcards="yes">%h</name><br />
<br />
<service><br />
<type>_qotd._tcp</type><br />
<port>17</port><br />
</service><br />
<br />
</service-group><br />
</nowiki>}}<br />
<br />
For more complicated scenarios, such as advertising services running on a different server, DNS sub-types and so on, consult {{man|5|avahi.service}}.<br />
<br />
=== SSH ===<br />
<br />
Avahi comes with an example service file to advertise an SSH server. To enable it:<br />
<br />
# cp /usr/share/doc/avahi/ssh.service /etc/avahi/services/<br />
<br />
=== File sharing ===<br />
<br />
==== NFS ====<br />
<br />
If you have an [[NFS]] share set up, you can use Avahi to be able to automount them in Zeroconf-enabled browsers (such as Konqueror on KDE and Finder on macOS) or file managers such as [[GNOME/Files]].<br />
<br />
Create a {{ic|.service}} file in {{ic|/etc/avahi/services}} with the following contents:<br />
<br />
{{hc|/etc/avahi/services/nfs_Zephyrus_Music.service|<nowiki><br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name replace-wildcards="yes">NFS Music Share on %h</name><br />
<service><br />
<type>_nfs._tcp</type><br />
<port>2049</port><br />
<txt-record>path=/data/shared/Music</txt-record><br />
</service><br />
</service-group><br />
</nowiki>}}<br />
<br />
The port is correct if you have ''insecure'' as an option in your {{ic|/etc/exports}}; otherwise, it needs to be changed (note that ''insecure'' is needed for macOS clients). The path is the path to your export, or a subdirectory of it. For some reason the automount functionality has been removed from Leopard, however [http://www.macosxhints.com/article.php?story=20071116042238744 a script is available]. This was based upon [https://ubuntuforums.org/showthread.php?p=4387032#post4387032 this post].<br />
<br />
==== Samba ====<br />
<br />
With the Avahi daemon running on both the server and client, the file manager on the client should automatically find the server.<br />
<br />
==== Vsftpd ====<br />
<br />
You can also auto-discover regular FTP servers, such as [[vsftpd]]. Install the {{Pkg|vsftpd}} package and change the settings of vsftpd according to your own personal preferences (see [https://ubuntuforums.org/showthread.php?t=218630 this thread on ubuntuforums.org] or {{man|5|vsftpd.conf}}).<br />
<br />
Create a {{ic|.service}} file in {{ic|/etc/avahi/services}} with the following contents:<br />
<br />
{{hc|/etc/avahi/services/ftp.service|<nowiki><br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>FTP file sharing</name><br />
<service><br />
<type>_ftp._tcp</type><br />
<port>21</port><br />
</service><br />
</service-group><br />
</nowiki>}}<br />
<br />
The FTP server should now be advertised by Avahi. You should now be able to find the FTP server from a file manager on another computer in your network. You might need to enable [[#Hostname resolution]] on the client.<br />
<br />
=== AirPrint from Mobile Devices ===<br />
<br />
{{Merge | AirPort#Printing | AirPrint is a feature provided by the Apple AirPort Express and by some printers. The manual configuration technique (using JetDirect) can also apply here and may be easier.}}<br />
<br />
Avahi along with [[CUPS]] also provides the capability to print to just about any printer from airprint compatible mobile devices. In order to enable print capability from your device, simply create an Avahi service file for your printer in {{ic|/etc/avahi/services/}}. An example of a generic services file for an HP-Laserjet printer would be similar to the following with the {{ic|name}}, {{ic|rp}}, {{ic|ty}}, {{ic|adminurl}} and {{ic|note}} fields changed.<br />
<br />
{{hc|/etc/avahi/services/airprint.service|<nowiki><br />
<?xml version="1.0" standalone='no'?><!--*-nxml-*--><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>yourPrnterName</name><br />
<service><br />
<type>_ipp._tcp</type><br />
<subtype>_universal._sub._ipp._tcp</subtype><br />
<port>631</port><br />
<txt-record>txtver=1</txt-record><br />
<txt-record>qtotal=1</txt-record><br />
<txt-record>rp=printers/yourPrnterName</txt-record><br />
<txt-record>ty=yourPrnterName</txt-record><br />
<txt-record>adminurl=http://198.168.7.15:631/printers/yourPrnterName</txt-record><br />
<txt-record>note=Office Laserjet 4100n</txt-record><br />
<txt-record>priority=0</txt-record><br />
<txt-record>product=(GPL Ghostscript)</txt-record><br />
<txt-record>printer-state=3</txt-record><br />
<txt-record>printer-type=0x801046</txt-record><br />
<txt-record>Transparent=T</txt-record><br />
<txt-record>Binary=T</txt-record><br />
<txt-record>Fax=F</txt-record><br />
<txt-record>Color=T</txt-record><br />
<txt-record>Duplex=T</txt-record><br />
<txt-record>Staple=F</txt-record><br />
<txt-record>Copies=T</txt-record><br />
<txt-record>Collate=F</txt-record><br />
<txt-record>Punch=F</txt-record><br />
<txt-record>Bind=F</txt-record><br />
<txt-record>Sort=F</txt-record><br />
<txt-record>Scan=F</txt-record><br />
<txt-record>pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf</txt-record><br />
<txt-record>URF=W8,SRGB24,CP1,RS600</txt-record><br />
</service><br />
</service-group><br />
</nowiki>}}<br />
<br />
Alternatively, https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py can be used to generate Avahi service files. It depends on {{Pkg|python}} and {{Pkg|python-pycups}}. The script can be run using:<br />
<br />
# python3 airprint-generate.py -d /etc/avahi/services<br />
<br />
{{Note|If your printer under http://localhost:631/printers is "Not Shared", this python script will not output any file to /etc/avahi/services; in that case, you will need to "Modify Printer" under one of the CUPS drop-down menus to turn sharing on. If that does not work, check out the ArchWiki on [[CUPS printer sharing]].}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Hostname changes with appending incrementing numbers ===<br />
<br />
This is a [https://github.com/lathiat/avahi/issues/117 known bug] that is caused by a hostname race condition. One possible workaround is [https://github.com/lathiat/avahi/issues/117#issuecomment-302849130 disabling IPv6] to attempt to prevent the race condition. If multiple interfaces are present [https://github.com/lathiat/avahi/issues/117#issuecomment-401225716 use allow-interfaces] to limit Avahi to a single interface. Another possible workaround is to [https://github.com/lathiat/avahi/issues/117#issuecomment-442201162 disable the cache] to prevent Avahi from checking for host name conflicts altogether, but this prevents Avahi from performing lookups.<br />
<br />
=== systemd-resolved prevents nss-mdns from working ===<br />
<br />
''nss-mdns'' only works if the DNS server listed in {{ic|/etc/resolv.conf}} returns NXDOMAIN to SOA queries for the "local" domain.[https://github.com/lathiat/nss-mdns/blob/master/README.md#activation] Even if [[systemd-resolved]] is configured with {{ic|1=MulticastDNS=no}} in {{man|5|resolved.conf}}, it will not return NXDOMAIN for these queries. See [https://github.com/systemd/systemd/issues/21659 systemd issue 21659].<br />
<br />
A solution is to use the full {{ic|mdns}} NSS module instead of {{ic|mdns_minimal}} and create {{ic|/etc/mdns.allow}} to allow only the "local" domain. For example:<br />
<br />
{{hc|/etc/nsswitch.conf|2=<br />
hosts: mymachines '''mdns [NOTFOUND=return]''' resolve [!UNAVAIL=return] files myhostname dns<br />
}}<br />
<br />
{{hc|/etc/mdns.allow|<br />
.local.<br />
.local<br />
}}<br />
<br />
{{Note|1=The above solution will break reverse lookups in networking utilities such as {{Pkg|mtr}} and {{Pkg|traceroute}}. These applications will attempt to to a reverse lookup via Avahi and time out instead of falling back to other DNS services. This seems similar to [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433943 Debian issue 433943] where the recommendation is, unfortunately, to use {{ic|mdns_minimal}} instead of {{ic|mdns}}.}}<br />
<br />
== See also ==<br />
<br />
* [https://avahi.org/ Avahi] - Official project website<br />
* [[Wikipedia:Avahi (software)]]<br />
* [https://www.apple.com/itunes/download/ iTunes (includes Bonjour)] - Enable Zeroconf on Windows<br />
* http://www.zeroconf.org/</div>Jamespolehttps://wiki.archlinux.org/index.php?title=Unofficial_mirrors&diff=693874Unofficial mirrors2021-09-02T07:03:41Z<p>Jamespole: Added https for mirror.ece.auckland.ac.nz</p>
<hr />
<div>[[Category:Package management]]<br />
[[Category:Lists]]<br />
[[es:Unofficial mirrors]]<br />
[[pt:Unofficial mirrors]]<br />
[[ru:Unofficial mirrors]]<br />
[[zh-hans:Unofficial mirrors]]<br />
These [[mirrors]] are ''not'' listed in {{ic|/etc/pacman.d/mirrorlist}}.<br />
<br />
== Worldwide ==<br />
<br />
* https://cloudflaremirrors.com/archlinux/ - ''CloudFlare runs a quasi-mirror service that fronts existing mirrors on their global CDN (does not work correctly with pacman, see {{Bug|67865}})''<br />
* https://sourceforge.net/projects/archlinux/files/ - ''ISO files only; Does not have any releases since 2006. Use it only for getting older ISOs.''<br />
<br />
== Australia ==<br />
<br />
*https://chestm007.ddns.net/archlinux/<br />
<br />
== Belgium ==<br />
<br />
*https://ftp.belnet.be/mirror/archlinux.org/ - ''Belnet''<br />
<br />
== Chile ==<br />
<br />
*http://ip62.inf.utfsm.cl/ ''UTFSM #62''<br />
<br />
== China ==<br />
<br />
'''CDN'''<br />
*https://mirrors.aliyun.com/archlinux/ - ''Alibaba''<br />
*https://mirrors.cloud.tencent.com/archlinux/ - ''Tencent Cloud''<br />
*https://repo.huaweicloud.com/archlinux/ - ''Huawei Cloud''<br />
<br />
'''Cernet'''<br />
*https://mirror.bit.edu.cn/archlinux/ - ''Beijing Institute of Technology''<br />
*https://mirrors.nju.edu.cn/archlinux/ - ''Nanjing University''<br />
<br />
== Finland ==<br />
<br />
*http://95.217.224.159:26704/ArchMirror/$repo/os/$arch - ''IPv4, HTTP''<br />
*http://arch.kyberorg.fi/$repo/os/$arch - ''IPv4, HTTP, HTTPS''<br />
<br />
== France ==<br />
<br />
*http://delta.archlinux.fr/ - ''With Delta package support. Needs {{Pkg|xdelta3}} to run.''<br />
*https://mirror.oldsql.cc/archlinux/<br />
*https://archlinux.moulticast.net/<br />
*https://mirror.lesviallon.fr - ''https only, 1Gb/s, uptime can be checked at https://stats.lesviallon.fr/786053669''<br />
<br />
== Germany ==<br />
<br />
*https://mirror.mikrogravitation.org/archlinux/ - ''IPv4/IPv6, https, rsync, 20 Gbit/s Bandwidth''<br />
*https://mirror.undisclose.de/archlinux/ - ''IPv4 http, https, rsync, 1GB/s Bandwith''<br />
*https://archlinux.homeinfo.de/ - ''IPv4/IPv6, https''<br />
*https://arch.mirror.kescher.at/ - ''IPv4/IPv6, https, rsync (on different URL), 1 Gbit/s Bandwidth''<br />
<br />
== Indonesia ==<br />
<br />
*http://kambing.ui.ac.id/archlinux/<br />
<br />
== Iran ==<br />
<br />
*http://repo.sadjad.ac.ir/arch/<br />
<br />
== Italy ==<br />
<br />
*http://mi.mirror.garr.it/mirrors/archlinux/<br />
<br />
== Japan ==<br />
<br />
*http://ftp.nara.wide.ad.jp/pub/Linux/archlinux/ - ''Nara Institute of Science and Technology''<br />
*https://ftp.kddilabs.jp/Linux/packages/archlinux/<br />
*http://srv2.ftp.ne.jp/Linux/packages/archlinux/<br />
<br />
== Netherlands ==<br />
<br />
*https://mirror.transip.net/archlinux/ ''TransIP B.V.''<br />
<br />
== New Zealand ==<br />
<br />
*http://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
*https://mirror.ece.auckland.ac.nz/archlinux/ ''NZ only''<br />
<br />
== Poland ==<br />
<br />
*ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
*https://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
*rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW<br />
*http://repo.skni.umcs.pl/archlinux/ - UMCS<br />
*https://repo.skni.umcs.pl/archlinux/ - UMCS<br />
<br />
== South Africa ==<br />
<br />
*http://ftp.leg.uct.ac.za/pub/linux/arch/ - ''University of Cape Town''<br />
*ftp://ftp.leg.uct.ac.za/pub/linux/arch/<br />
*http://mirror.ufs.ac.za/archlinux/ - ''University of the Free State''<br />
*ftp://mirror.ufs.ac.za/os/linux/distros/archlinux/<br />
*http://archlinux.mirror.ac.za - ''TENET - Tertiary Education and Research Network of South Africa''<br />
*ftp://archlinux.mirror.ac.za<br />
*http://archlinux.za.mirror.allworldit.com/archlinux-deltarepo/ - ''Automatically generating deltas for the last 3 months to current version. Supports http, https, rsync and IPv6. Check [https://bbs.archlinux.org/viewtopic.php?id=243247 here] for more info.''<br />
<br />
== Sweden ==<br />
<br />
*ftp://foss.dhyrule.se/linux/archlinux/<br />
<br />
== Taiwan ==<br />
<br />
* http://archlinux.ccns.ncku.edu.tw/archlinux/ - NCKU CCNS<br />
<br />
== Thailand ==<br />
<br />
* http://mirror1.ku.ac.th/archlinux/<br />
<br />
== Turkey ==<br />
<br />
* http://mirror.veriteknik.net.tr/archlinux/ - ''VeriTeknik Data Center''<br />
* https://ftp.linux.org.tr/archlinux/<br />
<br />
== United Kingdom ==<br />
<br />
* http://archlinux.uk.mirror.allworldit.com/archlinux-deltarepo/ - ''Automatically generating deltas for the last 3 months to current version. Supports http, https, rsync and IPv6. Check [https://bbs.archlinux.org/viewtopic.php?id=243247 here] for more info.''<br />
<br />
== United States ==<br />
<br />
* https://mirror.clarkson.edu/archlinux/<br />
* http://mirror.pointysoftware.net/archlinux/<br />
* http://mirror.ziemer.bz/archlinux<br />
* https://lug.mines.edu/mirrors/archlinux/<br />
* http://mirror.cs.umn.edu/arch/</div>Jamespolehttps://wiki.archlinux.org/index.php?title=Firefox/Tweaks&diff=506560Firefox/Tweaks2018-01-08T01:07:28Z<p>Jamespole: /* Adding magnet protocol association */ Updated instructions because previous instructions were out of date.</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ja:Firefox 設定]]<br />
{{Related articles start}}<br />
{{Related|Firefox}}<br />
{{Related|Browser plugins}}<br />
{{Related|Firefox/Profile on RAM}}<br />
{{Related|Firefox/Privacy}}<br />
{{Related articles end}}<br />
<br />
This page contains advanced Firefox configuration options and performance tweaks.<br />
<br />
== Performance ==<br />
<br />
Improving Firefox's performance is divided into parameters that can be inputted while running Firefox or otherwise modifying its configuration as intended by the developers, and advanced procedures that involve foreign programs or scripts.<br />
<br />
{{Note|Listed options may only be available for the latest version of Firefox.}}<br />
<br />
This section contains advanced Firefox options for performance tweaking. For additional information see [http://kb.mozillazine.org/Category:Tweaking_preferences these MozillaZine articles].<br />
<br />
=== Change Performance settings ===<br />
Firefox 56 automatically uses settings based on the computer's hardware specifications [https://support.mozilla.org/en-US/kb/performance-settings].<br />
<br />
Adjusting these settings can be done in Preferences or by changing the {{ic|dom.ipc.processCount}} value to {{ic|1-7}} and {{ic|browser.preferences.defaultPerformanceSettings.enabled}} to {{ic|false}} manually in {{ic|about:config}}.<br />
<br />
However you may want to manually adjust this setting to increase performance even further or decrease memory usage on low-end devices.<br />
<br />
In this case the '''Content process limit''' for the current [[user]] has been increased to ''4'':<br />
<br />
{{hc|$ ps -e {{!}} grep 'Web Content'|<br />
13991 tty1 00:00:04 Web Content<br />
14027 tty1 00:00:09 Web Content<br />
14031 tty1 00:00:20 Web Content<br />
14040 tty1 00:00:26 Web Content<br />
}}<br />
<br />
=== Enable OpenGL Off-Main-Thread Compositing (OMTC) ===<br />
Basic software OMTC is enabled by default.<br />
<br />
To check if OpenGL OMTC is enabled, go to {{ic|about:support}} and under the "Graphics" section look for "Compositing". If it reports "Basic", OpenGL OMTC is disabled; if it reports "OpenGL" it is enabled.<br />
<br />
If OpenGL OMTC is disabled, you can force-enable it by going to {{ic|about:config}} and enabling {{ic|layers.acceleration.force-enabled}}. Restart Firefox for changes to take effect.<br />
<br />
{{Warning|If OpenGL OMTC is disabled for a specific hardware, it may be due to stability issues, high system resources consumption, driver bugs or a number of different variables, and so instead of speeding things up it might slow them down. Proceed with force-enabling it at your own risk, benchmark if you aren’t sure.}}<br />
<br />
For more information on OMTC in Firefox read here: https://wiki.mozilla.org/Platform/GFX/OffMainThreadCompositing<br />
<br />
=== Enable Accelerated Azure Canvas ===<br />
{{Warning|Accelerated Azure Canvas may cause invalid/corrupt rendering of images on unsupported devices and/or drivers, see [[#Enable OpenGL Off-Main-Thread Compositing (OMTC)]].}}<br />
<br />
Go to {{ic|about:config}}, accept the warning, right click and create a new boolean value. Set the name as {{ic|gfx.canvas.azure.accelerated}} and set it to {{ic|true}}.<br />
<br />
To verify restart Firefox then go to {{ic|about:support}} and search for {{ic|AzureCanvasAccelerated}} which should be set to ''1''.<br />
<br />
The acceleration efficiency can be tested by comparing the speed of a [http://js1k.com/2016-elemental/demo/2445 javascript demo] with and without the setting.<br />
<br />
=== Stop urlclassifier3.sqlite from being created again ===<br />
Removing all {{ic|urlclassifier*}} files can prevent the use of megabytes of storage in your firefox profile. If you remove all the {{ic|urlclassifier*}} files, you may find out that {{ic|urlclassifier3.sqlite}} keeps growing again after a certain time. Here is a simple solution to avoid it for now and ever.<br />
<br />
$ cd ~/.mozilla/firefox/<profile_dir><br />
$ echo "" > urlclassifier3.sqlite<br />
$ chmod 400 urlclassifier3.sqlite<br />
<br />
This effectively makes the file empty and then read-only so Firefox cannot write to it anymore.<br />
<br />
=== Turn off the disk cache ===<br />
Every object loaded (html page, jpeg image, css stylesheet, gif banner) is saved in the Firefox cache for future use without the need to download it again. It is estimated that only a fraction of these objects will be reused, usually about 30%. This because of very short object expiration time, updates or simply user behavior (loading new pages instead of returning to the ones already visited). The Firefox cache is divided into memory and disk cache and the latter results in frequent disk writes: newly loaded objects are written to memory and older objects are removed.<br />
<br />
The disk cache can be turned off by enabling ''Preferences > Privacy & Security > Cached Web Content - Override automatic cache management'' and setting to {{ic|0}} ''Limit cache to ... MB of space''.<br />
<br />
An alternative approach is to use {{Ic|about:config}} settings:<br />
* Set {{Ic|browser.cache.disk.enable}} to {{ic|false}}<br />
* Verify that {{Ic|browser.cache.memory.enable}} is set to {{ic|true}}, more information about this option can be found in the [http://kb.mozillazine.org/Browser.cache.memory.enable browser.cache.memory Mozilla article]<br />
* Add the entry (''right click > new > integer'') {{Ic|browser.cache.memory.capacity}} and set it to the amount of KB you want to spare, or to {{ic|-1}} for [http://kb.mozillazine.org/Browser.cache.memory.capacity#-1 automatic] cache size selection (skipping this step has the same effect as setting the value to {{ic|-1}})<br />
<br />
This method has some drawbacks:<br />
* The content of currently browsed webpages is lost if the browser crashes or after a reboot, this can be avoided using [[anything-sync-daemon]] or any similar periodically-syncing script so that cache gets copied over to the drive on a regular basis<br />
* The settings need to be configured for each user individually<br />
<br />
=== Longer interval between session information record ===<br />
Firefox stores the current session status (opened urls, cookies, history and form data) to the disk on a regular basis. It is used to recover a previous session in case of crash.<br />
The default setting is to save the session every 15 seconds, resulting in frequent disk access. <br />
<br />
To increase the save interval to 10 minutes for example, change in {{ic|about:config}} the setting of {{ic|browser.sessionstore.interval}} to {{ic|600000}}<br />
<br />
To disable completely this feature, change {{ic|browser.sessionstore.resume_from_crash}} to {{ic|false}}<br />
<br />
=== Referrer header control ===<br />
The HTTP {{ic|Referer}} header can be extensively configured via {{ic|about:config}}. See [https://wiki.mozilla.org/Security/Referrer Security/Referrer] on the Mozilla wiki for the available preferences.<br />
<br />
=== Defragment the profile's SQLite databases ===<br />
{{Warning|This procedure may damage the databases in such a way that sessions are not saved properly.}}<br />
<br />
Firefox keeps bookmarks, history, passwords in SQLite databases. SQLite databases become fragmented over time and empty spaces appear all around. But, since there are no managing processes checking and optimizing the database, these factors eventually result in a performance hit. A good way to improve start-up and some other bookmarks and history related tasks is to defragment and trim unused space from these databases.<br />
<br />
You can use {{AUR|profile-cleaner}} to do this, while Firefox is '''not''' running:<br />
<br />
{| class="wikitable"<br />
|+ profile-cleaner usage example:<br />
! SQLite database || Size Before || Size After || % change<br />
|- <br />
|urlclassifier3.sqlite|| 37 M || 30 M || 19 %<br />
|-<br />
|places.sqlite || 16 M || 2.4 M || 85 %<br />
|-<br />
|}<br />
<br />
Firefox provides a tool to defragment and optimize the places database, which is the source of most slowdowns and profile corruptions. To access this tool, open the {{ic|about:support}} page, search for {{ic|Places Database}} and click the {{ic|Verify Integrity}} button.<br />
<br />
=== Cache the entire profile into RAM via tmpfs ===<br />
If the system has memory to spare, {{ic|tmpfs}} can be used to [[Firefox on RAM|cache the entire profile directory]], which might result in increased Firefox responsiveness.<br />
<br />
=== Turn off sponsored content and tiles ===<br />
In {{ic|about:config}}, set the string value to a blank for both of these: {{ic|browser.newtabpage.directory.source}} and {{ic|browser.newtabpage.directory.ping}}. Consider also disabling the tile feature from the tools on a new tab page. A [[Wireshark]] session demonstrates the level of chatter created by these features.<br />
<br />
=== Enable Electrolysis ===<br />
{{Note|Electrolysis should always be enabled in Firefox 57 and later}}<br />
Electrolysis (multi-process) may be enabled to improve performance and security by setting {{ic|browser.tabs.remote.autostart}} to ''true'' in {{ic|about:config}}. It may be needed to force-enable Electrolysis [https://wiki.mozilla.org/Electrolysis#Force_Enable], although this is generally not recommended and may cause issues.<br />
<br />
To check if Electrolysis is enabled, go to {{ic|about:support}} and under the "Application Basics" section look for "Multiprocess Windows". If it reports "0/1 (Disabled)", Electrolysis is disabled; if it reports "1/1 (Enabled by user)" it is enabled. Note that the given numbers ''*/*'' indicate the number of open Firefox windows, e.g. 0/2 meaning non of the two Firefox-windows are using Electrolysis, and 2/2 means it is enabled for both windows.<br />
<br />
=== Disable Pocket ===<br />
If you don't use the Pocket-service, you may want to disable it by setting {{ic|extensions.pocket.enabled}} to ''false'' in {{ic|about:config}}.<br />
<br />
== Appearance ==<br />
=== Fonts ===<br />
See the main article: [[Font configuration]]<br />
<br />
==== Configure the DPI value ====<br />
Modifying the following value can help improve the way fonts looks in Firefox if the system's DPI is below 96. Firefox, by default, uses 96 and only uses the system's DPI if it is a higher value. To force the system's DPI regardless of its value, type {{ic|about:config}} into the address bar and set {{ic|layout.css.dpi}} to '''0'''.<br />
<br />
Note that the above method only affects the Firefox user interface's DPI settings. Web page contents still use a DPI value of 96, which may look ugly or, in the case of high-resolution displays, may be rendered too small to read. A solution is to change {{ic|layout.css.devPixelsPerPx}} to system's DPI divided by 96. For example, if your system's DPI is 144, then the value to add is 144/96 = 1.5. Changing {{ic|layout.css.devPixelsPerPx}} to '''1.5''' makes web page contents use a DPI of 144, which looks much better.<br />
<br />
See also [[HiDPI#Firefox]] for information about HiDPI displays and [https://www.sven.de/dpi/] for calculating the DPI.<br />
<br />
==== Default font settings from Microsoft Windows ====<br />
Below are the default font preferences when Firefox is installed in Microsoft Windows. Many web sites use the Microsoft fonts.<br />
{{bc|<br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
}}<br />
<br />
=== General user interface CSS settings ===<br />
Firefox's user interface can be modified by editing the {{ic|userChrome.css}} and {{ic|userContent.css}} files in {{ic|~/.mozilla/firefox/<profile_dir>/chrome/}} (''profile_dir'' is of the form ''hash.name'', where the ''hash'' is an 8 character, seemingly random string and the profile ''name'' is usually ''default'').<br />
<br />
{{Note|The {{ic|chrome/}} folder and {{ic|userChrome.css}}/{{ic|userContent.css}} files may not necessarily exist, so they may need to be created.}}<br />
<br />
This section only deals with the {{ic|userChrome.css}} file which modifies Firefox's user interface, and not web pages.<br />
<br />
==== Change the interface font ====<br />
<br />
The setting effectively overrides the global GTK+ font preferences, and does not affect webpages, only the user interface itself:<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userChrome.css|<br />
* {<br />
font-family: "FONT_NAME";<br />
}<br />
}}<br />
<br />
==== Hide button icons ====<br />
Enables text-only buttons:<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userChrome.css|<br />
.button-box .button-icon {<br />
display: none;<br />
}<br />
}}<br />
<br />
==== Hiding various tab buttons ====<br />
These settings hide the arrows that appear to the horizontal edges of the tab bar, the button that toggles the "all tabs" drop-down list, and the plus sign button that creates a new tab.<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userChrome.css|<nowiki><br />
/* Tab bar */<br />
<br />
.tabbrowser-strip *[class^="scrollbutton"] {<br />
/* Hide tab scroll buttons */<br />
display: none;<br />
}<br />
<br />
.tabbrowser-strip *[class^="tabs-alltabs"] {<br />
/* Hide tab drop-down list */<br />
display: none;<br />
}<br />
<br />
.tabbrowser-strip *[class^="tabs-newtab-button"] {<br />
/* Hide new-tab button */<br />
display: none;<br />
}</nowiki><br />
}}<br />
<br />
==== Horizontal tabs ====<br />
To place the tab bar horizontally stacked along the sides of the browser window:<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userChrome.css|<br />
/* Display the tabbar on the left */<br />
#content > tabbox {<br />
-moz-box-orient: horizontal;<br />
}<br />
<br />
.tabbrowser-strip {<br />
-moz-box-orient: vertical;<br />
/*<br />
* You can set this to -moz-scrollbars-vertical instead,<br />
* but then the scrollbar will *always* be visible. this way<br />
* there is never a scrollbar, so it behaves like the tab bar<br />
* normally does<br />
*/<br />
overflow: -moz-scrollbars-none;<br />
}<br />
<br />
.tabbrowser-tabs {<br />
-moz-box-orient: horizontal;<br />
min-width: 20ex; /* You may want to increase this value */<br />
-mox-box-pack: start;<br />
-moz-box-align: start;<br />
}<br />
<br />
.tabbrowser-tabs > hbox {<br />
-moz-box-orient: vertical;<br />
-moz-box-align: stretch;<br />
-moz-box-pack: start;<br />
}<br />
<br />
.tabbrowser-tabs > hbox > tab {<br />
-moz-box-align: start;<br />
-moz-box-orient: horizontal;<br />
}<br />
}}<br />
<br />
==== Hide window border and title bar ====<br />
{{Out of date|None of these addons is compatible with Firefox Quantum}}<br />
<br />
Install the [https://addons.mozilla.org/firefox/addon/hide-caption-titlebar-plus-sma/ Hide Caption Titlebar Plus] extension and set the following settings (leaving other settings to default):<br />
{| class="wikitable"<br />
! Option<br />
! Value<br />
|-<br />
| Show Custom Caption/TitleBar<br />
| Never<br />
|-<br />
| Activate custom borders and corner resizers<br />
| Deactivate<br />
|-<br />
| Enable Customizable Buttons (min,max,close)<br />
| Using a Glass-like window background<br />
|-<br />
| Custom Minimize, Max, Close Buttons<br />
| Auto. Current theme's skin (fixed position)<br />
|-<br />
| Drag Fx window using Tab-bar background<br />
| Enable<br />
|-<br />
| Alternative hide-titlebar feature<br />
| Use<br />
|}<br />
<br />
The extension [https://addons.mozilla.org/firefox/addon/classicthemerestorer/ Classic Theme Restorer] provides more tweaking options to get the best result (e.g. set tab height to 28px, enable/disable toolbars/buttons, etc.).<br />
<br />
==== Auto-hide Bookmarks Toolbar ====<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userChrome.css|<br />
#PersonalToolbar {<br />
visibility: collapse !important;<br />
}<br />
<br />
#navigator-toolbox:hover > #PersonalToolbar {<br />
visibility: visible !important;<br />
}<br />
}}<br />
<br />
==== Remove sidebar width restrictions ====<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userChrome.css|<br />
/* remove maximum/minimum width restriction of sidebar */<br />
#sidebar {<br />
max-width: none !important;<br />
min-width: 0px !important;<br />
}<br />
}}<br />
<br />
==== Unreadable input fields with KDE Breeze Dark theme ====<br />
If you are using [[KDE]] desktop in conjunction with Breeze Dark theme, you might find that some input fields have dark background, which makes text unreadable. A solution to this issue is to use a non-dark GTK theme along with a dark Firefox theme. Similarly, by using a dark Firefox theme your browser will look the way you want (requires Firefox 56 or later).<br />
<br />
=== Web content CSS settings ===<br />
This section deals with the {{ic|userContent.css}} file in which you can add custom CSS rules for web content. Changes to this file will take effect once the browser is restarted.<br />
<br />
This file can be used for making small fixes or to apply personal styles to frequently visited websites. Custom stylesheets for popular websites are available from sources such as [http://userstyles.org/ userstyles.org]. You can install an add-on such as [https://addons.mozilla.org/firefox/addon/superusercontent/ superUserContent] to manage themes. This add-on creates the directory {{ic|chrome/userContent.css.d}} and applies changes to the CSS files therein when the page is refreshed.<br />
<br />
==== Import other CSS files ====<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userContent.css|<br />
@import url("./imports/some_file.css");<br />
}}<br />
<br />
==== Block certain parts of a domain ====<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userContent.css|<br />
@-moz-document domain(example.com) {<br />
div#header {<br />
background-image: none !important;<br />
} <br />
}<br />
}}<br />
<br />
==== Add [pdf] after links to PDF files ====<br />
{{hc|~/.mozilla/firefox/<profile_dir>/chrome/userContent.css|<nowiki><br />
/* add '[pdf]' next to links to PDF files */<br />
a[href$=".pdf"]:after {<br />
font-size: smaller;<br />
content: " [pdf]";<br />
}</nowiki><br />
}}<br />
<br />
==== Block ads ====<br />
<br />
See [http://www.floppymoose.com floppymoose.com] for an example of how to use {{ic|userContent.css}} as a basic ad-blocker.<br />
<br />
== Mouse and keyboard ==<br />
<br />
=== Mouse wheel scroll speed ===<br />
<br />
To modify the default values (i.e. speed-up) of the mouse wheel scroll speed, go to {{ic|about:config}} and search for {{ic|mousewheel.acceleration}}. This will show the available options, modifying the following:<br />
<br />
* Set {{ic|mousewheel.acceleration.start}} to {{ic|-1}}.<br />
* Set {{ic|mousewheel.acceleration.factor}} to the desired number ({{ic|10}} to {{ic|20}} are common values).<br />
<br />
Mozilla's recommendation for increasing the mousewheel scroll speed is to:<br />
<br />
* Set {{ic|mousewheel.default.delta_multiplier_y}} between {{ic|200}} and {{ic|500}} (default: {{ic|100}})<br />
<br />
Alternatively you can install the [http://smoothwheel.mozdev.org/ SmoothWheel add-on].<br />
<br />
=== Pixel-perfect trackpad scrolling ===<br />
<br />
To enable one-to-one trackpad scrolling (as can be witnessed with GTK3 applications like Nautilus), set the {{ic|1=MOZ_USE_XINPUT2=1}} [[environment variable]] before starting Firefox.<br />
<br />
If scrolling is undesirably jerky, try enabling Firefox's "Smooth Scrolling" option in Preferences > Advanced.<br />
<br />
=== Enable touchscreen gestures ===<br />
<br />
Make sure {{ic|dom.w3c_touch_events.enabled}} is either set to 1 (''enabled'') or 2 (''default, auto-detect'').<br />
<br />
Run {{ic|1=export MOZ_USE_XINPUT2=1|2==}} before launching Firefox. To make this change persistent, add that command to {{ic|/etc/profile.d/firefox.sh}}.<br />
<br />
=== Mouse click on URL bar's behavior ===<br />
<br />
To make the url bar behaves like in Windows regarding mouse clicks: a single click selects everything, a double click selects a single word until a punctuation sign and a triple click selects everything again, set the following in {{ic|about:config}}:<br />
browser.urlbar.clickSelectsAll; true<br />
browser.urlbar.doubleClickSelectsAll; false<br />
layout.word_select.stop_at_punctuation; true (default)<br />
<br />
=== Set backspace's behavior ===<br />
<br />
The backspace key performs differently in Firefox in Linux, Windows or Mac. To associate it with "back one page", set {{ic|browser.backspace_action}} to {{ic|0}} in {{ic|about:config}}.<br />
<br />
=== Disable middle mouse button clipboard paste ===<br />
<br />
See [[Clipboard#Firefox]].<br />
<br />
== Miscellaneous ==<br />
<br />
=== Enable additional media codecs ===<br />
<br />
{{Expansion|This section is not completed, there are many other variables related to Media Codecs in firefox.}}<br />
<br />
Before continuing, remember there is a reason some of these variables are not enabled by default, e.g. stability, memory leaks, etc. Go to {{ic|about:config}} and check the following options:<br />
<br />
{| class="wikitable"<br />
|+ Suggested values<br />
! Key || Value || Description<br />
|-<br />
| media.mediasource.enabled || true (default) || Enable [[wikipedia:Media_Source_Extensions|Media Source Extensions]] (MSE)<br />
|-<br />
| media.mediasource.mp4.enabled || true (default) || Enable [[wikipedia:MPEG-4_Part_14|MP4]] MSE<br />
|-<br />
| media.mediasource.webm.enabled || true (default) || Enable [[wikipedia:WebM|WebM]] MSE.<br />
|-<br />
| media.mediasource.ignore_codecs || true || Enable H.264 MSE, amongst other things (This boolean key has to be created!)<br />
|}<br />
<br />
==== Widevine and Netflix/Amazon Video ====<br />
<br />
Widevine is a digital rights management tool that Netflix, Amazon Prime Video, and others use to protect their video content.<br />
<br />
The first time you visit a Widevine-enabled page Firefox will display a prompt below the address bar asking for permission to install DRM. Approve this and then wait for the "Downloading" bar to disappear, you are now able to watch videos from Netflix, Amazon Prime Video, or any other Widevine protected site.<br />
{{Note|Please make sure to check the ''Play DRM content'' option under Content-Preference.}}<br />
<br />
=== Remove full screen warning ===<br />
<br />
Warning about video displayed in full screen mode ("… is now fullscreen") can be disabled by setting {{ic|full-screen-api.warning.timeout}} to {{ic|0}} in {{ic|about:config}}.<br />
<br />
=== Change the order of search engines in the Firefox Search Bar ===<br />
<br />
To change the order search engines are displayed in:<br />
* Open the drop-down list of search engines and click ''Manage Search Engines...'' entry.<br />
* Highlight the engine you want to move and use ''Move Up'' or ''Move Down'' to move it. Alternatively, you can use drag-and-drop.<br />
<br />
=== "I'm Feeling Lucky" mode ===<br />
<br />
Some search engines have a "feeling lucky" feature. For example, Google has "I'm Feeling Lucky", and DuckDuckGo has "I'm Feeling Ducky".<br />
<br />
To activate them, search for {{ic|keyword.url}} in {{ic|about:config}} and modify its value (if any) to the URL of the search engine. <br />
<br />
For Google, set it to:<br />
{{bc|<nowiki>https://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=</nowiki>}}<br />
For DuckDuckGo, set it to:<br />
{{bc|<nowiki>https://duckduckgo.com/?q=\</nowiki>}}<br />
<br />
=== Secure DNS with DNSSEC validator ===<br />
<br />
You can enable [[DNSSEC]] support for safer browsing.<br />
<br />
=== Adding magnet protocol association ===<br />
<br />
# In {{ic|about:config}} set {{ic|network.protocol-handler.expose-all}} to {{ic|false}} (you can double-click to do this quickly).<br />
# The next time you open a magnet link, you will be prompted with a ''Launch Application'' dialogue.<br />
# Select your chosen torrent client.<br />
# In {{ic|about:config}} set {{ic|network.protocol-handler.expose-all}} back to {{ic|true}}.<br />
<br />
=== Prevent accidental closing ===<br />
<br />
The [https://addons.mozilla.org/firefox/addon/disable-ctrl-q-shortcut/ Disable Ctrl-Q Shortcut] extension can be installed to prevent unwanted closing of the browser.<br />
<br />
An alternative is to add a rule in your window manager configuration file. For example in [[Openbox]] add:<br />
<keybind key="C-q"><br />
<action name="Execute"><br />
<execute>false</execute><br />
</action><br />
</keybind><br />
in the ''<keyboard>'' section of your {{ic|~/.config/openbox/rc.xml}} file.<br />
{{Note|This will be effective for every application used under a graphic server.}}<br />
<br />
=== Plugins do not work with latest version ===<br />
<br />
There can be compatibility issues with plugins not working with the latest Firefox version (e.g. [http://5digits.org/pentadactyl/index Pentadactyl]). If possible, try installing the nightly/beta builds available, or temporarily [[downgrade]] Firefox.<br />
<br />
[https://addons.mozilla.org/firefox/addon/checkcompatibility/ Disable Add-on Compatibility Checks] plugin should take care of spurious compatibility issues when the plugins get disabled, even though they work just fine with the new version.<br />
<br />
=== Jerky or choppy scrolling ===<br />
<br />
Scrolling in Firefox can feel "jerky" or "choppy". A post on [http://forums.mozillazine.org/viewtopic.php?f=8&t=2749475/ MozillaZine] gives settings that work on Gentoo, but reportedly work on Arch Linux as well: <br />
<br />
# Set {{ic|mousewheel.min_line_scroll_amount}} to 40<br />
# Set {{ic|general.smoothScroll}} and {{ic|general.smoothScroll.pages}} to '''false'''<br />
# Set {{ic|image.mem.min_discard_timeout_ms}} to something really large such as 2100000000 but no more than 2140000000. Above that number Firefox will not accept your entry and complain with the error code: "The text you entered is not a number." <br />
# Set {{ic|image.mem.max_decoded_image_kb}} to at least 512K<br />
<br />
Now scrolling should flow smoothly.<br />
<br />
=== Run Firefox inside an nspawn container ===<br />
<br />
{{Move|systemd-nspawn|This is potentially useful for any browser, so... move back?}}<br />
<br />
Note: on newer systems, you must enable local access to the user xserver with 'xhost local:root'<br />
<br />
To run as PID 1<br />
<br />
# systemd-nspawn --setenv=DISPLAY=:0 \<br />
--setenv=XAUTHORITY=~/.Xauthority \<br />
--bind-ro=$HOME/.Xauthority:/root/.Xauthority \<br />
--bind=/tmp/.X11-unix \<br />
-D ~/containers/firefox \<br />
firefox<br />
<br />
Else rather boot the container, with systemd ideally setting up your networking with [[systemd-networkd]]:<br />
<br />
# systemd-nspawn --bind-ro=$HOME/.Xauthority:/root/.Xauthority \<br />
--bind=/tmp/.X11-unix \<br />
-D ~/containers/firefox \<br />
--network-veth -b<br />
<br />
{{Note|There is [https://github.com/systemd/systemd/issues/7093 a bug] in systemd version 235 that causes /tmp/.X11-unix to disappear from the filesystem when doing this. If you're having trouble, try binding /tmp/.X11-unix read-only instead: {{ic|--bind-ro<nowiki>=</nowiki>/tmp/.X11-unix}} }}<br />
<br />
Once your container is booted, run the Xorg binary like so:<br />
<br />
# systemd-run -M firefox --setenv=DISPLAY=:0 firefox<br />
<br />
=== Show search matches position in scroll bar ===<br />
<br />
This chrome feature can be achieved via [https://addons.mozilla.org/firefox/addon/findbar-tweak/ FindBar Tweak] extension.<br />
<br />
=== Disable WebRTC audio post processing ===<br />
<br />
If you are using the PulseAudio [[PulseAudio/Troubleshooting#Enable_Echo.2FNoise-Cancelation|module-echo-cancel]], you probably don't want Firefox to do additional audio post processing.<br />
<br />
To disable audio post processing, change the value of the following preferences to {{ic|false}}:<br />
<br />
* {{ic|media.getusermedia.aec_enabled}} (Acoustic Echo Cancellation)<br />
* {{ic|media.getusermedia.agc_enabled}} (Automatic Gain Control)<br />
* {{ic|media.getusermedia.noise_enabled}} (Noise suppression)<br />
<br />
== See also ==<br />
<br />
* [http://kb.mozillazine.org/Knowledge_Base MozillaZine Wiki]<br />
* [http://kb.mozillazine.org/About:config_entries about:config entries MozillaZine article]<br />
* [http://linuxtidbits.wordpress.com/2009/08/01/better-fox-cat-and-weasel/ Firefox touch-ups that might be desired]</div>Jamespole