There are a few ways to snoop out the command name that launches a program. In many cases, it's the same same as the package that installed it, but in other cases, the package name and the actual executable name don't share much in common.
Method 1: launch the program from the menu. Then run "top" in a terminal. I used "audacious" as an example:
Code:
Tasks: 123 total, 1 running, 122 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.3%us, 0.7%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2063212k total, 1102356k used, 960856k free, 89824k buffers
Swap: 4128764k total, 0k used, 4128764k free, 653732k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1028 root 20 0 94480 17m 9324 S 0.7 0.9 2:11.54 Xorg
1737 paul 20 0 506m 169m 31m S 0.7 8.4 8:17.32 firefox
1652 paul 20 0 111m 13m 9.9m S 0.3 0.7 0:02.23 Terminal
3512 paul 20 0 250m 21m 11m S 0.3 1.1 0:00.43 audacious
3527 paul 20 0 3800 1192 912 R 0.3 0.1 0:00.13 top
1 root 20 0 16768 14m 2044 S 0.0 0.7 0:01.96 systemd
No surprise here, the package name that installed audacious was "audacious", the binary executable (shown under the Command column in top) is "audacious", and the menu item name is "Audacious".
Method 2: If you know the name of the rpm package that installed the program, you could use rpm and grep to find the executable(s):
Code:
[paul@CarCrusher ~]$ rpm -ql audacious | grep bin/
/usr/bin/audacious
/usr/bin/audtool
Method 3: Identify the *.desktop file in /usr/share/applicationns/ that is associated with the program and examine it, or grep it:
Code:
[paul@CarCrusher ~]$ ls /usr/share/applications/ | grep audacious
audacious.desktop
audacious-ffaudio.desktop
livna-audacious-aac.desktop
livna-audacious-mp3.desktop
[paul@CarCrusher ~]$ grep -i Exec /usr/share/applications/audacious.desktop
Exec=audacious %U
TryExec=audacious
Then there is just:
Code:
[paul@CarCrusher ~]$ which audacious
/usr/bin/audacious
I can't help you with your second question.