לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־Twitter תחת ‎@FirefoxSupport וב־Reddit תחת ‎/r/firefox.

חיפוש בתמיכה

יש להימנע מהונאות תמיכה. לעולם לא נבקש ממך להתקשר או לשלוח הודעת טקסט למספר טלפון או לשתף מידע אישי. נא לדווח על כל פעילות חשודה באמצעות באפשרות ״דיווח על שימוש לרעה״.

מידע נוסף

How do I remove nav-bar etc in Firefox 48 for all profiles?

  • 13 תגובות
  • 1 has this problem
  • 9 views
  • תגובה אחרונה מאת MartinOlsson

more options

One of my customers run an web application in Firefox and they want their users to just be able to use Firefox for that particular site. They run Firefox 42 today and we have managed to remove all the "bars" using the UserChrome.css folder. We have also applied some custom settings using the .cfg file. However, now they want to upgrade to Firefox 48 and I tried the same solution but it doesn´t work. For some reason UserChrome.css doesnt get copied to the profiles folder. If I manually copy it, it works.

In Firefox 42 the UserChrome.css is located here: C:\Program Files (x86)\Mozilla Firefox\browser\defaults\profile\Chrome

Is there any changes done to the folder structure in Firefox 48? Do you have any suggestions how I can solve this?

One of my customers run an web application in Firefox and they want their users to just be able to use Firefox for that particular site. They run Firefox 42 today and we have managed to remove all the "bars" using the UserChrome.css folder. We have also applied some custom settings using the .cfg file. However, now they want to upgrade to Firefox 48 and I tried the same solution but it doesn´t work. For some reason UserChrome.css doesnt get copied to the profiles folder. If I manually copy it, it works. In Firefox 42 the UserChrome.css is located here: C:\Program Files (x86)\Mozilla Firefox\browser\defaults\profile\Chrome Is there any changes done to the folder structure in Firefox 48? Do you have any suggestions how I can solve this?

פתרון נבחר

We decided to go with the latest ESR version that we know works with the solution we´ve created. Thanks for all your help guys!

Read this answer in context 👍 0

כל התגובות (13)

more options

userChrome.css is the correct name - no capital U.

more options

the-edmeister said

userChrome.css is the correct name - no capital U.

Thanks for your reply! I have tried to change the name aswell as you describe but the problem persists. In the solution for Firefox 42 the file is named userChrome.css.

more options

It is probably night time where Ed is. Just a couple of comments to consider in the meantime.

  1. Windows is often case insensitive in respect of file a & folder names. It will happily run FIREFOX, FireFox.Exe or firefox.exe
  2. Possibly your customer may consider upgrading to a supported Firefox45.5.1 esr instead of an unsupported Fx48. (We are currently on Fx50.0.2 Release) Although maybe the point is moot if the browser is used in a situation akin to a Kiosk and used only on a single site.

Also I am not sure I follow your explanation.

... I tried the same solution but it doesn´t work. For some reason UserChrome.css doesnt get copied to the profiles folder ....

Are the users using brand new profiles instead of existing ones ? The Chrome folder and userchrome.css do not exist by default in new profiles. Whereas if they are using an existing profile are you saying the file and folder disappear on installing Fx48 ?

more options

John99 said

It is probably night time where Ed is. Just a couple of comments to consider in the meantime.
  1. Windows is often case insensitive in respect of file a & folder names. It will happily run FIREFOX, FireFox.Exe or firefox.exe
  2. Possibly your customer may consider upgrading to a supported Firefox45.5.1 esr instead of an unsupported Fx48. (We are currently on Fx50.0.2 Release) Although maybe the point is moot if the browser is used in a situation akin to a Kiosk and used only on a single site.
Also I am not sure I follow your explanation.
... I tried the same solution but it doesn´t work. For some reason UserChrome.css doesnt get copied to the profiles folder ....

Are the users using brand new profiles instead of existing ones ? The Chrome folder and userchrome.css do not exist by default in new profiles. Whereas if they are using an existing profile are you saying the file and folder disappear on installing Fx48 ?

Thanks for you reply!

Is there any diffrence in functionality between Fx48 and Fx45 esr?

I want to achieve the following: All new Firefox profiles should have our default settings Firefox should be in a so-called kiosk mode

The problem for me is that I do not get the nav-bar etc to disappear. I try to achieve this by editing userChrome.css. This worked well in Fx42 but not in Fx48.

Once I have made my tests, I have used the new profiles. I will then remove the profile after each test I'm doing.

I hope it got a little easier to understand now.

more options

MartinOlsson said

John99 said
It is probably night time where Ed is. Just a couple of comments to consider in the meantime.
  1. Windows is often case insensitive in respect of file a & folder names. It will happily run FIREFOX, FireFox.Exe or firefox.exe
  2. Possibly your customer may consider upgrading to a supported Firefox45.5.1 esr instead of an unsupported Fx48. (We are currently on Fx50.0.2 Release) Although maybe the point is moot if the browser is used in a situation akin to a Kiosk and used only on a single site.
Also I am not sure I follow your explanation.
... I tried the same solution but it doesn´t work. For some reason UserChrome.css doesnt get copied to the profiles folder ....

Are the users using brand new profiles instead of existing ones ? The Chrome folder and userchrome.css do not exist by default in new profiles. Whereas if they are using an existing profile are you saying the file and folder disappear on installing Fx48 ?

Thanks for you reply!

Is there any diffrence in functionality between Fx48 and Fx45 esr?

I want to achieve the following: All new Firefox profiles should have our default settings Firefox should be in a so-called kiosk mode

The problem for me is that I do not get the nav-bar etc to disappear. I try to achieve this by editing userChrome.css. This worked well in Fx42 but not in Fx48.

Once I have made my tests, I have used the new profiles. I will then remove the profile after each test I'm doing.

I hope it got a little easier to understand now.

Hi all,

I just did some testing and when I upgrade from Fx42(x86) to Fx48(x64 and x86, tried both.), it doesn´t work. New profiles will not apply the settings in userChrome.css. However when I ugrade to Fx 45.5.1 ESR (x86) it works! I will ask our customer if we need to upgrade to Fx48 or if they can accept to upgrade to Fx 45 ESR instead.

Anyway it would be interesting to find out what changes are made in Firefox 48, which differs from Firefox 42. Any ideas?

more options

Hi Martin, Sorry but I am not too sure what you are actually doing. I have not personally tested upgrading from Fx42 to Fx45 or to Fx48 or 50 however if I take a current Release Fx50.0.2 and create a chrome folder in the profile and add a userChrome.css file it works as expected for me.

For instance with:

/*
* Do not remove the @namespace line -- it's required for correct functioning
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */

#urlbar-container { display:none!important; }

I may hide the URL bar.

What happens if you try Fx48 with a clean profile and add the folder and file then restart Firefox, do you still see that file and folder and does it work.

  • Are you saying that your chrome folder or userChrome.css somehow disappear from profiles when you upgrade ?
  • Or is it just one or more lines in the .css file that fails ?
  • What happens if you swap the files around, or the profiles around, between the Firefox versions. That may give a clue that the file is incorrect.

Fx42, Fx45 & Fx48 are different but I do not off-hand know of any difference affecting use of userChrome.css but I have not tried to research that because it works for me at present.

more options

Note that you can consider to add code to the mozilla.cfg file that you may already be using to check if the profile folder already has a chrome folder with the userChrome.css file.

This code should give the path of the current profile folder.

var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
var profD = Services.dirsvc.get("ProfD", Ci.nsILocalFile).path;

The mozilla.cfg file is run as a JavaScript file with full chrome privileges. Errors in the file will throw an error and abort the execution, so if necessary then use a try and catch block.

See Configuration:

more options

John99 said

Hi Martin, Sorry but I am not too sure what you are actually doing. I have not personally tested upgrading from Fx42 to Fx45 or to Fx48 or 50 however if I take a current Release Fx50.0.2 and create a chrome folder in the profile and add a userChrome.css file it works as expected for me. For instance with: /* * Do not remove the @namespace line -- it's required for correct functioning */ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */ #urlbar-container { display:none!important; } I may hide the URL bar. What happens if you try Fx48 with a clean profile and add the folder and file then restart Firefox, do you still see that file and folder and does it work.
  • Are you saying that your chrome folder or userChrome.css somehow disappear from profiles when you upgrade ?
  • Or is it just one or more lines in the .css file that fails ?
  • What happens if you swap the files around, or the profiles around, between the Firefox versions. That may give a clue that the file is incorrect.
Fx42, Fx45 & Fx48 are different but I do not off-hand know of any difference affecting use of userChrome.css but I have not tried to research that because it works for me at present.

Okay, just to clarify, my problem is just regarding new clean profiles. If I just upgrade Firefox and there is an existing profile with correct config it works.

The problem is when I use the same configuration of Firefox(Added a couple folders and files, for example Mozilla.cfg etc.) it doesn´t work. My expectations is that the "chrome" folder containing userChrome.css should be copied automatically when a new profile is created. This part don´t work for me in Fx48. If I manually copy the folder to the profile it works.

These are the things we have done to Fx42: Added Mozilla.cfg to "C:\Program Files (x86)\Mozilla Firefox" Added override.ini to "C:\Program Files (x86)\Mozilla Firefox\browser" Added local-settings.js to "C:\Program Files (x86)\Mozilla Firefox\browser\defaults\preferences" Added userChrome.css to "C:\Program Files (x86)\Mozilla Firefox\browser\defaults\profile\chrome"

This configuration works with Firefox ESR 45.5.1, but not with Firefox 48.0.2.

When a user starts Firefox the first time the chrome folder should be copied to the profile, but for some reason it won´t with Firefox 48.0.2.

more options

You may be using some deployment method I am not familiar with, but this is the part I do not understand

When a user starts Firefox the first time the chrome folder should be copied to the profile, but for some reason it won´t with Firefox 48.0.2.

When Firefox is first installed and run it either

  • Tries to find and use a prexisting profile - in which case: bookmarks, logins; userChrome.css, if applicable; & other settings are available
  • Or it creates a new profile. At one time was it up to Fx3 ? a chrome folder was created as part of a new profile, but that no longer happens.

Profile content and structure will have changed slightly as Firefox has evolved and various files have been removed, added or replaced.

Normally Firefox does not copy some random file or content from an additional profile to a new profile, it may if necessary on an upgrade or shortly thereafter modify an original profile and add new additional files. An example being the bookmarks backups. Most major changes to profile structures and files will pre-date the versions you are interested in (e.g. Fx21)

Personally I have not tried using override.ini I am guessing you use that to prevent a profile migrator prompt appearing by using

[XRE]
EnableProfileMigrator=false

I was suggesting pointing each Firefox version i.e. Fx42 Fx45esr & Fx48-50 at each of the new or existing profiles in turn

to see if they work although cor-el's last post gives a better method of testing the .css file

more options

Thanks for your answer!

To be honest I´m not sure that we use the best deployment method. Maybe you can help me find a better way? I will give you the scenario and hopefully you can guide me.

Our customer requirements are the following: Users should only be able to use Firefox with predefined shortcuts on the desktop(We create the shortcuts with group policys). Firefox should just look like a shell (See attached picture). Keyboard shortcuts needs to be configurable (Our customer has a list of Keyboard shortcuts that we need to apply to Firefox). Custom settings need to be applied to all Firefox profiles.

Is there any way to achive this?

Thanks in advance!

more options

Not sure I can add much of use here. Also not too sure what problem you are encountering that lets Fx45esr work as intended but not later Releases.

From a support perspective using ESR has advantages, the main one being it does not update often. It is also secure, critical security fixes are backported to it. Other old versions of Firefox are not secure or supported. That may matter depending on what external sites are accessed, and whether money of confidential data is involved. Also esr may support older types of Add-ons for longer, if you use add-ons of the current|older type rather than webextensions that may become an important factor.

Some of the requirements will be outside the scope of this forum, and may already have been addressed. What is to stop the user accessing the computer ? potentially they could then modify Firefox, install a separate browser, or even run an entire new OS from another device memory stick or DVD.

Your current problem seems to be that your prior customisations do not work, and I am not clear why that is. If you are not already using it you may find CCK useful, that is still free to install and use.

more options

I will look into your suggestions above and hopefully I will find a suiteable solution.

Thanks for your help so far!

more options

פתרון נבחר

We decided to go with the latest ESR version that we know works with the solution we´ve created. Thanks for all your help guys!