LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-06-2014, 03:35 AM   #16
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194

Works for me...

Code:
about:config > general.useragent.override = Mozilla/5.0 (X11; Linux X86; rv:25.0.1) Gecko/20100101 Firefox/25.0.1 Slackware
I also have it set on my FreeBSD with Firefox 30-something same method with "FreeBSD".

But note that it does not appear when you post, only after you return to the page.

Last edited by astrogeek; 09-06-2014 at 03:37 AM.
 
Old 09-06-2014, 03:39 AM   #17
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Try again. I've put it in about:config this time. No idea why it worked on my desktop, but not my laptop.
YES! Strange.
astrogeek
See my post #13 for about:config vs prefs.js editing.

Last edited by brianL; 09-06-2014 at 03:43 AM.
 
Old 09-06-2014, 06:16 AM   #18
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Turns out there is a better way: put your override in user.js (in the profile directory, where prefs.js resides).

If you have a user agent override that works in prefs.js just exit Firefox and
Code:
grep Slackware prefs.js > user.js
then remove that line from prefs.js.

Right now, mine looks like
Code:
user_pref("general.useragent.override", "Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/24.8.0 Slackware Linux");
Restart Firefox and check the result with http://whatsmyuseragent.com/

Hope this helps some.

[EDIT]
Do the same for Seamonkey.

In either case, you can freely edit user.js (when the browser is not running) and most updates are just the version number (which you can get from about). Use a text editor.

You can find the default useragent by removing any edits you've done in prefs.js, restart the browser and go to http://whatsmyuseragent.com/ from which you can copy the user agent string into user.js. Be sure to add the user_pref("general.useragent.override", and other items as shown in the example above.
[/EDIT]

Last edited by tronayne; 09-06-2014 at 07:19 AM.
 
Old 09-06-2014, 04:19 PM   #19
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Took a little while to puzzle this out, because I was letting myself get carried astray by an existing "general.useragent.extra.firefox" attribute in my about:config (left over from older browser installations).

Setting that did nothing.

I had to right-click and select "New" to create a new attribute called "general.useragent.override". Setting that to the useragent string I wanted worked great.

Feel free to check yours using http://ciar.org/ttk/echo.cgi if you don't like the annoying advertisements and graphics on that other page. It will be in the "HTTP_USER_AGENT" environment variable.

Last edited by ttk; 09-06-2014 at 04:21 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration