How to add a custom user-agent string to Konqueror
You can easily set a custom user-agent string for a specific site through a predefined list of user-agent strings. If you want to define your own custom user-agent string I did not find a gui for that. The solution I found is the following. Launch your favorite text editor and open the file
~/.kde/config/kio_httprc
Just add two lines to the file. Here is an example. I wanted Konqueror to identify as an iPhone for m.podcast.de. The original iPhone has the following user-agent string:
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
So I added the following two lines to the file
[m.podcast.de]
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
That’s all. Save the file. Relaunch Konqueror and you are done!
Don't miss a post with our RSS feed! Or get free updates by email.
7 Responses to “How to add a custom user-agent string to Konqueror”
March 29th, 2008 saat: 4:56 pm
[...] the article How to add a custom user-agent string to Konqueror on Linux [...]
July 16th, 2008 saat: 8:12 pm
[...] – bookmarked by 2 members originally found by iluis on July 11, 2008 How to add a custom user-agent string to Konqueror http://www.linux-showroom.com/2008/03/29/how-to-add-a-custom-user-agent-string-to-konqueror.html – [...]
March 20th, 2009 saat: 6:22 pm
This Doesnt Work In Konqueror 4.2. Only for Older Versions Of Konqueror, Right?
March 20th, 2009 saat: 9:15 pm
It got even easier with KDE4 and the newest Konqueror. There is now a graphical menu entry you can use to send custom user agent strings to selected websites. Just go into Settings -> Set up Konqueror -> Surf the web -> Browser identification -> Site / domain specific setting -> Add.
The naming of the menu entries will differ as I just translated it from German. I hope you find it anyway.
March 28th, 2009 saat: 5:06 pm
i mean adding a custom agent string like safari 4 or something.
but never mind i found out it was an error in this article
the file to edit is:
~/.kde/share/config/kio_httpr
not:
~/.kde/config/kio_httprc
March 28th, 2009 saat: 8:28 pm
Thank you Kalar for this update!
May 4th, 2009 saat: 10:07 am
Another minor syntax bit– the correct format (at least in Centos5) for ~/.kde/share/config/kio_httprc:
[m.podcast.de]
UserAgent=Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
Leave a Reply