Sometimes, I login remotely via ssh to my remote desktop and I would like to call a GUI application through ssh, to remotely display it on my laptop.

However, I do not know what the binary name is, since I usually call applications from the dash using generic terms.

Is there a commande line (CLI) interface where it would be possible, in a terminal, to perform a search in Unity Dash and obtain in the result list the application names and path to their executable commands?

I would like something like:

# dash --search "disks"
Name         Executable
Disks        /usr/bin/gnome-disks
  • 5
    Searching through all the .desktop files in /usr/share/applications would be a good start. – Byte Commander Sep 16 '16 at 23:23
  • Related: How does Unity's dash index and search work? – guntbert Sep 17 '16 at 10:09
  • find <where> -name <what> for example find /etc -name libgtk. I think there is also a locate program but that may need to be installed before you can use (sorry I'm not at my *nix box right now) – GrannySez Sep 20 '16 at 5:24
  • This question might be a better fit for softwarerecs.stackexchange.com – Elder Geek Sep 27 '16 at 13:34
  • Elder Geek, I am not asking for an alternative for Dash, I am asking if a specific feature exists within it. It is thus not related to software recommendation. – Hans Deragon Sep 27 '16 at 16:57

Here is a script that might be helpful:

for desktopFile in $(grep -irl "$1" /usr/share/applications/) ; do 
  grep --color=never 'Name=' "$desktopFile" 
  grep --color=never 'Exec=' "$desktopFile" 
  echo ''

Assuming you saved it as "searchapps", this is what it does:

$ searchapps disks
Name=Disk Image Writer
Exec=gnome-disks --restore-disk-image %U


Note that there might be other folders you'd like to search in addition to /usr/share/applications. You'd have to modify the script accordingly.

| improve this answer | |

A convenient alternative is to open /usr/share/applications with your favourite file browser (nautilus in standard Ubuntu, pcmanfm in Lubuntu, thunar in Xubuntu ...) and simply double-click on the icons you find there in order to start your program.

nautilus --no-desktop /usr/share/applications &

pcmanfm /usr/share/applications &

thunar /usr/share/applications &

I tested this in a terminal window with remote access via

ssh -X user@IP-adress

and it works for me.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.