8,560
edits
(Created page with "* [https://wiki.archlinux.org/index.php/Firefox Arch Wiki - 火狐浏览器(Firefox)] * Manjaro Wiki - 互联网浏览器") Tags: Mobile web edit Mobile edit |
(Updating to match new version of source page) Tags: Mobile web edit Mobile edit |
||
Line 4: | Line 4: | ||
=安装 Firefox= | =安装 Firefox= | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Firefox can be installed using the package '''firefox''' in your favorite package manager or using the command: | Firefox can be installed using the package '''firefox''' in your favorite package manager or using the command: | ||
{{UserCmd|command=pamac install firefox}} | |||
</div> | |||
=其他版本= | =其他版本= | ||
Line 24: | Line 25: | ||
|} | |} | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
=Dealing with dark GTK themes= | =Dealing with dark GTK themes= | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Some pages will be hard to read when using dark gtk themes. There are a few different ways to handle this: | Some pages will be hard to read when using dark gtk themes. There are a few different ways to handle this: | ||
* The most flexible way is to install the add-on [https://addons.mozilla.org/en-US/firefox/addon/text-contrast-for-dark-themes Text Contrast for Dark Themes] which will allow you to keep your theming but adjust it on a per page basis as needed | * The most flexible way is to install the add-on [https://addons.mozilla.org/en-US/firefox/addon/text-contrast-for-dark-themes Text Contrast for Dark Themes] which will allow you to keep your theming but adjust it on a per page basis as needed | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
* A simpler way is Preferences->Language & Appearance->Colors and uncheck "Use System Colors". The downside of this approach is that Firefox will no longer use a dark theme. | * A simpler way is Preferences->Language & Appearance->Colors and uncheck "Use System Colors". The downside of this approach is that Firefox will no longer use a dark theme. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
* We can use css to force white backgrounds with dark text and controls by editing or creating ''~/.mozilla/profile.default/chrome/userContent.css'' with the following content: | * We can use css to force white backgrounds with dark text and controls by editing or creating ''~/.mozilla/profile.default/chrome/userContent.css'' with the following content: | ||
</div> | |||
input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']):not([type='radio']), textarea, select { | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']):not([type='radio']), textarea, select { | |||
-moz-appearance: none !important; | -moz-appearance: none !important; | ||
background-color: white; | background-color: white; | ||
Line 43: | Line 52: | ||
color: white; | color: white; | ||
} | } | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
=Plasma Integration= | =Plasma Integration= | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Installing plasma Browser Integration== | ==Installing plasma Browser Integration== | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
The [https://community.kde.org/Plasma/Browser_Integration browser integration package] provides media controls, notifications and integration with krunner. You can install it with: | The [https://community.kde.org/Plasma/Browser_Integration browser integration package] provides media controls, notifications and integration with krunner. You can install it with: | ||
{{UserCmd|command=pamac install plasma-browser-integration}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Next install the [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration plasma integration add-on] in Firefox. | Next install the [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration plasma integration add-on] in Firefox. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Using the native file chooser== | ==Using the native file chooser== | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
It is possible to integrate the file chooser from plasma into Firefox giving you a more seamless experience. | It is possible to integrate the file chooser from plasma into Firefox giving you a more seamless experience. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
First ensure the packages xdg-desktop-portal and xdg-desktop-portal-kde using the command: | First ensure the packages xdg-desktop-portal and xdg-desktop-portal-kde using the command: | ||
{{UserCmd|command=pamac install xdg-desktop-portal xdg-desktop-portal-kde}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Now we need to create a customized desktop launcher by creating a copy of the distribution file with | Now we need to create a customized desktop launcher by creating a copy of the distribution file with | ||
{{UserCmd|command=mkdir -p ~/.local/share/applications}} | |||
{{UserCmd|command=cp /usr/share/applications/firefox.desktop ~/.local/share/applications/}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Next we need to edit the newly created file at ~/.local/share/applications/firefox.desktop using a [[Viewing_and_editing_configuration_files|text editor]] | Next we need to edit the newly created file at ~/.local/share/applications/firefox.desktop using a [[Viewing_and_editing_configuration_files|text editor]] | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
There are 3 edits that need to made to this file. | There are 3 edits that need to made to this file. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
replace: | replace: | ||
Exec=/usr/lib/firefox/firefox %u | Exec=/usr/lib/firefox/firefox %u | ||
with: | with: | ||
Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox %u" | Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox %u" | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
replace: | replace: | ||
Exec=/usr/lib/firefox/firefox --new-window %u | Exec=/usr/lib/firefox/firefox --new-window %u | ||
with: | with: | ||
Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --new-window %u" | Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --new-window %u" | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
replace: | replace: | ||
Exec=/usr/lib/firefox/firefox --private-window %u | Exec=/usr/lib/firefox/firefox --private-window %u | ||
with: | with: | ||
Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --private-window %u" | Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --private-window %u" | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Save and enjoy your firefox/plasma integration | Save and enjoy your firefox/plasma integration | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
=Installing Firefox directly from the Mozilla Website= | =Installing Firefox directly from the Mozilla Website= | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Generally it is better to use the version of Firefox that is available in the repos but installing Firefox directly has one advantage: Firefox will update itself automatically as soon as an update is available. | Generally it is better to use the version of Firefox that is available in the repos but installing Firefox directly has one advantage: Firefox will update itself automatically as soon as an update is available. | ||
This is great for users, who want to get the latest update as soon as possible without waiting for the next Manjaro update. | This is great for users, who want to get the latest update as soon as possible without waiting for the next Manjaro update. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Download Firefox from Mozilla== | ==Download Firefox from Mozilla== | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Download the latest Firefox in your language from here: https://www.mozilla.org/en-US/firefox/all/ | Download the latest Firefox in your language from here: https://www.mozilla.org/en-US/firefox/all/ | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Most users will download "Linux 64-bit" in your chosen language. If you are using manjaro32, download "Linux 32-bit" | Most users will download "Linux 64-bit" in your chosen language. If you are using manjaro32, download "Linux 32-bit" | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Extract the files== | ==Extract the files== | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Ensure that '''~/bin''' exists with | Ensure that '''~/bin''' exists with | ||
{{UserCmd|command=mkdir -p ~/bin}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Unpack/extract the downloaded <code>firefox-xx.x.tar.bz2</code> file to ''~/bin/'' using a graphical tool or with the ''tar'' command. Here is an example: | Unpack/extract the downloaded <code>firefox-xx.x.tar.bz2</code> file to ''~/bin/'' using a graphical tool or with the ''tar'' command. Here is an example: | ||
{{UserCmd|command=tar -xf ~/Downloads/firefox-66.0.5.tar.bz2 --directory ~/bin}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
You can now start to use Firefox by double clicking on the file (or executing it in a terminal): | You can now start to use Firefox by double clicking on the file (or executing it in a terminal): | ||
{{UserCmd|command=~/bin/firefox/firefox}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Create an icon== | ==Create an icon== | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Let's create an icon in order to start Firefox much more easily. | Let's create an icon in order to start Firefox much more easily. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Create an empty file | Create an empty file | ||
{{UserCmd|command=mkdir -p ~/.local/share/applications}} | |||
{{UserCmd|command=touch ~/.local/share/applications/firefox.desktop}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Edit the file ''~/.local/share/applications/firefox.desktop'' in your favorite editor. For a list of common editors see [[Viewing_and_editing_configuration_files|this page]] | Edit the file ''~/.local/share/applications/firefox.desktop'' in your favorite editor. For a list of common editors see [[Viewing_and_editing_configuration_files|this page]] | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Copy and paste the following code into your <code>firefox.desktop</code> file and save it: | Copy and paste the following code into your <code>firefox.desktop</code> file and save it: | ||
[Desktop Entry] | [Desktop Entry] | ||
Line 133: | Line 198: | ||
Terminal=false | Terminal=false | ||
StartupNotify=false | StartupNotify=false | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
In most Desktop Environments(DEs), Firefox will now be added to the menu. In some DEs you can click on the desktop to launch the application as well. | In most Desktop Environments(DEs), Firefox will now be added to the menu. In some DEs you can click on the desktop to launch the application as well. | ||
</div> | |||