How to add Search to right-click menu in Files and Folders in elementary OS

Add Search to elementary OS Files

‘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.

Add Search to elementary OS Files

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
Install gedit
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
gedit search contractor
gedit search contractor

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
gedit search.contract
gedit search.contract

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.

Search added to elementary OS
Search added to elementary OS
Search
Search

 

Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover, and enjoys hands-on with new promising distros. Currently, I'm using Linux Mint as a daily driver and run several other distros such as Fedora, Solus, Ubuntu, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. Hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more, and spread my love for Linux. If you find time, drop me an email or feedback from 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz