Firefox: Difference between revisions

imported>Patryk27
mNo edit summary
imported>Wackbyte
formatting
Line 90: Line 90:
</syntaxhighlight>
</syntaxhighlight>
* If you are not using Sway you can remove the 'XDG_CURRENT_DESKTOP = "sway";' line
* If you are not using Sway you can remove the 'XDG_CURRENT_DESKTOP = "sway";' line
* Ensure that the environment variables are correctly set for the user systemd units. E.g.:<syntaxhighlight lang="shell">
* Ensure that the environment variables are correctly set for the user systemd units. E.g.:<syntaxhighlight lang="bash">
# Sway users might achieve this by adding the following to their Sway config file
# Sway users might achieve this by adding the following to their Sway config file
# This ensures all user units started after the command (not those already running) set the variables
# This ensures all user units started after the command (not those already running) set the variables
Line 155: Line 155:


=== Enabling [https://community.kde.org/Plasma/Browser_Integration#How_to_install Plasma Browser Integration]  ===
=== Enabling [https://community.kde.org/Plasma/Browser_Integration#How_to_install Plasma Browser Integration]  ===
1. Add following line to your configuration.nix:
1. Add the following line to your configuration.nix:
<code>nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;</code>
 
<syntaxhighlight lang="nix">
nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;
</syntaxhighlight>


If you're wondering where this part is coming from see [https://nixos.org/nixos/manual/#sec-customising-packages NixOS Manual:Customising Packages]
If you're wondering where this part is coming from see [https://nixos.org/nixos/manual/#sec-customising-packages NixOS Manual:Customising Packages]


2. Install KDE's Firefox extension: [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/ Link]
2. Install [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/ KDE's Firefox extension].


=== Use xinput2 ===
=== Use xinput2 ===
Line 167: Line 170:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  environment.sessionVariables = {
environment.sessionVariables = {
    MOZ_USE_XINPUT2 = "1";
  MOZ_USE_XINPUT2 = "1";
  };
};
</syntaxhighlight>
</syntaxhighlight>


== Troubleshooting==
== Troubleshooting==


===If you can't start the browser because of a configuration error.===  
=== If you can't start the browser because of a configuration error ===  


For example:  
For example:  


<syntaxhighlight>
<syntaxhighlight lang="text">
firefox
firefox
1554035168269 Marionette FATAL Error de análisis XML: entidad indefinida
1554035168269 Marionette FATAL Error de análisis XML: entidad indefinida
Line 184: Line 187:
Línea 2526, columna 13:            <toolbarbutton id="tracking-protection-preferences-button"
Línea 2526, columna 13:            <toolbarbutton id="tracking-protection-preferences-button"
JavaScript error: resource:///modules/aboutpages/AboutPrivateBrowsingHandler.jsm, line 28: TypeError: this.pageListener is undefined
JavaScript error: resource:///modules/aboutpages/AboutPrivateBrowsingHandler.jsm, line 28: TypeError: this.pageListener is undefined
</syntaxhighlight>
</syntaxhighlight>
 
An easy way to get away from this is to start firefox with the <code>firefox -safe-mode</code> command. Then you can troubleshoot your actual problem or you can call your luck by calling the refresh option (a special button will appear when firefox starts in this mode). This will reset your configuration to a sane state and you will be usually able to start the browser again, but you will lose most of your customization.


An easy way to get away from this is to start firefox with the <syntaxhighlight>firefox -safe-mode </syntaxhighlight> command. Then you can troubleshoot your actual problem or you can call your luck by calling the refresh option (a special button will appear when firefox starts in this mode). This will reset your configuration to a sane state and you will be usually able to start the browser again, but you will lose most of your customization.
=== <code>nativeMessagingHosts</code> don't work ===


=== nativeMessagingHosts don't work ===
such as <code>enablePlasmaBrowserIntegration</code>, <code>enableGnomeExtensions</code>, and <code>enableBrowserpass</code>.
such as enablePlasmaBrowserIntegration, enableGnomeExtensions, and enableBrowserpass


They do not work with the firefox-bin derivation<ref>https://github.com/NixOS/nixpkgs/issues/47340#issuecomment-476368401</ref> or with firefox installed via nix-env
They do not work with the <code>firefox-bin</code> derivation<ref>https://github.com/NixOS/nixpkgs/issues/47340#issuecomment-476368401</ref> or with <code>firefox</code> installed via <code>nix-env</code>


<hr />
<hr />