‘Files’ of elementary OS has a hidden search feature and can be seen by pressing Ctrl F. The breadcrumb field converts to a search icon which lets you search the files in real time. But the displayed list is not user friendly as it disappears after the mouse focus is lost. Moreover, there is no ‘Search’ function to the right-click context menu on a Folder. In this article, I will show you how to add a ‘Search…’ item to the right-click context menu on any folder.
Again, there are several methods to add search, but I prefer using gnome search tool. Let’s get started:
Add Search to right-click context menu on Folder in Files
STEP 1: INSTALL GNOME SEARCH TOOL
Launch ‘Terminal’ from ‘Applications’ and enter the following command:
sudo apt-get install gnome-search-tool
STEP 2: INSTALL GEDIT
Type the following command to install gedit. You need root password.
sudo apt-get install gedit
STEP 3: MAKE NEW CONTRACTOR ENTRY
Now, let’s create a new search contractor entry and add a shortcut to call the gnome search function which we installed in STEP 1. Type the following command line.
sudo gedit /usr/share/contractor/gedit-search.contract
Enter the root password. You will have to now gedit and copy paste the content.
[Contractor Entry] Name=Search... Description=Search Files MimeType=inode;application/x-sh;application/x-executable; Exec=gnome-search-tool --path=%f %U
Save the file File > Save. Close everything.
STEP 4: THAT’S IT!
Now when you right-click on any folder in Files explorer, you will see ‘Search…’ at the bottom of menu. It will launch Search dialog box.