I'm just trying to set the User Agent Switcher and I can'tfind where in prefs.js the value is set.1. I save a copy of prefs.js as prefs.js.orig2.
Free Direct Download User-Agent Switcher v1.9.3 CRX file (User-Agent-Switcher.crx). User-Agent Switcher is a free, useful and fun browser Developer Tools Extension for Chrome or Chromium based Browsers.
I start up Firefox3. I change the User Agent from whatever to whatever else.4.
I then kill Firefox5. I compare the two prefs files:$ diff prefs.js prefs.js.orig userpref('browser.cache.disk.capacity', 215040); userpref('datareporting.sessions.current.activeTicks', 1);etc.But there is nothing about the User Agent Switcher that seemsto be stored in the prefs.js file.So, if I want to set the User Agent Switcher from the commandline ahead of time (with a script probably),.where. is thepreference set that tells Firefox what User Agent to displayto nosy web sites?geo10.03.16 22:02. On 03/10/16 20:26, L.R.H.
I'm still using 98SE with FF 3.6.26, so file locations may differ, especiallyif you're using Linux, as '$ diff prefs.js prefs.js.orig' seems to say.' Some extensions are extremely simple: they don't save preferencesbecause they are used for is to toggle a setting already in Firefox'sconfiguration (per profile). I use the No-Javascript Add-on extensionand it adds nothing that can be seen in about:config. Sanity Clause said: Which of the many prefs.js are you using?It's not really what prefs.js 'I' am using, but the question is moreof.where.
does User Agent Switcher (0.7.3.1-signed).put. it's preferences.All I want to do is run a Linux script to randomly change thosepreferences so that I have about 10 different User Agent stringswhich Firefox will give to the various web sites.My use model is simple:1. I start firefox with a script2. That script modifies the user agent preference file first3.
VanguardLH said: Some extensions are extremely simple: they don't save preferences because they are used for is to toggle a setting already in Firefox's configuration (per profile).Wow. That was a great post, which will take me a lot more time togo through than to just reply to this post, so, consider this justthe initial reply.before. I read and digest your helpful URLs.Since this is just a quickie - I will reiterate that all I want todo is have the user agent string be a different (random) stringwhich is set automagically for me. Period.I don't want to manually have to mess with it.I just want the string to be different each time, and, since not allUser Agent strings work well (e.g., I find Chrome strings cause problemswhen using Firefox), I need to ensure the initial list of strings ison the order of about a dozen good ones.That's pretty much the simple use model that I want.»Q«11.03.16 09:01. Wrote: It's not really what prefs.js 'I' am using, but the question is more of.where. does User Agent Switcher (0.7.3.1-signed).put.
it's preferences. My use model is simple: 1.
I start firefox with a script 2. That script modifies the user agent preference file first 3.
And then it invokes firefoxFor that use, don't need to involve an extension for that; you canjust have the script re-write user.js to set thegeneral.useragent.override pref.L.R.H.11.03.16 09:10. »Q« said: For that use, don't need to involve an extension for that; you can just have the script re-write user.js to set the general.useragent.override pref.This is a good idea, and simple to implement, 'if' I get the syntax.1. I started Firefox with a script2. I typed about:config into the URL box3. I searched for 'general.useragent.override'4. That did not exist.5.
I created 'general.useragent.override' by right clicking 'New string'6. Enter the preference name = general.useragent.override7.
Enter string value = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.08. At the command line in the profile directory I entered:$ grep useragent prefs.js grep -v browser.uiCustomization.stateuserpref('general.useragent.override', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0');userpref('useragentswitcher.import.overwrite', false);userpref('useragentswitcher.menu.hide', false);userpref('useragentswitcher.version', '0.73');9.
So I killed Firefox and put that first line into user.js10. I started up firefox again & went to11. It failed.12. That reported:Mozilla/5.0 (X11; Linux x8664; rv:44.0) Gecko/20100101 Firefox/4CF0I need to debug further because that should have worked.Are you sure the general.useragent.override string can be set fromthe user.js file?L.R.H.11.03.16 10:47.
EE said: User Agent Switcher uses a file called useragentswitcher.xml, which is put into the profile. You can download a file already loaded with fake user agents using a link from the Options.For whatever reason, I can't seem to ever get User Agent Switcher tosimply randomly switch useragents.Since some user agents make web pages horrid, I'd want to switchautomatically between only about a dozen user agent strings.Does user agent switcher do that?I can't make it do something that simple.Maybe I'm using it wrong?L.R.H.11.03.16 10:52. EE said: I made a little mistake. The file is useragents.xml. The other one is a backup of that file.I found that file here:$HOME/firefox/defaultprofile/useragentswitcher/useragents.xmlIt contains zillions of lines of the form:useragent='Mozilla/5.0 (X11; Linux i686 on x8664; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1'useragent='Mozilla/5.0 (Maemo; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1'useragent='Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/ MG(Novarra-Vision/6.9)'useragent='Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20060702 SeaMonkey/1.5a'L.R.H.11.03.16 10:56. »Q« said: By default, it doesn't exist.
Wrote: »Q« said: For that use, don't need to involve an extension for that; you can just have the script re-write user.js to set the general.useragent.override pref. Are you sure the general.useragent.override string can be set from the user.js file?Yes. If I'd just been guessing, I would have mentioned that I wasguessing. userpref('useragentswitcher.import.overwrite', false); userpref('useragentswitcher.menu.hide', false); userpref('useragentswitcher.version', '0.73');If I were in your shoes, I'd make it work without that extension eveninstalled, then if necessary move on to making it work with theextension.VanguardLH11.03.16 17:10. Q wrote on 2016/03/11: 'L.R.H.' Wrote: VanguardLH said: Firefox's user agent setting (to override the hardcoded default) is: general.useragent.override As you noted, that does not seem to.exist. anymore, at least not through the about:config menu.
By default, it doesn't exist. You'd need to create it.According the bugzilla report, adding it does nothing.
Existing andhaving a value are ignored. The participants in the bug report say thissetting is gone. This has happened before and creating the setting anddefining it with a value does not make Firefox honor the setting.Firefox won't use it anymore. I couldn't tell in the bug report ifMozilla is bringing back that setting or sticking with site-specificonly UA overrides. So far, that bug report has status 'WONTFIX' soMozilla has yet to determine if they will bring back that setting (so itgets honored by Firefox).That is why I wonder how any UA extension would work anymore. Thosethat rely on creating and/or altering this setting will fail to functionanymore. They would have to actively modify the 'User-Agent:' HTTPheader that gets sent out.»Q«11.03.16 21:04.
In,VanguardLH wrote: Q wrote on 2016/03/11: 'L.R.H.' Wrote: VanguardLH said: Firefox's user agent setting (to override the hardcoded default) is: general.useragent.override As you noted, that does not seem to.exist. anymore, at least not through the about:config menu. By default, it doesn't exist.
You'd need to create it. This has happened before and creating the setting and defining it with a value does not make Firefox honor the setting. Firefox won't use it anymore.Currently (45.0), it works.geo11.03.16 22:23. On 03/11/16 12:55, L.R.H.
Wrote: Maybe I should uninstall the user agent switcher? (It's not automatically switching user agents anyway, so it's not working like it's supposed to work.)-here is part of why i said do not uninstall.amongst my playing with 'user.js', this is one i do believe you mayenjoy.open firefox, open 'about:config', set 'search:' to 'useragent'.locate and.insure.
settings;useragentswitcher.import.overide user set boolean trueuseragentswitcher.menu.hide user set boolean falseclose firefox.open file browser to firefox profile directory. Locate and rename yourcurrent 'user.js' file to what ever you wish. Create and paste followinginto a new 'user.js' file:=+=+=+=//fn= user.js-prefs.t004//path= /home/geo/Documents/system/mozilla/firefox//date= 2015-0311-2215//copyright= by author: g e leem - gnu gpl v.2 applies//disable daily reporting of your addon metadata to mozilla serversuserpref('extensions.getAddons.cache.enabled',false);//set user agent to blankuserpref('general.useragent.override', ' ');=+=+=+=without the '=+=+=+=' and blank lines:-)restart firefox, open a blank tab, paste this;into location bar, press enter.i know, your ip address still shows. If you want to spoof that, usea proxy server.i am still playing with user agent randomizer script.
Originally written in 2009, the review of the User Agent Switcher add-on for Firefox is still as valid as it has been. The extension is still available and compatible with recent versions of the Firefox web browser.It's 2019 and I would have thought the world wide web would be browser agnostic by now. Unfortunately there are some developers that simply can not design or code for a cross platform/browser world. Because of that, developers have had to create browser add-ons to help get around the issues.Many of you have most likely heard of the Firefox add on called User Agent Switcher. What this add on does is trick web sites into thinking your Firefox browser is something it isn't. You can even use this add-on to trick the web site into thinking you are on a different operating system. User Agent SwitcherThe only problem with this add on is that the included profiles are somewhat limited to: Internet Explorer 6, 7 and 8, Googlebot, or iPhone 3.
These are pretty outdated and fall in line with the last update date of the extension which was in 2011.This doesn't help the Linux user all that much and even Windows users cannot do a lot with these old user agents.There are times you are going to need to either see a site on a different OS/Browser combo for developing purposes or switch to a different browser just to actually access a site. Fortunately the developers of User Agent Switcher made it possible to import profiles. Let's take a look to see how this is done in Linux. Navigate through the menuThe first thing you need to do is install User Agent Switcher. This is such a simple task that most of you will know how to achieve this goal. Once the add on is installed (and Firefox is restarted), tap on the Alt-key and click on the Tools menu to reveal the new menu entry for the User Agent Switcher.Alternatively, right-click on Firefox's main toolbar and select customize. You can then drag and drop the User Agent Switcher icon to the toolbar to access it directly this way.Click on the Options entry to open up the window that will allow you to import profiles.
In the new window click on the User Agents 'tab' to open up the section that allows you to handle the imports. Add profiles hereFrom the new window (see the image to the right) click on the Import button (but do NOT click the Overwrite button or you'll lose the current profiles) to import new profiles.Once you click that button a browse window will open for you to find the profiles to import.
The next question is where do you get profiles? The best profile list I have been able to find is. Once you have the file located on your hard drive click the Import button, locate the file, and click Open.Now when you look at the listing of possible user agents you will see around 50 possible selections to use.You change user agents by selecting them using the add-on's toolbar button or the Tools menu. The selected user agent is enabled globally until you switch to another one.Final ThoughtsI am always surprised when I come across a site (when using Linux) that will not allow me to enter (or use some of their features). The fact that I have to install an add on to allow my browser user a web site rubs me the wrong way.
Rubbed or not, it is a good thing these add ons are available for die hard Linux fans. Otherwise, without User Agent Switcher, we'd be dual booting or, even worse, admitting defeat. And we all know that, for Linux users, defeat is not an option.