I'm running ubuntu 18.04 with Xfce installed to replace GNOME. I'd like to be able to search gnome-software from the whisker menu. In the man page gnome-software doesn't say it has a search option though, I can only launch the store's default page. The same applies to the synaptic package manager.
In alternative if using a GUI application from the whisker menu isn't possible can I search applications from the terminal? I'd prefer not to use apt-cache search
because I find it to messy to search for applications. I did find this question but I find implementing the accepted answer into something I could launch from the whisker menu quite confusing.
The terminal way is to set the whisker search action like this:
%s - passes the string tiped in whisker to the command
/bin/bash - at the end will keep the terminal window open after apt-cache command finishes. Another option is to make a script for this.
Opening a GUI and inserting text at the right search box would be very tricky. But probably possible with the right tools.
One option (without the terminal): - Install dctrl-tools and zenity (for UI)
Set the whisker search action like this (replace /path/to/script e.g. /home/dsstorm/Desktop/pkginfo):
Inspired by Milos Pavlovitch's answer and given the fact that no matter which command you choose (apt-cache search, apt-cache dumpavail or aptitude) you'll still miss a few packages the most elegant workaround (terminal version) is this. Install aptitude with
sudo apt-get install aptitude
.Right click on the whisker menu and select properties. Go to the search action tab and add this action:
Note:
1) The pattern is just a character to invoke the action, for example if you want to search for emacs type °emacs
2) Change gnome-terminal with whatever terminal you actually use (on regular xubuntu nothing would happen if you leave gnome-terminal because it isn't installed for example, use xfce4-terminal instead)
3) The command will print some lines only, press enter to move forward or q to exit. The "p" at the beginning of the line stands for package.
"search gnome-software from the whisker menu"...
My answer almost replicates the Mint Mate "mintmenu" feature that you are looking for and wish to duplicate in the Whiskermenu.
You need to make sure apturl is intalled on your system first if you are going to want this to work.
First the steps:
1:) "right-click" the whiskermenu icon on the panel > "Properties" > "Search Actions" tab
2) "left-click" the "+" (plus sign) on the right of the name/pattern window
3) enter these details in the appropriate fields, Name: Install Package (or call it whatever you like since name is arbitrary), Pattern: ! (shebang/exclamation mark... also arbitrary, can be anything you like but should pick some symbol instead of letters), Command: apturl apt:%s, leave Regular expression box unchecked.
4) now Close
5) Open whisker menu, in Search field type !supertux (or type whatever program you want to install after the shebang, supertux is a game and you can just cancel when apturl dialog appears and asks if you want to install this item. I only use supertux for demonstration only., then press "Enter"
"Install additional software?" dialog should appear and either "Cancel" or "Install". If the program you are trying to install is already installed you will get a dialog telling you so. If you misspell you will get the error dialog or "doesn't exist" dialog.
Now if you just want to search for software in a similar fashion, first the steps:
1:) "right-click" the whiskermenu icon on the panel, "Properties", "Search Actions" tab
2) "left-click" the "+" (plus sign) on the right of the name/pattern window
3) enter this information in the appropriate fields
Name: Search Package Pattern: * Command: xfce4-terminal --execute /bin/bash -c "/usr/bin/aptitude search %s | less"
4) Close
5) open Whiskermenu, in search field, type *supertux
A terminal window will open and display the available programs for install according to the name you enter after the "*" symbol in the Whisker search field.
Instead of xfce4-terminal enter the name of the terminal program you use but keep the rest the same. The path of the user/bin/aptitude can be the path of the program you use for normal installs (aptitude is what I use, if you want to use that as well you have to install aptitude first.)
This search and apturl install feature is default in mintmenu in Mint Mate 19. If you do not have the Search Actions tab then you may have to update to get it?
I am using:
Mint xfce 19 Tara
Whiskermenu-plugin 2.3.1
I hope this helps and answers your question. I know other Mint Xfce4 users will be grateful for this little tip!