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

‘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

 

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, 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 Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

24,256FansLike
192FollowersFollow

LATEST ARTICLES

Create a ClamAV Antivirus Live USB drive, and how to use it

Antivirus Live CD or USB drives come in handy at times when your computer is infected with a virus and other malware. Here is how you can create a ClamAV Live USB drive to scan and remove the malware from a computer.
best linux distros for laptops
Whether buying a Linux pre-installed laptop or selecting a Linux distro for your existing laptop, there are many things to consider. Let's take you through some of the best Linux distros that are optimized for Laptops in this 2019 edition of the article. Read on.
cool and fun linux commands
The real purpose of this article is to help Linux newbies get comfortable and confident with the Linux command-line.  While knowledge and comfort of the Linux GUI allow great power, it is the mastery of the command line, or CLI, affords the Linux user unlimited power and certifies them as a Linux power user well on their way to becoming an expert.
clean virus ubuntu live CD
In this tutorial, we are going to show you how to clean your Windows machine from infected viruses using an Ubuntu live USB or CD and the ClamAV antivirus. The ClamAV is a free, open-source antivirus that can be used on Ubuntu.