On 8/30/23 09:32, zithro wrote:
On 30 Aug 2023 04:52, gene heskett wrote:
man systemctl ; look for "timer" (in vi(m) use "/" to search) ?
$ systemctl list-timers
Tried this one ?
Maybe find the script(s) where you use this sound ?
I mean to find HOW you played this sound, ie. with which application.
With ALSA, you could have used "aplay FILE.wav", but you could
also have used xmms, audacity, VLC, mpv, etc.
tried aplay, got server dead response. htop cannot find aplay,
The application playing the sound is most probably dead when you check
for it ! Read below.
?!
I think you didn't understand what I meant.
To play a sound, there needs to be an app launching it.
So I suggested than instead of "find"ing the sound itself, you try
to "grep" the application/executable name.
Agreed this could be long, as you don't know where that sound is
played from.
And that is the problem, and why I read thru all those man pages
trying to find a way to make it log what it did. Sadly no.
So, let me show you what I was thinking about.
I show you commands which will "find" for executable files which are not
shared libraries, and for each file found, will "grep" for application
names.
This approach will not try to find the sound(s) themselves, but the
"applications which can play sounds".
First, make sure to have a list of ALL the audio apps installed on your
system. From this list, you will just need the executable NAME, not the
full path.
Examples: aplay, vlc, audacity, mplayer, mpv, ...
Then, run either the SHORT or LONG FORM of these find commands as root
(or with sudo), but add your own applications from your app list above.
Warning: commands are both on one line !
++ FIND - LONG FORM
find -P / \! -iname "*.so" -type f -executable -exec grep --color
--binary-files=without-match --with-filename --line-number -E
'aplay|vlc|audacity' '{}' \;
++ FIND - SHORT FORM
find -P / \! -iname "*.so" -type f -executable -exec grep --color -IHnE
'aplay|vlc|audacity' '{}' \;
++ APP LIST
As said above, you will have to change :
'aplay|vlc|audacity'
with the application names you have on your computer, for example :
'aplay|vlc|audacity|mpv|mplayer'
++ PARAMETERS EXPLANATIONS
-P : never follow symlinks (we going to check the whole FS, so no point)
\! -iname "*.so" : dont include shared libs
-type f : files only (no directory, etc)
-executable : executable file
-exec : run a command for each file found. Here the command is GREP,
which scans for application names inside the executable files
The grep options used are almost self-explanatory, I showed the
long form on purpose.
++ SAMPLE OUTPUT
Instead of "/", I used "/usr" :
# find -P / \! -iname "*.so" -type f -executable -exec grep --color
-IHnE 'aplay|vlc|audacity' '{}' \;
/usr/bin/rvlc:2:exec /usr/bin/vlc -I "rc" "$@"
/usr/bin/pa-info:83: 'aplay -L'
/usr/bin/cvlc:2:exec /usr/bin/vlc -I "dummy" "$@"
/usr/sbin/alsa-info:110:withaplay() {
/usr/sbin/alsa-info:116: aplay -l >> $FILE 2>&1
[OUTPUT TRUNCATED]
HTH
This looks to be useful also. Thank you zithro.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>