Page 1 of 1

[SOLVED] List of all applications...

Posted: Thu Mar 19, 2020 8:52 am
by jackerbes
Is there an app or command that will give me a list of all applications that are in a Mint Linux Cinnamon install?

Jack

Re: List of all applications...

Posted: Thu Mar 19, 2020 8:56 am
by JoeFootball
jackerbes wrote: Is there an app or command that will give me a list of all applications that are in a Mint Linux Cinnamon install?
In Software Manager, upper-right menu button, "Show installed applications".

Re: List of all applications...

Posted: Thu Mar 19, 2020 9:02 am
by jackerbes
That's a good one!

I don't know why I can't find some of these things...

I googled the question and got this one that is a good choice too:

Code: Select all

jack@jack-T520:~$ dpkg -l
I'll bet I can send that list to a text file too. Or even just copy it and paste it into one.

Thanks again!

Jack

Re: List of all applications...

Posted: Thu Mar 19, 2020 9:11 am
by JoeFootball
jackerbes wrote: ... this one that is a good choice too
If you're looking for that level of detail, yes indeed.
jackerbes wrote: I'll bet I can send that list to a text file too.
Sure can: dpkg -l > apps.txt

Re: List of all applications...

Posted: Thu Mar 19, 2020 9:14 am
by Flemur
JoeFootball wrote:
Thu Mar 19, 2020 8:56 am
In Software Manager, upper-right menu button, "Show installed applications".
I get a rather short list which includes non-applications like kernels and themes, but doesn't include installed applications like alsamixer or update-grub.

Edit: dpkg -l lists packages, not applications.

I use the terminal a lot and often use this script, W, to find the name of an application in my path

Code: Select all

$ cat ~/bin/W
#!/bin/bash
#
if [ $# -lt 1 ]
then
  echo Usage: `basename $0` pattern 
  exit 1
fi 
echo $PATH | sed 's/^/ls -A /' | sed 's/:/ |grep -i '$1'; ls -A /g' | sed 's/$/ |grep -i '$1'/' | bash | sort 
exit 0
e.g.

Code: Select all

$ W alsa  # lists all the applications in PATH with "alsa" in their names
alsa
alsa-info
alsabat
alsabat-test
alsactl
alsaloop
alsamixer
alsatplg
alsaucm
If, inside a script, I run

Code: Select all

X a
X b
EDIT: ^^^ That should be W a not X..

....etc for all the letters, sort -u the output, I get list of 2508 executables in my PATH.
dpkg -l shows 2024 packages (which include non-applications like themes and fonts).

Re: [SOLVED] List of all applications...

Posted: Thu Mar 19, 2020 11:18 am
by jackerbes
The depth of your knowledge is inspiring Flemur!

I've spent the last hour trying to learn more about scripts and running scripts.

Is the script you call "W" in a text file named W.txt?

I have so much to learn that I feel like Neanderthal man tying to communicate with a modern genius!

Jack

Re: [SOLVED] List of all applications...

Posted: Thu Mar 19, 2020 12:01 pm
by Flemur
jackerbes wrote:
Thu Mar 19, 2020 11:18 am
The depth of your knowledge is inspiring Flemur!
I've spent the last hour trying to learn more about scripts and running scripts.
Is the script you call "W" in a text file named W.txt?
Actually I'm pretty bad at bash scripting and, although I made that 'W' script a couple of years ago, I no longer understand how it works (I learned that when I tried to fix a minor bug - it sometimes lists files in the CWD = current working directory)

You can call the script anything, but call it what you want to run: if you name it W.txt, you need to run W.txt in a terminal...so if it's called W (or whatever you want), put it in $HOME/bin and chmod +x ~/bin/W. If you don't have a $HOME/bin directory, make one first, do the above, then log out/back in to add it to your $PATH. Your .profile file takes care of it...or you could do

Code: Select all

. .profile 
in a term rather than re-logging in.

Also note the "grep -i" in it: that makes it ignore the case of the commands. I have another one called Ws that doesn't use the -i, so the case matters (it also lists the file size)

Code: Select all

$ Ws W
 4 W
 4 Wget
 4 Which
 4 Winetricks
 4 Wl
 4 Wordpad
 4 Ws
Those are all my commands in $HOME/bin; I often use capital letter because few or no regular linux commands use caps ('cept some DVD programs..?).

Code: Select all

$ Ws grub  # list all the commans with lowercase 'grub' in their names, and the file sizes
...
  244 grub-mklayout
...
$ ls -l `which grub-mklayout`
-rwxr-xr-x 1 root root 245848 Nov 10 22:52 /usr/bin/grub-mklayout
Anyway, W is espcially handy for things like grub and alsa commands, like "is it grub-install, or install-grub?"

Re: [SOLVED] List of all applications...

Posted: Thu Mar 19, 2020 12:17 pm
by Flemur
A way to get a list of everything (? some are desktop dependent) that's in your desktop menu is just:

Code: Select all

$ ls /usr/share/applications
but sometimes that filename is different than the executable name, like
/usr/share/applications/org.gnome.FileRoller.desktop tries to Exec=file-roller %U.

Re: [SOLVED] List of all applications...

Posted: Thu Apr 16, 2020 4:10 pm
by smurphos
Flemur wrote:
Thu Mar 19, 2020 12:17 pm
A way to get a list of everything (? some are desktop dependent) that's in your desktop menu is just:

Code: Select all

$ ls /usr/share/applications
but sometimes that filename is different than the executable name, like
/usr/share/applications/org.gnome.FileRoller.desktop tries to Exec=file-roller %U.
Not the most elegant but effective single liner for this

Code: Select all

for f in $(ls /usr/share/applications); do cat /usr/share/applications/$f | grep -w Exec; done