Searching Mint Forums - A Better Way

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
mindhealer

Re: Searching Mint Forums - A Better Way

Post by mindhealer »

Hi, I turned a firefox bookmark into a keyword for searching the forums with the default duckduckgo search engine and it works fine.

For example, this post comes right up searching for its name.
My command: "slmf a better way"
The result page:
http://duckduckgo.com/?t=lm&q=site%3Afo ... tter%20way

The address within the "slmf" (Search Linux Mint Forums) bookmark is:

Code: Select all

http://duckduckgo.com/?t=lm&q=site%3Aforums.linuxmint.com+%s
I think the "t=lm" is the part that ties the search into the ad-revenue deal.
mindhealer

Re: Searching Mint Forums - A Better Way

Post by mindhealer »

What I mentioned in my previous reply works just as well for Chromium; there is a setting for search engines in Preferences, and the one that is default is searched from the address bar, the others are searched if you type the associated keyword.
pgmer6809
Level 4
Level 4
Posts: 228
Joined: Sun Mar 04, 2012 9:06 pm

Re: Searching Mint Forums - A Better Way - Not for me

Post by pgmer6809 »

None of the suggestions or code in this thread works for me.
I put the mint-forums.src file in both my ~/.mozilla/firefox/mwad0hks.default/searchplugins directory and in the /usr/lib/firefox-addons/searchplugins directory along with the gif file.
I tried both flavors of the .src file posted here.
I restarted firefox several times.
At no time did I get anything in the search choices except the usual Duck Duck, yahoo, etc.
pgmer6809

:?
caribriz

Re: Searching Mint Forums - A Better Way

Post by caribriz »

pgmer6809 wrote:None of the suggestions or code in this thread works for me.
I put the mint-forums.src file in both my ~/.mozilla/firefox/mwad0hks.default/searchplugins directory and in the /usr/lib/firefox-addons/searchplugins directory along with the gif file.
I tried both flavors of the .src file posted here.
I restarted firefox several times.
At no time did I get anything in the search choices except the usual Duck Duck, yahoo, etc.
pgmer6809

:?
I couldn't get it to work in LM16 Cinnamon, but this worked for me to get Firefox's search engine drop-down menu to show "Mint forums" in the search box:

In ~/.mozilla/firefox/mwad0hks.default/searchplugins folder, create a new folder named searchplugins-backup

Open searchplugins-backup folder - in there, create the file mint-forums.src containing this version:

Code: Select all

<search
    name="Mint Forums"
    method="GET"
    action="http://www.google.com/search"
    queryCharset="utf-8"
    >

    <input name="q" user>
    <input name="sitesearch" value="forums.linuxmint.com">
    </search>
Return to the folder ~/.mozilla/firefox/mwad0hks.default/searchplugins
In this folder, place the image mint-forums.gif and create a new document named mint-forums.xml which contains this text:

Code: Select all

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Mint Forums</os:ShortName>
<os:InputEncoding>utf-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,R0lGODlhEAAOAOeeAH7EN4LFPobERYbFRI3DVoHKNYzEUofHRYzFUo3HUorJSoXNO5PGX47JU4fOPY3LT5DLVJfJZZDNVIvRRZHOU47QS4/TSY/USZXSWJ/RbJ3SaKTQeKPRc6XQeaTSdqTSeKTTdqXTdZnbVp3aX6DZZZzdWafYd6nYeaPcaanZd6DfYajcdKzafaPhY6zce63cfqnfcKfjaK7ffa/ffrHfgq/gfq/gf7fck7DggbjclLHggbLhg7vcm7ndmKrmbazlcqvnbr3dnr3emr7enr/enbLlfrPlgbXkhr/hnbDqdcHhosDjncLkn7rpisbjqrXte8bjrMTlor/olsXlpcLnnMXmo7zsjcfnp8jnqMjop8jppsDuksfsoMzpr8Xtnc3pscHxkMPxls3tq9XrvcH2jMfzmtPtt8T2kNjrxtTuucr0ntXwut3ty832pM73o8/4ptH5qNz0xOHx09L6qeHyz+DzzODzzebz2tr7uej02+r04On13Or23fLy8vPy9Ov33/Tz9vXz9+744+754vH56ff39/P66/P67PH76PT67vP76/n5+ff79Pj79Pn89fv8+vr9+Pv9+Pv9+f38//z++fz++v/9//3+/P7+/f7+/v7+///+//7//v///v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAP8ALAAAAAAQAA4AAAjkADVx4tRpk6eDCD39W/iPE545cNyoKRNmi5UmXBRtWsjpzRkybcA8SQIkRosSIuxY+ucJUZwig8T88OHFiAopKC4c+reoEKUjf7TAEHTJUyRHmkhQAbQwEg0+VWZ4WrEm0Yg6WGwEWgjpxR4mLjxhyELIQpouMrb+g3QiD5IUnihcMTTBzJe0XEPcEaJhzAMWUxxEWVJDbSUObNAIGHAgAIACSkzgUOuJyAZPeuT0yHEDipMKO9T+w9QhAo8hHzyAyKBggQ7RmTIFYUDAAIIEDSBIoOOH4cJJjxoxYtRIuCRPfQICADs=</os:Image>
<os:Url type="text/html" method="GET" template="http://www.google.com/search?q={searchTerms}&sitesearch=forums.linuxmint.com">
</os:Url>
</SearchPlugin>
Restart Firefox.
Firefox Mint-forums search engine LM16 Cinnamon.png
UlotraCronic

Re: Searching Mint Forums - A Better Way

Post by UlotraCronic »

[quote="altair4"]NOTE: I've rewritten this HowTo to reflect the current changes to both Mint and Firefox.

There is something very peculiar about the search function within this forum. I often ---------------------------------SNIP2SAVE--------------------------------

None of these src files work nor the other versions of it below, Firefox 24 persists on using .xml files for this, I splattered this src file in more places then I should have. Linux Mint Petra 16, 64 bit no luck. :(

Woops posted to soon, I'll try the xml methoud tomorrow, The quick bookmark method works also. Me bad, thought all I had to do was the src file, lazy me .
mcmexico

Re: Searching Mint Forums - A Better Way

Post by mcmexico »

Would it be possible to explain with more detail how to create the "Searchplugins" directory? When I follow your path it ends with mwad0hks.default. I'm not exactly sure how or where to use the mkdir cmd create so as to accomplish the rest of the string in your example.
Thanks
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Searching Mint Forums - A Better Way

Post by altair4 »

I really regret starting this howto ................ :wink:

It looks like caribriz did all the hard work for you so all you have to do is:

Create the seachplugins directory:

Code: Select all

mkdir $HOME/.mozilla/firefox/mwad0hks.default/searchplugins
Then create the mint-forums.xml file:

Code: Select all

gedit $HOME/.mozilla/firefox/mwad0hks.default/searchplugins/mint-forums.xml
When gedit opens up to a blank file add caribriz's code:

Code: Select all

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Mint Forums</os:ShortName>
<os:InputEncoding>utf-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,R0lGODlhEAAOAOeeAH7EN4LFPobERYbFRI3DVoHKNYzEUofHRYzFUo3HUorJSoXNO5PGX47JU4fOPY3LT5DLVJfJZZDNVIvRRZHOU47QS4/TSY/USZXSWJ/RbJ3SaKTQeKPRc6XQeaTSdqTSeKTTdqXTdZnbVp3aX6DZZZzdWafYd6nYeaPcaanZd6DfYajcdKzafaPhY6zce63cfqnfcKfjaK7ffa/ffrHfgq/gfq/gf7fck7DggbjclLHggbLhg7vcm7ndmKrmbazlcqvnbr3dnr3emr7enr/enbLlfrPlgbXkhr/hnbDqdcHhosDjncLkn7rpisbjqrXte8bjrMTlor/olsXlpcLnnMXmo7zsjcfnp8jnqMjop8jppsDuksfsoMzpr8Xtnc3pscHxkMPxls3tq9XrvcH2jMfzmtPtt8T2kNjrxtTuucr0ntXwut3ty832pM73o8/4ptH5qNz0xOHx09L6qeHyz+DzzODzzebz2tr7uej02+r04On13Or23fLy8vPy9Ov33/Tz9vXz9+744+754vH56ff39/P66/P67PH76PT67vP76/n5+ff79Pj79Pn89fv8+vr9+Pv9+Pv9+f38//z++fz++v/9//3+/P7+/f7+/v7+///+//7//v///v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAP8ALAAAAAAQAA4AAAjkADVx4tRpk6eDCD39W/iPE545cNyoKRNmi5UmXBRtWsjpzRkybcA8SQIkRosSIuxY+ucJUZwig8T88OHFiAopKC4c+reoEKUjf7TAEHTJUyRHmkhQAbQwEg0+VWZ4WrEm0Yg6WGwEWgjpxR4mLjxhyELIQpouMrb+g3QiD5IUnihcMTTBzJe0XEPcEaJhzAMWUxxEWVJDbSUObNAIGHAgAIACSkzgUOuJyAZPeuT0yHEDipMKO9T+w9QhAo8hHzyAyKBggQ7RmTIFYUDAAIIEDSBIoOOH4cJJjxoxYtRIuCRPfQICADs=</os:Image>
<os:Url type="text/html" method="GET" template="http://www.google.com/search?q={searchTerms}&sitesearch=forums.linuxmint.com">
</os:Url>
</SearchPlugin>
Then restart firefox.

You don't need the intermediate steps of creating the mint-forums.src file or adding the mint-forums.gif file.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
DanielR
Level 4
Level 4
Posts: 242
Joined: Mon Sep 23, 2013 1:22 pm

Re: Searching Mint Forums - A Better Way

Post by DanielR »

Great tutorial, works perfectly .... even with the Pale Moon browser.

Thanks a lot
caribriz

Re: Searching Mint Forums - A Better Way

Post by caribriz »

altair4 wrote:I really regret starting this howto ................ :wink:

It looks like caribriz did all the hard work for you so all you have to do is:

Create the seachplugins directory:

Code: Select all

mkdir $HOME/.mozilla/firefox/mwad0hks.default/searchplugins
Then create the mint-forums.xml file:

Code: Select all

gedit $HOME/.mozilla/firefox/mwad0hks.default/searchplugins/mint-forums.xml
When gedit opens up to a blank file add caribriz's code:

Code: Select all

<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Mint Forums</os:ShortName>
<os:InputEncoding>utf-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,R0lGODlhEAAOAOeeAH7EN4LFPobERYbFRI3DVoHKNYzEUofHRYzFUo3HUorJSoXNO5PGX47JU4fOPY3LT5DLVJfJZZDNVIvRRZHOU47QS4/TSY/USZXSWJ/RbJ3SaKTQeKPRc6XQeaTSdqTSeKTTdqXTdZnbVp3aX6DZZZzdWafYd6nYeaPcaanZd6DfYajcdKzafaPhY6zce63cfqnfcKfjaK7ffa/ffrHfgq/gfq/gf7fck7DggbjclLHggbLhg7vcm7ndmKrmbazlcqvnbr3dnr3emr7enr/enbLlfrPlgbXkhr/hnbDqdcHhosDjncLkn7rpisbjqrXte8bjrMTlor/olsXlpcLnnMXmo7zsjcfnp8jnqMjop8jppsDuksfsoMzpr8Xtnc3pscHxkMPxls3tq9XrvcH2jMfzmtPtt8T2kNjrxtTuucr0ntXwut3ty832pM73o8/4ptH5qNz0xOHx09L6qeHyz+DzzODzzebz2tr7uej02+r04On13Or23fLy8vPy9Ov33/Tz9vXz9+744+754vH56ff39/P66/P67PH76PT67vP76/n5+ff79Pj79Pn89fv8+vr9+Pv9+Pv9+f38//z++fz++v/9//3+/P7+/f7+/v7+///+//7//v///v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAP8ALAAAAAAQAA4AAAjkADVx4tRpk6eDCD39W/iPE545cNyoKRNmi5UmXBRtWsjpzRkybcA8SQIkRosSIuxY+ucJUZwig8T88OHFiAopKC4c+reoEKUjf7TAEHTJUyRHmkhQAbQwEg0+VWZ4WrEm0Yg6WGwEWgjpxR4mLjxhyELIQpouMrb+g3QiD5IUnihcMTTBzJe0XEPcEaJhzAMWUxxEWVJDbSUObNAIGHAgAIACSkzgUOuJyAZPeuT0yHEDipMKO9T+w9QhAo8hHzyAyKBggQ7RmTIFYUDAAIIEDSBIoOOH4cJJjxoxYtRIuCRPfQICADs=</os:Image>
<os:Url type="text/html" method="GET" template="http://www.google.com/search?q={searchTerms}&sitesearch=forums.linuxmint.com">
</os:Url>
</SearchPlugin>
Then restart firefox.

You don't need the intermediate steps of creating the mint-forums.src file or adding the mint-forums.gif file.
You are absolutely right altair4 - those 2 steps you indicated are not needed at all!
Thanks for cleaning that up :)

For the latest version of Firefox - version 34 - the Search Box has been redesigned, but the Mint forums search method posted above is still working - see here:
http://forums.linuxmint.com/viewtopic.p ... 74#p953664
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Searching Mint Forums - A Better Way

Post by altair4 »

You can also revert back to the way the search bar used to work: Restore Firefox Search Bar Functionality
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
helloimustbegoing

Re: Searching Mint Forums - A Better Way

Post by helloimustbegoing »

I don't like using Google. Can template="http://www.google.com/search?q={searchT ... uxmint.com" be changed to:

template="http://www.duckduckgo.com/search?q={sea ... uxmint.com" ?

Is there anything else in the code that would need changed?
helloimustbegoing

Re: Searching Mint Forums - A Better Way

Post by helloimustbegoing »

I got impatient waiting for an answer and went ahead and tried it (see my previous post; subbing duckduckgo for google). It didn't work. Anyone know why, and how I can get it to work with DDG? I simply refuse to use Google.
caribriz

Re: Searching Mint Forums - A Better Way

Post by caribriz »

helloimustbegoing wrote:I don't like using Google. Can template="http://www.google.com/search?q={searchT ... uxmint.com" be changed to:

template="http://www.duckduckgo.com/search?q={sea ... uxmint.com" ?

Is there anything else in the code that would need changed?

....

I got impatient waiting for an answer and went ahead and tried it (see my previous post; subbing duckduckgo for google). It didn't work. Anyone know why, and how I can get it to work with DDG? I simply refuse to use Google.
I had a play with it again :)

Just changing google to duckduckgo didn't work for me either. I don't know why - I'm no expert :lol:
I experimented with various things and this worked for me, so give this a try:

Keep everything else the same in the instructions, but change the template part of the code at the end to read:

Code: Select all

<os:Url type="text/html" method="GET" template="https://duckduckgo.com/{searchTerms} site:forums.linuxmint.com">	
    </os:Url>
    </SearchPlugin>
Restart Firefox.

I don't think it's a great search result - for me, it misses some things like the original "Mint forums" search did.

If someone else comes up with a better solution, please post it.

Oh, and because I kept the Mint forums (google) search engine as well .... for the duckduckgo example above, I also changed the line in the code - towards the top:

Code: Select all

<os:ShortName>Mint Forums</os:ShortName>
to

Code: Select all

<os:ShortName>Mint Forums - duckduckgo</os:ShortName>
so I knew which was which in the dropdown list of search engines.
helloimustbegoing

Re: Searching Mint Forums - A Better Way

Post by helloimustbegoing »

caribriz wrote:
Just changing google to duckduckgo didn't work for me either. I don't know why - I'm no expert :lol:
I experimented with various things and this worked for me, so give this a try:

Keep everything else the same in the instructions, but change the template part of the code at the end to read:

Code: Select all

<os:Url type="text/html" method="GET" template="https://duckduckgo.com/{searchTerms} site:forums.linuxmint.com">   
    </os:Url>
    </SearchPlugin>
Thanks caribriz, that worked.
helloimustbegoing

Re: Searching Mint Forums - A Better Way

Post by helloimustbegoing »

Hmm, I notice that some searches return results outside of the Linux Mint forums, even though the DDG page says "Showing results for <whatever> at forums.linuxmint.com" This is in Windows; I'll try it later in Mint to see if I get the same results.

EDIT:
The same thing happens in Mint. By the way, I use Pale Moon (in both OS's), as you can see from the screenshot. But that shouldn't make a difference.
Untitled.jpg
Last edited by helloimustbegoing on Wed Nov 04, 2015 6:17 pm, edited 1 time in total.
caribriz

Re: Searching Mint Forums - A Better Way

Post by caribriz »

helloimustbegoing wrote:Hmm, I notice that some searches return results outside of Linux Mint forums, even though the DDG page says "Showing results for <whatever> at forums.linuxmint.com" This is in Windows; I'll try it later in Mint to see if I get the same results.
Yes - as I said, I didn't think it was a great result, even though it does "work".

I have no idea how to improve it. Hopefully someone else will come along with a better suggestion for the code.
helloimustbegoing

Re: Searching Mint Forums - A Better Way

Post by helloimustbegoing »

I don't know if this means anything or if it's inconsequential. If you look in my example screenshot above I did a search for grub loader. On the results page it says: Showing results for grub+loader at forums.linuxmint.com. Then I did the same search, but manually by going to the DDG website and typing in "grub loader site:forums.linuxmint.com" in the search bar. In that results page it says: Showing results for grub loader at forums.linuxmint.com, and it's only showing results in the Mint forums.

I immediately noticed that in the result page for the search plugin there is the "+" sign between grub and loader, but in the manual search there is no plus sign between those words. Does this provide a clue as to how to tweak the search plugin code so DDG will always return results only in the Mint forums?

EDIT:
I just tested the search plugin by enclosing "grub loader" within quote marks. With the quote marks I only get results in the Mint forums, just like the manual search. Intriguing.
caribriz

Re: Searching Mint Forums - A Better Way

Post by caribriz »

Had another try :)

This seems to give all results from forums.linuxmint.com now.
It probably can still be "tweaked", but I don't know how.

Try substituting this at the end of the code instead:

Code: Select all

<os:Url type="text/html" method="GET" template="https://duckduckgo.com/?q={searchTerms} site:forums.linuxmint.com">   
        </os:Url>
        </SearchPlugin>
Restarted Firefox.

Entering your search words grub loader, I then got this:

Image

This is now the same result as if you used the duckduckgo search engine in the dropdown list and typed grub loader site:forums.linuxmint.com in the search box.
Last edited by caribriz on Wed Nov 04, 2015 11:57 pm, edited 1 time in total.
helloimustbegoing

Re: Searching Mint Forums - A Better Way

Post by helloimustbegoing »

Hi caribriz. That seems to work perfectly.

Thanks.
caribriz

Re: Searching Mint Forums - A Better Way

Post by caribriz »

Glad it's working ok now.

I just tried another version after again reading the post above by mindhealer.
http://forums.linuxmint.com/viewtopic.p ... 40#p541222
mindhealer wrote: ......
I think the "t=lm" is the part that ties the search into the ad-revenue deal.
So ... this version seems to work just the same, and if :?: it gives Linux Mint some revenue, we might as well use it instead:

Code: Select all

<os:Url type="text/html" method="GET" template="https://duckduckgo.com/?t=lm&q={searchTerms} site:forums.linuxmint.com">   
        </os:Url>
        </SearchPlugin>
Anyway, both versions work.
Post Reply

Return to “Tutorials”