LinuxQuestions.org
Review your favorite Linux distribution.
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 10-19-2016, 05:16 AM   #1
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,470
Blog Entries: 2

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Post useragent on Seamonkey browser for Slackware logo on LQ


I've searched and only found matching but obsolete and closed threads.

this topic is solved (will mark it so ASAP)
this thread can also be closed as well.

It's only merely for reference.

HOWTO change the reported browser agent to reflect Slackware GNU/Linux.
Convenient here on LQ and on distrowatch


tested on Seamonkey 2.40 and Firefox v45.0

go to here first: online user agent checker

copy and paste Your own current user agent string, have it handy (gvim comes to mind)

navigate to
Code:
about:config
input on the filter
Code:
useragent
to reduce the list a bit

right click and select new->string
input:
Code:
general.useragent.override
then it asks for the string, copy and paste Your original string (you saved it didn't you?)
mine was:
Code:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
for firefox
then edit it to something like this:
Code:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 Slackware64/14.2
NOTE:
Having the appropriate correct user agent and a updated browser is a security measure.
Having an wrong user agent can lead to security issues, bot positive and negative.
You have been warned.

Enjoy Slackware logo on our posts
 
Old 10-19-2016, 06:40 AM   #2
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,212

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
Sweet, I was wondering how that Slackware logo got there
 
Old 10-19-2016, 07:07 AM   #3
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,212

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
You could also use an addon like Custom UserAgent String to set the user-agent on a per-site basis.
 
Old 10-19-2016, 08:25 AM   #4
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,470

Original Poster
Blog Entries: 2

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Okay, all go edit useragent now and go hit distrowatch.com :^)
 
1 members found this post helpful.
Old 10-19-2016, 08:31 AM   #5
af7567
Member
 
Registered: Nov 2012
Posts: 281

Rep: Reputation: 97
I just installed the user agent switcher firefox extension to add the Slackware part (because I wasn't sure what the default useragent was meant to be ). I am wondering what will happen when firefox is updated though? I guess I would need to change the user agent manually after each firefox upgrade.
 
Old 10-19-2016, 09:01 AM   #6
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,212

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
Quote:
Originally Posted by af7567 View Post
I just installed the user agent switcher firefox extension to add the Slackware part (because I wasn't sure what the default useragent was meant to be ). I am wondering what will happen when firefox is updated though? I guess I would need to change the user agent manually after each firefox upgrade.
Yeah I noticed that, the version numbers appear to be static parts of the string. Although I changed it for linuxquestions.org only (since I just like the Slackware icon on the posts), so I can live with the user-agent string being out of date for one site only There may be better addons though.

Last edited by drgibbon; 10-19-2016 at 11:10 AM.
 
Old 10-19-2016, 01:10 PM   #7
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,470

Original Poster
Blog Entries: 2

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Or, "roll Your own" as we Slackers do
 
Old 10-20-2016, 08:45 AM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by SCerovec View Post
Okay, all go edit useragent now and go hit distrowatch.com :^)
I know this was kinda tongue in cheek, but distrowatch tracks hits on the individual distro pages, not the useragent of the browsers visiting the site. So changing your useragent won't affect Slackware's rankings.

Quote:
[The statistics] simply show the number of times a distribution page on DistroWatch.com was accessed each day, nothing more.

SOURCE: http://distrowatch.com/dwres.php?resource=popularity
 
Old 10-20-2016, 12:16 PM   #9
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,470

Original Poster
Blog Entries: 2

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
I see, then we need dial Slackware into our speed dial plugin?
O.o
 
Old 11-07-2016, 10:12 AM   #10
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,470

Original Poster
Blog Entries: 2

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
I frequently visit this thread lately
 
Old 11-08-2016, 07:32 AM   #11
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
There is another way to skin this cat.

Both Firefox and SeaMonkey recognize and will use a file, user.js, in .mozilla/firefox/*.default directory for Firefox and .mozilla/seamonkey/*.default directory for SeaMonkey.

For Firefox ESR 45.4.0 (the stable version in Slackware) user.js looks like this:
Code:
cat user.js
user_pref("general.useragent.override", "Mozilla/5.0 (X11; Slackware Linux x86_64; rv:45.4) Gecko/20100101 Firefox/45.4");
When there is a version change, click Help then About Firefox to see the version number and simply change the values in user.js (there are two).

The same file for SeaMonkey looks like this:
Code:
cat user.js 
user_pref("general.useragent.override", "Mozilla/5.0 (X11; Slackware Linux x86_64; rv:2.40) Gecko/20100101 SeaMonkey/2.40");
Those files do not vanish when you install an update but you do need to manually edit the version number.

I would be nice if Slackware embedded the string in the package, but that would violate the unfooled-areound-with rule (like "branding") but that ain't gonna happen methinks.

This is the easiest way I've found to get the logo to appear in LQ.

Hope this helps some.
 
1 members found this post helpful.
Old 11-08-2016, 08:36 AM   #12
slalik
Member
 
Registered: Nov 2014
Location: Moscow
Distribution: Slackware
Posts: 233

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by tronayne View Post
Those files do not vanish when you install an update but you do need to manually edit the version number.
So, it's easier to put version 45.0 instead of 45.4. Firefox 45.4.0esr has the following useragent string:
Code:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
This way changing of this string will be need only when the major version changes.
 
Old 11-08-2016, 09:52 AM   #13
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,470

Original Poster
Blog Entries: 2

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Question

Interesting thing would be to extract this string from said browser?
therefrom it would be next to trivial to forge the new one accordingly
 
Old 11-24-2016, 10:36 PM   #14
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Thanks for the instructions.
 
Old 11-25-2016, 07:42 AM   #15
slalik
Member
 
Registered: Nov 2014
Location: Moscow
Distribution: Slackware
Posts: 233

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by SCerovec View Post
Interesting thing would be to extract this string from said browser?
therefrom it would be next to trivial to forge the new one accordingly
Documentation https://developer.mozilla.org/en-US/...-Agent/Firefox claims that number "20100101" is fixed for a Desktop browser, so the string is defined by the version of the browser. For example:
Code:
useragent=$(ls /var/log/packages/|grep -o "mozilla-firefox-[[:digit:]]*")
useragent="${useragent#mozilla-firefox-}.0"
useragent="Mozilla/5.0 (X11; Slackware Linux x86_64;; rv:$useragent) Gecko/20100101 Firefox/$useragent"
 
  


Reply

Tags
firefox, override, seamonkey, user agent, web browser


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] Pipelight is not working on SeaMonkey Browser 2.39 on Slackware 14.1 x64 glupa4e Slackware 3 12-23-2015 09:23 AM
[SOLVED] useragent setting to get Debian logo jdkaye Debian 20 12-19-2014 11:36 PM
Seamonkey and Seamonkey libs update for Slackware 13.1? Lufbery Slackware 7 08-05-2011 03:00 AM
Browser UserAgent Change For the Slackware Logo on LQ rworkman Slackware 110 09-23-2009 05:59 AM

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

All times are GMT -5. The time now is 05:25 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