I want a list of all installed application which have a GUI. To be clear, At least all the applications that are listed in Show Applications.

I tried several commands like apt list --installed, dpkg -l, find '*.desktop' to get the list of all installed application which all ended up missing some applications (like Android Studio, b1freearchiver, pyCharm, etc.)

Wouldn't there be a way to find the folder or file that is used by the Show Applications menu to get all the applications listed in it.

I'm running Ubuntu 18.04 desktop.

  • What would you search for specifically? Packages that have some type of display as a dependency? Or just try searching for all .desktop files? – Xen2050 Nov 8 at 20:12
  • I'm searching for installed application name. i thought all application would have .desktop so i used find '/usr/share/applications/' -type f -iname '*.desktop' to search for application – Sathish Kanna Nov 8 at 20:35
  • It seems that gui programs mostly have .desktop files, terminal programs (like the coreutils) don't usually bother. If searching for those files worked, I might as well post it as an answer – Xen2050 Nov 8 at 20:44
  • actually i tried /home/ and /usr/ searching for .desktop i haven't got few applications. – Sathish Kanna Nov 8 at 20:55

Try searching for all the .desktop files, Gnome's Developer website calls them the "registered set of applications that users can run" and they're almost always GUI programs.

This answer (How can I find *.desktop files?) says you could just search everywhere for .desktop files with

find / -name '*.desktop'

Or they're probably only in /usr/share/applications/ and ~/.local/share/applications so just looking in those should be sufficient:

find /usr/share/applications ~/.local/share/applications -name '*.desktop'

If you specifically want to exclude terminal programs (even if they have a terminal GUI like htop), you could append these commands to a search above:

...  -print0 |xargs -0 grep -i -l "Terminal=False"
  • 1
    almost always isn't a very good criteria. Python has .desktop file, byobu does too. These aren't GUI programs, and in fact command line apps may state Terminal=True in . desktop file to open default terminal. A .desktop file != GUI app – Sergiy Kolodyazhnyy Nov 8 at 22:17
  • @SergiyKolodyazhnyy a modified search to avoid "Terminal=True" files would be find / -name '*.desktop' -print0 |xargs -0 grep -i -l "Terminal=True" but that would exclude matching htop, Midnight Commander, and a few others that have "terminal" GUI's. But a "good" desktop program should really follow the freedesktop standaards & "register" a .desktop file, shouldn't they? – Xen2050 Nov 8 at 22:50
  • I agree, they should, but that doesn't mean they necessarily will, especially anything installed from non-standard repository. – Sergiy Kolodyazhnyy Nov 8 at 22:57

As compliment to the @Xen2050 answer you can determine exact package names of the deb-packages (so they are known to APT) having *.desktop files with this one-liner:

dpkg --search '*.desktop' | awk '{print $1}' | sed "s/://" | sort --unique

In the command above:

  • dpkg --search '*.desktop' will search for packages having *.desktop files;
  • | is redirect from output of previous command to the input of next command;
  • awk '{print $1}' will print first column of search result (usually in form plank: /usr/share/applications/plank.desktop - so you will get plank:);
  • sed "s/://" will remove unnecessary : from package name (you will get plank here);
  • sort --unique will sort the results and remove duplicates from them.

On my Ubuntu 16.04.5 LTS it returns about 347 unique package names.


If you have installed some software to the home folder - then you can use command below

find ~ -name '*.desktop'

or more precise

find ~/.local/share/applications/ '*.desktop'

to find their *.desktop files.

  • actually not all application provide .desktop at least the applications i mentioned in the question. – Sathish Kanna Nov 8 at 21:25
  • Usually many applications were installed by APT. If you have installed software with Snap, AppImage, Ubuntu Make, FlatPak, compiled them from source code - then you should find them manually :) – N0rbert Nov 8 at 21:29

Generally, that's difficult to determine. The other answers aren't addressing that command line apps also may have .desktop files or GUI apps may not provide a . desktop file. Besides there's no guarantee an app referenced in the .desktop file still exists on the system( you'd have to run it to know or check Exec= line for existing path). Thus it's a poor criteria.

What can be done, however is ask a better question. What apps depend on GUI ? That can be found with apt-cache rdepends 'package or lib'. For instance, apt-cache rdepends libappindicator will show packages that have that lib as dependency and probably provide such applet.

But also to be fair, a terminal app may also interface with GUI without actually having a GUI interface. If your goal to find apps with GUI front-end seek apps that depend on Gtk or Qt libraries

Of course, it also depends of whether package maintainer properly provided dependency description for their package. For standard Ubuntu repositories that's OK. For external PPA that depends on the developers and maintainers.

  • $ apt-cache rdepends libappindicator returns E: No packages found, but searching for libappindicator* does find the version I've got installed (and the other 6 I don't), but the reverse depends it lists mostly aren't installed either. Sounds like it's on the right track though – Xen2050 Nov 8 at 22:37
  • @Xen2050 The package name libappindicator is written on phone and from memory, so it may not be exactly correct. The point still stands, though. Look for what needs GUI not look for GUI – Sergiy Kolodyazhnyy Nov 8 at 22:45
  • The apt-cache option --installed should "Limit the output of depends and rdepends to packages which are currently installed" which should help. I'm just not sure which package(s) to search, libappindicator* only rdepends on other libappindicator packages for my xfce. Even xorg says it's a dependency of xfce4, but that's just a metapackage I happen to not have installed, despite having almost all the other xfce4 pakages. Tricky – Xen2050 Nov 8 at 23:10

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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