Skip to content

Instantly share code, notes, and snippets.

@voyeg3r
Created January 20, 2012 10:46
Show Gist options
  • Save voyeg3r/1646665 to your computer and use it in GitHub Desktop.
Save voyeg3r/1646665 to your computer and use it in GitHub Desktop.
MOZILLA FIREFOX LOCKDOWN
#!/bin/bash
# trave opções do firefox
# file: /opt/firefox/mozilla.cfg
# References:
# http://www.pcc-services.com/kixtart/firefox-lockdown.html
# download: wget -c https://gist.github.com/raw/1646665/ -O /root/lockfirefox.sh && chmod +x $_
# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /apps/firefox/lockdown/disable_show_passwords True
######################################################
# ARQUIVO DE TRAVA DO FIREFOX #
######################################################
cat <<-EOF> /opt/firefox/mozilla.cfg
// http://kb.mozillazine.org/About:config_entries
// source: http://wpkg.org/Mozilla_Configuration
// sempre perguntar onde salvar arquivos
lockPref("browser.download.useDownloadDir", false);
lockPref("browser.download.manager.closeWhenDone", true);
// Password viewer
lockPref("pref.privacy.disable_button.view_passwords", true);
lockPref("browser.startup.homepage", "http://www.google.com.br")
// Don't show the Firefox has been upgraded page
lockPref("browser.startup.homepage_override.mstone", "ignore");
EOF
##############################################################
# O ARQUIVO QUE INDICA AO FIREFOX PARA LER O mozilla.cfg #
##############################################################
cat <<-EOF> /opt/firefox/defaults/pref/local-settings.js
pref("general.config.obscure_value", 0); // only needed if you do not want to obscure the content with ROT-13
pref("general.config.filename", "mozilla.cfg");
EOF
TARGET_USER=aluno
USER_PROFILE=`find /home/$TARGET_USER/.mozilla -iname "*\.default"`
cat <<-EOF> ${USER_PROFILE}/chrome/userChrome.css
/* Security: hide secondary Show Passwords button */
button#togglePasswords { display: none !important }
EOF
@samirfor
Copy link

samirfor commented May 17, 2018

Ainda funciona no Firefox >= 60?
Still works in Firefox >= 60?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment