Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Wannan tattunawa ta zama daɗaɗɗiya. Yi sabuwar tambaya idan ka na bukatar taimako.

I want to prevent access to the Menu Bar (i.e. File, Edit, View, Tools, Help) And prevent access to restoring firefox completely.

  • 10 amsoshi
  • 2 sa na da wannan matsala
  • 15 views
  • Amsa ta ƙarshe daga DCHUNT

more options

Basically, I am setting up firefox for my Guest Account. I have already locked any download (requires my password) prevented access to add-ons and tools. Really there are only a few more things I'd like to configure.

For example when you right click at the very top of firefox it will show "Menu Bar" and "Bookmark Tab" I want to prevent users from right clicking and showing that bar and ultimately using the Help > Troubleshoot Info > Refresh Firefox, because then they could reset Firefox and gain complete access to downloading again.

Also I would like to prevent access to right clicking entirely, showing the context menu.

Basically, I am setting up firefox for my Guest Account. I have already locked any download (requires my password) prevented access to add-ons and tools. Really there are only a few more things I'd like to configure. For example when you right click at the very top of firefox it will show "Menu Bar" and "Bookmark Tab" I want to prevent users from right clicking and showing that bar and ultimately using the Help > Troubleshoot Info > Refresh Firefox, because then they could reset Firefox and gain complete access to downloading again. Also I would like to prevent access to right clicking entirely, showing the context menu.

Mafitar da aka zaɓa

cor-el said

You need to create the chrome folder and the userChrome.css file in it.
  • Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
  • Use a plain text editor like Notepad to create a (new) userChrome.css file in the chrome folder (file name is case sensitive)
  • Paste the code in the userChrome.css file in the editor window
  • Make sure that the userChrome.css file starts with the default @namespace line
  • Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css.
    Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file

How do I know what my namespace is? Where do I find this information?

Karanta wannan amsa a matsayinta 👍 0

All Replies (10)

more options

Hey Dchunt.

I found a addon, hope this will be usefull. Might solve a lot of problems. https://addons.mozilla.org/en-US/firefox/addon/public-fox/

Bradforth

more options

Bradforth said

Hey Dchunt. I found a addon, hope this will be usefull. Might solve a lot of problems. https://addons.mozilla.org/en-US/firefox/addon/public-fox/ Bradforth

I already have that and it does not support disabling the right click feature, nor does it prevent access to the menu bar. Public Fox should also implement these features and also prevent using Mozilla support to refresh Firefox.

An gyara daga DCHUNT

more options

From a little research from what I can tell it will require some CSS. This is where I have been looking.

http://forums.mozillazine.org/viewtopic.php?f=38&t=2581871

Hope this helps, it looks like a hard way of doing things but it may be the only way as I havent come across a built in option before.

Edit: Also found this. https://support.mozilla.org/en-US/questions/1011085 Good luck

An gyara daga Bradforth

more options

You can consider to use code in userChrome.css to hide some items, but userChrome.css can easily be disabled by holding down the Shift key to start Firefox in Safe Mode.

You can add code to the userChrome.css file below the default @namespace line.


@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

#toolbar-menubar,
#toggle_toolbar-menubar,
#toolbar-context-menu,
#PanelUI-help,
:-moz-any(menuitem,toolbarbutton)[oncommand="safeModeRestart();"] {
 display:none!important;
}

The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.

more options

I do not have a file called userChrome.css

more options
more options

You need to create the chrome folder and the userChrome.css file in it.

  • Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
  • Use a plain text editor like Notepad to create a (new) userChrome.css file in the chrome folder (file name is case sensitive)
  • Paste the code in the userChrome.css file in the editor window
  • Make sure that the userChrome.css file starts with the default @namespace line
  • Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css.
    Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file
more options

Zaɓi Mafita

cor-el said

You need to create the chrome folder and the userChrome.css file in it.
  • Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
  • Use a plain text editor like Notepad to create a (new) userChrome.css file in the chrome folder (file name is case sensitive)
  • Paste the code in the userChrome.css file in the editor window
  • Make sure that the userChrome.css file starts with the default @namespace line
  • Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css.
    Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file

How do I know what my namespace is? Where do I find this information?

more options

You do not need to worry about the content of the file, you can just copy the full text starting with the @namespace line in the userChrome.css file and make sure that "All files" is selected as the type and not "Text files".

more options

Thank you it worked.