Showing all installed programs in Ubuntu

In Ubuntu, where to see all programs just like the "program files" in windows, from which I can launch a program from a list of all program installed?

1

3 Answers

Just for fun

Since OP mentioned: from which I can launch a program from a list of all program installed?

Below a small script that lists all (globally) installed GUI applications. Choose one to launch it, or type a few of its characters and press Return to run the application:

enter image description here

To use

  • Copy the script below into an empty file, save it as list_apps.py
  • Test- run it by the command (open a terminal window, type the command and press Return):

    python3 /path/to/list_apps.py
  • If all works fine, add it to a shortcut key: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

    python3 /pat/to/list_apps.py

    to a shortcut key combination you like.

The script

#!/usr/bin/env python3
import subprocess
import os
dr = "/usr/share/applications"
apps = []
for f in [f for f in os.listdir(dr) if f.endswith(".desktop")]: try: content = open(dr+"/"+f).read() if not "NoDisplay=true" in content: lines = content.splitlines() name = [l for l in lines if l.startswith("Name=")][0].replace("Name=", "") command = [l for l in lines if l.startswith("Exec=")][0].replace("Exec=", "") apps.append([name, command]) except: pass
apps.sort(key=lambda x: x[0]); apps = sum(apps, [])
displ_list = '"'+'" "'.join(apps)+'"'
try: chosen = subprocess.check_output([ "/bin/bash", "-c", 'zenity --list '+\ '--column="Applications" '+\ '--column="commands" '+\ '--hide-column=2 --height 450 '+\ '--width 300 '+\ '--print-column=2 '+displ_list ]).decode("utf-8").split("|")[-1].strip() chosen = chosen[:chosen.rfind(" ")] if "%" in chosen else chosen subprocess.Popen([ "/bin/bash", "-c", chosen ])
except subprocess.CalledProcessError: pass

How it works

The script lists all .desktop files in /usr/share/applications, and checks if the line NoDisplay=true is in the file (which means it is not meant to be used as a GUI). Then it looks into the files, looks up the application name and the command to run it.

The result is listed in a zenity list, to choose from. If you pick one, the corresponding command is executed.

That's it.


Extended version

If you also would like to have a short description on the application, As mentioned in the Comment= line of its .desktop file, use the version below:

enter image description here

#!/usr/bin/env python3
import subprocess
import os
dr = "/usr/share/applications"
apps = []
for f in [f for f in os.listdir(dr) if f.endswith(".desktop")]: try: content = open(dr+"/"+f).read() if not "NoDisplay=true" in content: lines = content.splitlines() name = [l for l in lines if l.startswith("Name=")][0].replace("Name=", "") command = [l for l in lines if l.startswith("Exec=")][0].replace("Exec=", "") comment = [l for l in lines if l.startswith("Comment=")] comment = comment[0].replace("Comment=", "") if comment else "No description" apps.append([name, command, comment]) except: pass
apps.sort(key=lambda x: x[0]); apps = sum(apps, [])
displ_list = '"'+'" "'.join(apps)+'"'
try: chosen = subprocess.check_output([ "/bin/bash", "-c", 'zenity --list '+\ '--column="Applications" '+\ '--column="commands" '+\ '--column="Description" '+\ '--hide-column=2 --height 450 '+\ '--width 500 '+\ '--print-column=2 '+displ_list ]).decode("utf-8").split("|")[-1].strip() chosen = chosen[:chosen.rfind(" ")] if "%" in chosen else chosen subprocess.Popen([ "/bin/bash", "-c", chosen ])
except subprocess.CalledProcessError: pass
2

On ubuntu not all the program are listed in the application menu.

To see them all you will need to open a consoleand type

dpkg -l

This will display all application (the one which run in the UI and the one running in the console)

1

If you want to launch applications from the list a nice option is Classic Gnome indicator.

sudo apt-get install classicmenu-indicator

enter image description here

See here:

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like