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!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

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

  • 10 回覆
  • 2 有這個問題
  • 15 次檢視
  • 最近回覆由 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.

被選擇的解決方法

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?

從原來的回覆中察看解決方案 👍 0

所有回覆 (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.

由 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

由 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

選擇的解決方法

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.