Firefox: Difference between revisions

From Bashlinux
Jump to navigationJump to search
Content deleted Content added
Manpaz (talk | contribs)
No edit summary
Manpaz (talk | contribs)
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
=== How to allow pop-ups ===
== Preference ==
* Edit <tt>/usr/lib/${FIREFOX_VERSION}/greprefs/all.js</tt> file and ensure the following values
=== Allow Pop-ups ===
Edit `/usr/lib/${FIREFOX_VERSION}/greprefs/all.js` file and ensure the following values
<pre><nowiki>
pref("privacy.popups.disable_from_plugins",0);
pref("privacy.popups.disable_from_plugins",0);
pref("privacy.popups.showPopupBlocker",false);
pref("privacy.popups.showPopupBlocker",false);
* Add the following values if there are not present
</nowiki></pre>

Add the following values if there are not present
<pre><nowiki>
pref("capability.principal.codebase.p0.granted", "UniversalBrowserWrite");
pref("capability.principal.codebase.p0.granted", "UniversalBrowserWrite");
pref("capability.principal.codebase.p0.id", "file://");
pref("capability.principal.codebase.p0.id", "file://");
Line 18: Line 11:
pref("privacy.popups.policy",1);
pref("privacy.popups.policy",1);
pref("privacy.popups.showBrowserMessage",false);
pref("privacy.popups.showBrowserMessage",false);
* And then ensure the following values on <tt>/usr/lib/${FIREFOX_VERSION}/defaults/pref/firefox.js</tt>
</nowiki></pre>

And then ensure the following values on `/usr/lib/${FIREFOX_VERSION}/defaults/pref/firefox.js`
<pre><nowiki>
pref("privacy.popups.firstTime",false);
pref("privacy.popups.firstTime",false);
pref("privacy.popups.showBrowserMessage",false);
pref("privacy.popups.showBrowserMessage",false);
</nowiki></pre>


=== How to disable the status bar ===

Ensure the following values are present in <tt>/usr/lib/${FIREFOX_VERSION}/greprefs/all.js</tt> file
=== Disable status bar ===
Ensure the following values are present in `/usr/lib/${FIREFOX_VERSION}/greprefs/all.js` file
<pre><nowiki>
pref("dom.disable_window_open_feature.status",false);
pref("dom.disable_window_open_feature.status",false);
pref("dom.disable_window_status_change",true);
pref("dom.disable_window_status_change",true);

</nowiki></pre>
=== How to run firefox with password protection ===
The following procedure ensures Firefox will be launched after prompt him for his own password, this is handled by PAM.
* Move firefox to <tt>sbin</tt> folder and then link it back to its original place
mv /usr/bin/firefox /usr/sbin/firefox
ln -s /usr/bin/consolehelper /usr/bin/firefox
* Create a security file on <tt>/etc/security/console.apps/firefox</tt> with the following code
USER=<user>
PROGRAM=/usr/sbin/firefox
SESSION=true
* Create a PAM file on <tt>/etc/pam.d/firefox</tt> with the following entries
#%PAM-1.0
auth sufficient pam_rootok.so
auth sufficient pam_timestamp.so
auth include system-auth
account required pam_permit.so
session required pam_permit.so
session optional pam_xauth.so
session optional pam_timestamp.so

=== Fedora 12 and newer versions ===
* The security file on <tt>/etc/security/console.apps/firefox</tt> looks like
USER=<user>
PROGRAM=/usr/sbin/virt-manager
SESSION=true
. config-util
* The PAM file on <tt>/etc/pam.d/firefox</tt> looks like
#%PAM-1.0
auth include config-util
account include config-util
session include config-util

Latest revision as of 05:52, 12 June 2015

How to allow pop-ups

  • Edit /usr/lib/${FIREFOX_VERSION}/greprefs/all.js file and ensure the following values
pref("privacy.popups.disable_from_plugins",0);
pref("privacy.popups.showPopupBlocker",false);
  • Add the following values if there are not present
pref("capability.principal.codebase.p0.granted", "UniversalBrowserWrite");
pref("capability.principal.codebase.p0.id", "file://");
pref("capability.principal.codebase.p0.subjectName", ""); 
pref("privacy.popups.firstTime",false);
pref("privacy.popups.policy",1);
pref("privacy.popups.showBrowserMessage",false);
  • And then ensure the following values on /usr/lib/${FIREFOX_VERSION}/defaults/pref/firefox.js
pref("privacy.popups.firstTime",false);
pref("privacy.popups.showBrowserMessage",false);

How to disable the status bar

Ensure the following values are present in /usr/lib/${FIREFOX_VERSION}/greprefs/all.js file

pref("dom.disable_window_open_feature.status",false);
pref("dom.disable_window_status_change",true);

How to run firefox with password protection

The following procedure ensures Firefox will be launched after prompt him for his own password, this is handled by PAM.

  • Move firefox to sbin folder and then link it back to its original place
mv /usr/bin/firefox /usr/sbin/firefox
ln -s /usr/bin/consolehelper /usr/bin/firefox
  • Create a security file on /etc/security/console.apps/firefox with the following code
USER=<user>
PROGRAM=/usr/sbin/firefox
SESSION=true
  • Create a PAM file on /etc/pam.d/firefox with the following entries
#%PAM-1.0
auth sufficient pam_rootok.so
auth sufficient pam_timestamp.so
auth include system-auth
account required pam_permit.so
session required pam_permit.so
session optional pam_xauth.so
session optional pam_timestamp.so

Fedora 12 and newer versions

  • The security file on /etc/security/console.apps/firefox looks like
USER=<user>
PROGRAM=/usr/sbin/virt-manager
SESSION=true
. config-util
  • The PAM file on /etc/pam.d/firefox looks like
#%PAM-1.0
auth            include         config-util
account         include         config-util
session         include         config-util