LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware Icon in Firefox 11 (http://www.linuxquestions.org/questions/slackware-14/slackware-icon-in-firefox-11-a-935679/)

tronayne 03-21-2012 09:09 AM

Slackware Icon in Firefox 11
 
I'm having some trouble getting the Slackware icon to "stick" in Firefox 11.0. I have tried editing both about:config and prefs.js and can get a one-time report from http://whatsmyuseragent.com/ but the entry disappears from prefs.js when I exit and restart Firefox. Mozilla's documentation notes that what you do in about:config is saved in prefs.js.

The useragent is reported Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 (from Whats My User Agent). I've added this to prefs.js:
Code:

user_pref("general.useragent.override","Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0/ Slackware Linux");
or the same thing to about.conf and get the one-time report but the entry disappears from prefs.js after exit and restart. I've tried with and without the space between 11.0/ and Slackware Linux and pretty much everything else I can think of or that's suggested in Mozilla's documentation.

So, what the heck am I doing wrong?

tronayne 03-21-2012 09:45 AM

I think I got it fixed -- I had installed an extension, User Agent Switcher, at some point in the distant past (you know, like six months ago -- essentially eternity) that simply switched to the default user agent on every start. Who knew. I removed that extension from Firefox, add this to prefs.js
Code:

user_pref("general.useragent.override","Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0/ Slackware Linux");
and we'll see if it works.

It does.

All is well that ends, sorry to bother.

onebuck 03-21-2012 09:48 AM

Member response
 
Hi,

Should look like this;
Quote:

general.useragent.override;Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Slackware Linux
Version level will depend on FireFox level #.

colorpurple21859 03-21-2012 09:49 AM

This is what works for me
Quote:

Mozilla/5.0 (X11; Slackware Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0

onebuck 03-21-2012 10:00 AM

Member response
 
Hi,

I noticed that my upgrade to FireFox 11 was not reflected properly. I guess that general.useragent.override is not changed and one must make the edit manually.
Quote:

general.useragent.override;Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 Slackware Linux

tronayne 03-21-2012 04:58 PM

After a little more study, here's a couple of things that might be worth knowing (at least about Firefox 11.x).

If you have edited about:config, the value you enter there for general.useragent.override is saved in .mozilla/firefox/your_unique_dir/prefs.js as
Code:

user_pref("general.useragent.override", "Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 Slackware Linux");
That is, you can edit in about:config or you can directly enter the above in prefs.js using a text editor (which is what I prefer to do for what that's worth). You must exit Firefox (or Seamonkey!) before editing prefs.js with a text editor (any changes you make will be lost when Firefox closes if you don't exit it first).

If you want to know the actual, current, user agent, you can exit Firefox, delete the general.useraget.override line from prefs.js, restart Firefox and either choose Troubleshooting Information in the Help menu or go to http://whatsmyuseragen.com and either will show you the default user agent (which changes when the Firefox version is changed). After you enter the Slackware string with either about:config or in prefs.js, you can see the change the same ways.

Then it's no great trick to double-click on the displayed user agent, exit Firefox, edit the prefs.js file (or about:config) and insert that line as shown above.

This is, of course, only if you give a hoot about accurately presenting your user agent to a web site; only takes a couple of minutes to do and, as always, YMMV.

Hope this helps some.


All times are GMT -5. The time now is 06:37 PM.