Saving User Agents
Posted by: noob
Date: August 06, 2008 12:52AM

Is there a way to save user agent strings in K-Meleon 1.5 RC as can be done in Firefox 3.0.1? I have several to save and select without having to delete, copy and paste the way I do in K-M 1.5 RC now.

Re: Saving User Agents
Posted by: desga2
Date: August 06, 2008 10:27AM

Yes, you can. Go to menu Edit -> Configuration -> Browser Configuration (or go to URL about:config). Accept confirmation to access and filter by "useragent".
Look the pair of prefs as this:
kmeleon.privacy.useragent2.name
kmeleon.privacy.useragent2.string

To add a new user agent string you must add other pair of this prefs, for example;
kmeleon.privacy.useragent3.name
kmeleon.privacy.useragent3.string

1) Do right click over "kmeleon.privacy.useragent2.name" in pref list and select "Copy Name" option.

2) Do right click over anywhere of pref list and select "New -> String".

3) Paste the name copied before (Ctrl+V or right click Paste), change the number in the string pasted (in the example "2" by next "3") and press OK.

4) Now the value to this new pref is solicited. Write the name for user agent that you like (for example; "Opera" or "My UserAgent").

Press enter in filter bar to refresh and view the new pref created.
And now the same for User Agent string value:

1) Do right click over "kmeleon.privacy.useragent2.string" in pref list and select "Copy Name" option.

2) Do right click over anywhere of pref list and select "New -> String".

3) Paste the name copied before (Ctrl+V or right click Paste), change the number in the string pasted (in the example "2" by next "3") and press OK.

4) Now the value to this new pref is solicited. Write the user agent string for name before (for example; "Opera/9.51 (Windows NT 5.1; U; en)").

Remember that you can modify this pref values in anytime with right click over it and select "Modify" option.

The changes in user agent strings are immediate in the "Preferences" panel (F2) -> "Privacy & Security" (section) -> "Paranoia" (tab). But need restart K-Meleon to view in menu Tools -> User Agent.

This pref are saved in your profile "prefs.js" file, if you like deleted or add it manually in "prefs.js" file (with all K-Meleon instances closed) you can search it or add it as this lines:
user_pref("kmeleon.privacy.useragent3.name", "Opera");
user_pref("kmeleon.privacy.useragent3.string", "Opera/9.51 (Windows NT 5.1; U; en)");

I'm working in an extension for K-Meleon 1.5 to do this more easy.

K-Meleon in Spanish



Edited 2 time(s). Last edit at 08/06/2008 12:03PM by desga2.

Re: Saving User Agents
Posted by: noob
Date: August 06, 2008 11:57AM

@desga2,

Thanks for posting the process to save user agents. Good luck with your K-Meleon 1.5 extension development.

Re: Saving User Agents
Posted by: guenter
Date: August 06, 2008 03:10PM

If You do complete updates of all entries for new (maybe Your own national) K-Meleon or a private version or are just lazy plus have an idea what You are doing smiling smiley take a look at:

./k-meleon/defaults/Pref/I10n.js & there is a section privacy that is the original master entry for alternative User Agents // Care: Forum breaks the original but they are long lines of js each starting with pref("kmeleon.privacy. ...

// Privacy

pref("kmeleon.privacy.useragent1.name", "Firefox 2.0.0.16");
pref("kmeleon.privacy.useragent1.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16");
pref("kmeleon.privacy.useragent2.name", "MSIE 7.0");
pref("kmeleon.privacy.useragent2.string", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)");
pref("kmeleon.privacy.useragent3.name", "Opera 9.23");
pref("kmeleon.privacy.useragent3.string", "Opera/9.23 (Windows NT 5.1; U; de)");
pref("kmeleon.privacy.useragent4.name", "SeaMonkey 1.1.11");
pref("kmeleon.privacy.useragent4.string", "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11");


K-Meleons store the National override in the same file.
German example.

pref("general.useragent.locale", "de-DE");
pref("general.useragent.contentlocale", "DE");



and store their own version info at the start of ./k-meleon/defaults/Pref/Kmeleon.js

pref("general.useragent.vendor", "K-Meleon");
pref("general.useragent.vendorSub", "1.1.6");



Edited 1 time(s). Last edit at 08/06/2008 03:12PM by guenter.

Re: Saving User Agents
Posted by: noob
Date: August 06, 2008 10:52PM

@guenter,

Thanks for the list of user agents. I wondered why Firefox and SeaMonkey were the only extra user agents in K-Meleon 1.5RC and no IE7 or Opera.

Re: Saving User Agents
Posted by: jack
Date: August 10, 2008 05:28AM

I think Guenter has said in another thread, there can be a problem with spoofing as IE but using Gecko engined browser. Something to do with websites looking for IE JavaScript if IE is the stated user agent. Why would you want to spoof Opera? I'm not aware of any websites that require only Opera as browser. I could be wrong of course.

K-Meleon forum is powered by Phorum.