How to add Google Search and other Search Actions to the main menu of Peppermint

If any website offers a search function, then in most cases, you can integrate it in the main menu of the distribution, as a new search engine or Search Action.

Nowadays, in reality, users want the operating systems to have intelligent search functions, not only limited to the local file system but also to the Internet, enabling online information search. For example, the Peppermint Linux boot menu allows you to complete searches via the DuckDuckGo tool by default and get information on its official forums.

However, there is no reason to be restricted in these options. You also do not have to wait for third parties to provide alternatives. If any website offers a search function, then in most cases, you can integrate it in the main menu of the distribution, as a new search engine - aka Search. Action.

How to add Search Action to the main menu of Peppermint?

  1. The necessary tools
  2. Looking for something
  3. Copy - paste the full URL
    1. Query part of the URL
    2. The address part of the URL
  4. Check that the URL has been 'cleaned'
  5. More URLs
  6. Edit menu
  7. Add a new Search Action
  8. Create the command
  9. Add actual queries
  10. Set up more Search Action
  11. Search the web instantly

The necessary tools

To add a new Search Action to the main menu of Peppermint, you need three things: The ability to edit items in the main menu of Peppermint Linux, a browser used to access the websites you want to turn into a search engine, a simple text editor where you will paste the URL of that website and remove unnecessary things, not just keep searching.

As a first step, run your favorite browser and create a new blank text file on the desktop for easy access.

Picture 1 of How to add Google Search and other Search Actions to the main menu of Peppermint

Looking for something

If you intend to add more web search capabilities to your main menu, you should place your browser window and text editor window on your screen to easily switch between them for copying and pasting rows. series.

Visit the site first and use a specific keyword or phrase, which cannot appear by chance as a search query. Try writing your first and last name in a single word, for example.

Picture 2 of How to add Google Search and other Search Actions to the main menu of Peppermint

The reason for this is to be able to quickly locate this root word among many other words.

Copy - paste the full URL

When the results appear on the screen, you can ignore them - strangely, that's not the result we need but the URL that leads to them.

Picture 3 of How to add Google Search and other Search Actions to the main menu of Peppermint

Copy the search results page URL from the browser's address bar and paste it into the text editor.

Query part of the URL

Look, in the chaotic characters of the copied URL, the word you used in your search. As you can see in the illustration, the word has been listed twice on Google Search results.

Only the first word that appears is needed, and as you will see in reality, what you are often looking for will be in the form of:

 q = văn bản bạn tìm kiếm 

The above line makes sense when you realize that q usually corresponds to the word 'query' or 'question' . It will be translated equivalent into human language as:

 Câu hỏi của tôi là = nội dung câu hỏi 

When you determine its exact position in the resulting URL, don't do anything, just remember that location, as you'll need it in the next steps.

Picture 4 of How to add Google Search and other Search Actions to the main menu of Peppermint

The address part of the URL

Search terms are the second part of interest. The first part is the main address of the search results page, in this example:

 https://www.google.com/search? 

Keep this in mind, because in the next step, you will have to combine the two parts into a single item.

Picture 5 of How to add Google Search and other Search Actions to the main menu of Peppermint

Check that the URL has been 'cleaned'

In 99% of cases, all you need to do is keep the important search address of the website and paste the search query term at the end, then delete everything else. Typically, the format would be:

 https://dia_chi_trang/search?q=truy_van_tim_kiem 

Some websites may also use the following format:

 https://dia_chi_trang/?s=truy_van_tim_kiem 

To make sure it works, visit the manually created URL, after copying and pasting it into the browser address bar. If there are no errors in the address structure, you will see the same results you saw earlier. It will be like the 'cleaned up' version of the regular search results URL and has only the necessary elements.

Picture 6 of How to add Google Search and other Search Actions to the main menu of Peppermint

More URLs

Repeat the process for all sites for which you want to add search functionality to the distribution's main menu.

In the case of the example and as you can see from the illustrations, after Google, attention will turn to IMDb. The idea of ​​being able to search for titles or series and actors and directors directly from the main menu is quite interesting.

Picture 7 of How to add Google Search and other Search Actions to the main menu of Peppermint

Therefore, the article repeated the same steps, completed the search, copied the resulting page URL into the text editor, and deleted unnecessary data, keeping only the basic search URL and query. The question has been given.

Edit menu

After copying, 'cleaning up' and trying out the addresses you want to add to your main menu as new search engines, it's time to really add them. Right-click on the main menu of Peppermint and from the menu that appears, select Properties.

Picture 8 of How to add Google Search and other Search Actions to the main menu of Peppermint

Keep the text editing window handy on the screen, as you'll need it in the next steps.

Add a new Search Action

Scroll to the end of the tabs to Search Actions and press the + key to add a new one to the menu.

In the Name field , enter the name you want for the search entry - the name only distinguishes the name from other items and doesn't affect how it works, so you can use whatever you want here. .

In the Pattern field , enter the code you want to 'map' into this Search Action (which you will enter in the search field of the main menu in the future, to complete the related search). For ease of use, you should use an icon followed by one or two letters of the site name.

Picture 9 of How to add Google Search and other Search Actions to the main menu of Peppermint

For example, DuckDuckGo is accessible by default by '! D' , so the article uses the same logic: For Google, we use '! G' and for IMDb '! I' . In both cases, the pattern will be an exclamation point followed by the first letter of the site name.

Create the command

In the Command field , you should enter a command that does three things:

  1. Run the browser
  2. 'Open' the web page displaying search results
  3. Include the query you have entered in the main menu into the URL of this page so that it displays relevant results

The first part is easy: Choose the existing DuckDuckGo Search Action. Then copy the first part of the command. Alternatively, you can copy it directly from here. The section you are interested in is:

 exo-open -launch WebBrowser 

Return to the entry and paste the part of the command you just copied into the Command field .

Uncheck the Regular expression option .

Picture 10 of How to add Google Search and other Search Actions to the main menu of Peppermint

Add actual queries

Continue to copy the address from the text editor. Paste it at the end of the Command field , after the first section you copied from the previous step from here or from DuckDuckGo entry. Remember to keep a space between the command you copied and pasted the URL created after it.

Picture 11 of How to add Google Search and other Search Actions to the main menu of Peppermint

Replace the search term at the end of the URL created with the string % u. The result will look like what you see in the image. % u corresponds to what the user entered as a search query in the search field of the main menu.

Set up more Search Action

Repeat the process by creating a new entry for each site you want to be able to search directly from the main menu.

The article created a new, second list, accessible via the '! I' string , which allows for quick and easy completion of IMDb searches.

Picture 12 of How to add Google Search and other Search Actions to the main menu of Peppermint

With these two new Search Actions, articles can type '! G make tech easier clipman' to search on Google for this term or '! I Charlize Theron' to search for information about this beloved actress on IMDb.

Search the web instantly

Close the window to save the changes and from now on, you will be able to use the declared patterns for each site, followed by a direct search request in the search field of the main menu.

Picture 13 of How to add Google Search and other Search Actions to the main menu of Peppermint

As soon as you enter an identifiable, active pattern, the main menu list will display the name you have entered for it. Continue to type what you want to search and press Enter to display the browser, load the relevant results page of the website you have mapped to Search Action.

Hope you are succesful.

Update 29 November 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile