LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 03-25-2014, 09:23 AM   #1
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,238

Rep: Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878
Firefox User Agent Override for Slackware Logo


(Rather than adding to an old thread -- like from 2012)

I've had problems getting the Slackware logo to show up in posts here with a recent fresh install of Firefox (to clean up some 10+ years of stuff). I've done some research but really can't seem to find the "best" place to tell web sties that the operating system is Slackware Linux ('cause Pat doesn't "brand" Firefox) so that the string "Slackware" will show up (and trigger the logo in LQ, I think).

http://whatsmyuseragent.com/ shows the user agent as
Code:
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0
for the stable version of Firefox. I've added a line in the .mozilla/firefox/*.defulat/prefs.js file (without Firefox running) such that the line looks like this (it's one big long line):
Code:
user_pref("general.useragent.override", "Mozilla/5.0 (X11; Slackware Linux x86_64; rv:24.0) Gecko/20 100101 Firefox/24.0");
so that the "Slackware" string shows up (don't know if the blue ball is going to show up with this post, though).

The user agent string is automatic when Firefox connects somewhere and it changes with every version change; see http://www.useragentstring.com/pages/Firefox/. This leads me to believe that editing a general.useragent.override into the prefs.js file ain't the Right Way to get the Slackware string embedded.

Basically, adding the line to prefs.js is the same thing as using about:config and adding it there; six of one, half-dozen of the other -- what I'm wondering if there's a magic bullet somewhere that will stick "Slackware" in without having to manually edit every version change.

I can't find a better way (so far); is there a better way?

[EDIT]
Yeah, the blue ball shows up.
[/EDIT]

Last edited by tronayne; 03-25-2014 at 09:26 AM.
 
Old 03-25-2014, 10:06 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,143

Rep: Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383Reputation: 1383
Hi,

You can add the line about "useragent.override..." to ~/.mozilla/firefox/*.default/user.js

Regards
 
Old 03-25-2014, 10:53 AM   #3
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 bit -current
Posts: 450

Rep: Reputation: 149Reputation: 149
Cant you just type about:config in the address bar and search for "agent" and modify the found value? I just finished doing it to update my slackware version in the user agent string of firefox.
 
Old 03-25-2014, 12:58 PM   #4
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current
Posts: 769

Rep: Reputation: 66
There's also 'general.useragent.extra.linux' which can be set to 'Slackware'
I have to see if this works though...
.
.
.
EDIT: no, this does not work to get the Slackware ball logo :-(

Last edited by BroX; 03-25-2014 at 12:59 PM.
 
Old 03-25-2014, 04:21 PM   #5
sbolokanov
Member
 
Registered: Feb 2013
Location: abva
Distribution: Slackware
Posts: 76

Rep: Reputation: 9
I've been wondering how to do that for quiet some time. LOL
Thanks for the tips!

Last edited by sbolokanov; 03-25-2014 at 04:26 PM.
 
Old 03-25-2014, 05:27 PM   #6
enorbet
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 14 is Main OpSys on Main PC, 2ndary are OpenSuSe 13 and SolydK
Posts: 873

Rep: Reputation: 445Reputation: 445Reputation: 445Reputation: 445Reputation: 445
Although Microsoft's abandoning of Silverlight may make this obsolete, presently a few services like Netflix requires it. In order to install it via pipelight, one must spoof the useragent to show that it is a windows based browser. This is just obviously ridiculous since , once spoofed, it works great, but Oh Well, that's the predatory old MS we all know and hate.

There is a Firefox addon/extension that apparently renders a button above the toolbar that allows one to "useragent.override" on-the-fly and I was going to try that rather than just editing via about.config but hopefully that will soon be unneeded. I do miss my Blue Ball and will be glad when once again I can "hold my freak flag high". If Netflix plans to hang onto Silverlight for longer than a few months, I suppose I will have to bite the bullet and addon.

PS an oddity is that sometimes it shows as Windows 8 and others a "?" mark. I hate the eight.

Last edited by enorbet; 03-25-2014 at 05:28 PM.
 
Old 03-25-2014, 05:34 PM   #7
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 322

Rep: Reputation: 22
My useragent string is
Quote:
Opera/9.80 (Windows NT 5.1; Slackware GNU/Linux) Presto/2.12.388 Version/12.16
and as you see it perfectly works
(Yes, I know, my current OS is Windows XP, and browser Opera, but as you can see bolded string is enough to trick LQ detector)

Last edited by FeyFre; 03-25-2014 at 05:35 PM.
 
Old 03-26-2014, 07:12 AM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,238

Original Poster
Rep: Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878
I've come to believe that there isn't any real good way to get the Slackware string embedded in the user agent other than creating the file ~/.mozilla/firefox/*.default/user.js with this content all on one line:
Code:
cat .mozilla/firefox/*.default/user.js
user_pref("general.useragent.override", "Mozilla/5.0 (X11; Slackware Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0");
That is the user agent string reported by http://whatsmyuseragent.com/ with "Slackware" inserted in front of "Linux" (which is in the default user agent). This appears to be the least painful option because you aren't editing prefs.js and you have less chance of screwing it up with user.js.

You can shut down Firefox and insert that line in .mozilla/firefox/*.default/prefs.js, you can use about.config and do the same thing (except Firefox has to be running), you can do a one-time with the add-on mentioned above (the value resets with the add-on, however, when Firefox is restarted).

In any of those cases, you really should get the actual value of the user agent first from a default installation and, if you want to do it right, you'll need to do that with every Firefox update that changes the version number or any of the values; the stable version right now is 24.3.0esr but the default user agent reports 24.0 and that doesn't seem to matter. What triggered this post was web sites yammering at me that my browser was out-of-date and needed to be updated because support for that version was going to cease -- I was using the user agent from an old release, some sites actually care about version numbers and the like.

The other option is to edit the Firefox source and recompile it (bah, humbug on that).

Essentially, having that logo show up is a geeky thing -- be proud of your schools and all that sort of thing. Pat won't brand software (like everybody else does) and there's no reason to follow the pack of lemmings off the cliff; I kind of like that but I also like the geeky parts, too. I've got the T-shirts, I wear 'em and, dammit, I like to show the flag as it were.

Onward and upward!

Hope this helps some.

Last edited by tronayne; 03-26-2014 at 09:26 AM. Reason: Wish I could proof read better.
 
1 members found this post helpful.
Old 03-26-2014, 08:45 AM   #9
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,061

Rep: Reputation: 178Reputation: 178
Quote:
Originally Posted by tronayne View Post
...I've got the T-shits, I wear 'em and, dammit, I like to show the flag as it were...
aye!(except for the typo) My kingdom for a hoodie, though....

cheers,
 
Old 03-26-2014, 09:25 AM   #10
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,238

Original Poster
Rep: Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878
Quote:
Originally Posted by mrclisdue View Post
aye!(except for the typo) My kingdom for a hoodie, though....

cheers,
Dammit! I did it again.
 
Old 03-26-2014, 09:45 AM   #11
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,058

Rep: Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063
Code:
Mozilla/5.0 (X11; Slackware Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0
Personally I would not bother inserting Slackware into the UA, even though I have done it myself in the past.

The problem is that it can easily lead to site compatibility problems. During my time at Opera I have seen numerous issues logged due to seemingly innocent, minor UA tweaks. Website developers make some interesting choices about what content to display (or not display) based on UA. "Slackware Linux" in that position might not be parsed as Linux but rather an unknown OS and hence you could get bumped to a mobile version of the site (this kind of thing is fairly common) or worse, you might simply end up on an error page.

Either live with the fact that you don't get a nice logo on LQ or use an extension that allows you to make UA changes on the fly, or better yet allows you to set the value of the string on a site by site basis.
 
2 members found this post helpful.
Old 03-26-2014, 10:54 AM   #12
mattallmill
Member
 
Registered: Nov 2009
Location: Salina,Kansas
Distribution: Slackware64-current
Posts: 279

Rep: Reputation: 48
Quote:
Originally Posted by tronayne View Post
Essentially, having that logo show up is a geeky thing -- be proud of your schools and all that sort of thing. Pat won't brand software (like everybody else does) and there's no reason to follow the pack of lemmings off the cliff; I kind of like that but I also like the geeky parts, too. I've got the T-shirts, I wear 'em and, dammit, I like to show the flag as it were.
I really never thought about the user string that Firefox sends when I visit websites; they usually work well, except for that one in a billion websites than gets quirky when I visit it. However, until this post, adding 'Slackware' to the user string hadn't occurred to me. I think it's an awesome thing to do, if only for the geekness of it all. Thanks for the tip, tronayne!

Regards,

Matt
 
Old 03-26-2014, 12:59 PM   #13
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,220

Rep: Reputation: 172Reputation: 172
Quote:
Originally Posted by enorbet View Post
Although Microsoft's abandoning of Silverlight may make this obsolete, presently a few services like Netflix requires it. In order to install it via pipelight, one must spoof the useragent to show that it is a windows based browser. This is just obviously ridiculous since , once spoofed, it works great, but Oh Well, that's the predatory old MS we all know and hate.

There is a Firefox addon/extension that apparently renders a button above the toolbar that allows one to "useragent.override" on-the-fly and I was going to try that rather than just editing via about.config but hopefully that will soon be unneeded. I do miss my Blue Ball and will be glad when once again I can "hold my freak flag high". If Netflix plans to hang onto Silverlight for longer than a few months, I suppose I will have to bite the bullet and addon.

PS an oddity is that sometimes it shows as Windows 8 and others a "?" mark. I hate the eight.
Search for a firefox extension called "UAControl", with it you can set your user agent to change just for the netflix website.
 
1 members found this post helpful.
Old 03-26-2014, 01:55 PM   #14
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current
Posts: 769

Rep: Reputation: 66
Quote:
Originally Posted by moisespedro View Post
Search for a firefox extension called "UAControl", with it you can set your user agent to change just for the netflix website.
Sweet.
 
Old 03-28-2014, 09:42 AM   #15
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current with KDE 4.8.5
Posts: 308

Rep: Reputation: 38
Wink Slackware brand

Hi folks!

I normally like to recompile my kernel and adding the Slackware logo. I do like Tux and have nothing against him, but I just like better the Slackware logo. I've tried with a Subgenius Tux, but in the end the Slackware logo looks better.

As the LILO login screen (Pat himself said he couldn't resist), I think it would be a nice addition to see the Slackware logo during boottime.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Testing 1,2,3 - Slackware in User Agent? astrogeek Slackware 34 07-21-2012 01:50 AM
LXer: Is Google Burying Firefox With User Agent Strings? LXer Syndicated Linux News 2 05-06-2012 06:11 AM
Firefox - Google long search bar - font override Galib Linux - Software 1 04-02-2010 12:54 AM
user agent switching in firefox (trying to play video from ABC.com) bartonski Linux - Software 6 01-18-2010 09:35 AM
bash: all --user-agent for "wget --user-agent " frenchn00b Programming 1 07-07-2009 05:25 AM


All times are GMT -5. The time now is 10:03 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration