Score:1

List all application names that are in "show applications" button and in "dash to dock" sidebar

id flag

Is there any possibility using command line/bash to list all the application names which are presented in show applications (through icons) button when it is clicked, and the applications presented in Dash to Dock sidebar?

I ran this command: cd /usr/share/applications && ls -l

But when I did it I see all the applications beyond the ones that are in "show applications" and in "dash to dock"

Score:0
cn flag

Rather than a single command, you will probably need to script somewhat to have a proper list of the displayed applications if no script to that purpose is already existing.

Applications in "Show Applications" are represented by valid .desktop launchers residing in specific directories. A script therefore should 1) scan all directories where .desktop files live, and 2) search the contents of these files to select only these that are effectively displayed.

  1. The desktop environment searches for .desktop launchers in all applications directories under these specified in the XDG_DATA_DIRS environmental variable

    You can see these directories with the command:

    printenv XDG_DATA_DIRS
    

    In addition, also the user's local applications directory, ~/.local/share/applications is searched.

  2. Only .desktop launchers where Type=Application and with a valid executable specified on the Exec= line are potentially shown in the application menu. .desktop files may be set to be displayed in the menu or not on an individual basis.

    Keys used to control display of a .desktop launcher include NoDisplay (do not show in the menu), Hidden (treat this .desktop file as if it did not exist), OnlyShowIn and NotShowIn (show it only or do not show in a specific desktop environment) (See the possible keys here).

With this information, one could create a script listing desired information about the applications available in the desktop's application menu.

rtciv avatar
id flag
Awesome explanation and detailing @vanadium, i tested modifying the parameters of some applications in this folder to check their behavior and tested, big thanks for the help!! About dash to dock is there any command to check the applications that are included in dash to dock also? Thanks!!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.