搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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.