[GTALUG] Command doesn't work in script but works on command line?
D. Hugh Redelmeier
hugh at mimosa.com
Sun Nov 7 18:53:15 EST 2021
| From: Jim Ruxton via talk <talk at gtalug.org>
What Desktop Environment are you using? Gnome? KDE? Something else?
When you say "run from the command line", is that command line inside
an xterm window? (That's what I assumed.) Or is it before you start a Desktop Environment.
| > Could it be a permissions issue? What perms do you have when running it from
| > the command line vs. running from a shell script by clicking the file/icon?
|
| Thanks for the suggestion but no it's actually the same file with the same
| permissions. As I posted earlier when running the script by clicking it I get
| the error message:
|
| Capture open error: Device or resource busy
|
| Perhaps this is the clue. As to why it happens only when executing the file by
| clicking it I am not sure. Perhaps I should ask in a Linux sound or music
| forum. Maybe its something specific to alsa?
That's a half-useful useful message. It doesn't say what resource is
being used.
There might be some hints in
https://bbs.archlinux.org/viewtopic.php?id=116042
Pretty old and not squarely on topic.
If I were tracking it down, I'd use the "strace" command. A bit
arcane and a bit laborious. It runs a command, listing all system
calls and their results.
Strace flags you might find useful.
-o logfile # where to put the log
-f # trace child processes too
Some system call will probably return EAGAIN or EBUSY or some other
code listed in errno(3). You can compare this to a log of a working
run of the script to see what is different.
More information about the talk
mailing list