Video of October talk with Mike Hoye

Hello everyone, The video of October 2021 talk, The state of Mozilla with Mike Hoye, is now available here -- https://youtu.be/jXtPaZ-sGPk Alex.

Hello, I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why? The command line is: alsa_out -j secondInterface -d hw:3 -c 6 or in a script : #!/bin/bash alsa_out -j secondInterface -d hw:3 -c 6 I have also tried the shebang #!/bin/sh with the same result. alsa_out is in /usr/bin . I'm on Ubuntu 20.04. Thanks for any advice here. Jim

On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
Did you specify the full path to the command in the script?

No because I thought if it was in /usr/bin it would find it. I will try that however. jim On 2021-11-06 8:37 a.m., James Knott via talk wrote:
On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
Did you specify the full path to the command in the script? --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

Ok, just added the path /usr/bin to the command but it didn't help. Still a mystery? Jim On 2021-11-06 8:37 a.m., James Knott via talk wrote:
On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
Did you specify the full path to the command in the script? --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

Does it perhaps only apply in the process that issues the command? That would make it apply when run from the command-line, and (appear to) fail when you run it in a subshell, which is what happens when you call a script. The man page doesn't say, so try making it a shell function, alsa_me() { alsa_out -j secondInterface -d hw:3 -c 6 } and then call that from the command-line. --dave On 2021-11-06 08:44, Jim Ruxton via talk wrote: Ok, just added the path /usr/bin to the command but it didn't help. Still a mystery? Jim On 2021-11-06 8:37 a.m., James Knott via talk wrote: On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote: I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why? Did you specify the full path to the command in the script? --- Post to this mailing list talk@gtalug.org<mailto:talk@gtalug.org> Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk --- Post to this mailing list talk@gtalug.org<mailto:talk@gtalug.org> Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk -- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the rest dave.collier-brown@indexexchange.com<mailto:dave.collier-brown@indexexchange.com> | -- Mark Twain CONFIDENTIALITY NOTICE AND DISCLAIMER : This telecommunication, including any and all attachments, contains confidential information intended only for the person(s) to whom it is addressed. Any dissemination, distribution, copying or disclosure is strictly prohibited and is not a waiver of confidentiality. If you have received this telecommunication in error, please notify the sender immediately by return electronic mail and delete the message from your inbox and deleted items folders. This telecommunication does not constitute an express or implied agreement to conduct transactions by electronic means, nor does it constitute a contract offer, a contract amendment or an acceptance of a contract offer. Contract terms contained in this telecommunication are subject to legal review and the completion of formal documentation and are not binding until same is confirmed in writing and has been signed by an authorized signatory.

I'm not sure I am clear here what you want me to try. I tried putting the command in a function in the script as below but it still didn't work. On 2021-11-06 9:20 a.m., Dave Collier-Brown via talk wrote:
Does it perhaps only apply in the process that issues the command? That would make it apply when run from the command-line, and (appear to) fail when you run it in a subshell, which is what happens when you call a script.
The man page doesn't say, so try making it a shell function,
alsa_me() { alsa_out -j secondInterface -d hw:3 -c 6 }
and then call that from the command-line.
The thing is I want to avoid using the command line. I want a user to just double click the file to run it. Jim
On 2021-11-06 08:44, Jim Ruxton via talk wrote:
Ok, just added the path /usr/bin to the command but it didn't help. Still a mystery?
Jim
On 2021-11-06 8:37 a.m., James Knott via talk wrote:
On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
Did you specify the full path to the command in the script? --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk -- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the rest dave.collier-brown@indexexchange.com | -- Mark Twain
*/CONFIDENTIALITY NOTICE AND DISCLAIMER/*/ : This telecommunication, including any and all attachments, contains confidential information intended only for the person(s) to whom it is addressed. Any dissemination, distribution, copying or disclosure is strictly prohibited and is not a waiver of confidentiality. If you have received this telecommunication in error, please notify the sender immediately by return electronic mail and delete the message from your inbox and deleted items folders. This telecommunication does not constitute an express or implied agreement to conduct transactions by electronic means, nor does it constitute a contract offer, a contract amendment or an acceptance of a contract offer. Contract terms contained in this telecommunication are subject to legal review and the completion of formal documentation and are not binding until same is confirmed in writing and has been signed by an authorized signatory./
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

From this, and what Hugh said about separate context: I have a script file called path-here. The text is
#!/bin/bash export PATH=$PATH:$(realpath .) When I run it as a command, it apparently modifies the environment of a sub-shell, and that environment gets thrown away when the sub-shell exits. To get the effect I want, I type . path-here which, I think, runs in the same bash instance that I'm typing commands into, so the change to PATH is effective. So would typing . simple-script (whatever the name of the simple script really is) get you what you want?
I'm not sure I am clear here what you want me to try. I tried putting the command in a function in the script as below but it still didn't work.
On 2021-11-06 9:20 a.m., Dave Collier-Brown via talk wrote:
Does it perhaps only apply in the process that issues the command? That would make it apply when run from the command-line, and (appear to) fail when you run it in a subshell, which is what happens when you call a script.
The man page doesn't say, so try making it a shell function,
alsa_me() { Â Â Â alsa_out -j secondInterface -d hw:3 -c 6 }
and then call that from the command-line.
The thing is I want to avoid using the command line. I want a user to just double click the file to run it. Jim
On 2021-11-06 08:44, Jim Ruxton via talk wrote:
Ok, just added the path /usr/bin to the command but it didn't help. Still a mystery?
Jim
On 2021-11-06 8:37 a.m., James Knott via talk wrote:
On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
Did you specify the full path to the command in the script? --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk -- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the rest dave.collier-brown@indexexchange.com | -- Mark Twain
*/CONFIDENTIALITY NOTICE AND DISCLAIMER/*/Â : This telecommunication, including any and all attachments, contains confidential information intended only for the person(s) to whom it is addressed. Any dissemination, distribution, copying or disclosure is strictly prohibited and is not a waiver of confidentiality. If you have received this telecommunication in error, please notify the sender immediately by return electronic mail and delete the message from your inbox and deleted items folders. This telecommunication does not constitute an express or implied agreement to conduct transactions by electronic means, nor does it constitute a contract offer, a contract amendment or an acceptance of a contract offer. Contract terms contained in this telecommunication are subject to legal review and the completion of formal documentation and are not binding until same is confirmed in writing and has been signed by an authorized signatory./
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

Jim - I may have missed it, but I think you said only that it "doesn't work" but didn't elaborate. Does running the script result in any error messages? Or does it appear to work but not have the desired effect? Is your script file executable? i.e. are the x permission bits set in the output of "ls -l filename"? Could it be that you're expecting your script to be in your PATH, and it isn't e.g. if you run prompt% scriptname does it say command not found? Do you need to run it with ./scriptname? You mentioned that you want it to be clickable. I'm relatively unfamiliar with alsa, but is it possible it needs something from the environment that isn't available when clicked? It's likely something relatively simple, but more details would likely help narrow it doen. Hope that helps John

Jim - I may have missed it, but I think you said only that it "doesn't work" but didn't elaborate.
Does running the script result in any error messages? No, because I am running the script by clicking on it there are no error messages. And it runs fine if I run on the commandline ie ./scriptname .
Or does it appear to work but not have the desired effect?
Is your script file executable? i.e. are the x permission bits set in the output of "ls -l filename"? Yes x permissions are set.
Could it be that you're expecting your script to be in your PATH, and it isn't e.g. if you run prompt% scriptname does it say command not found? Do you need to run it with ./scriptname?
You mentioned that you want it to be clickable. I'm relatively unfamiliar with alsa, but is it possible it needs something from the environment that isn't available when clicked?
Hmm, not sure what this would be. Because I am clicking the actual file it PATH shouldn't be an issue. Thanks for thinkig about it. Jim

This was a test for command-line vs putting it in a script. Your cases both use putting it i n a script, so this won't tell you anything. --dave On 2021-11-06 10:29, Jim Ruxton via talk wrote:
I'm not sure I am clear here what you want me to try. I tried putting the command in a function in the script as below but it still didn't work.
On 2021-11-06 9:20 a.m., Dave Collier-Brown via talk wrote:
Does it perhaps only apply in the process that issues the command? That would make it apply when run from the command-line, and (appear to) fail when you run it in a subshell, which is what happens when you call a script.
The man page doesn't say, so try making it a shell function,
alsa_me() { alsa_out -j secondInterface -d hw:3 -c 6 }
and then call that from the command-line.
The thing is I want to avoid using the command line. I want a user to just double click the file to run it. Jim
On 2021-11-06 08:44, Jim Ruxton via talk wrote:
Ok, just added the path /usr/bin to the command but it didn't help. Still a mystery?
Jim
On 2021-11-06 8:37 a.m., James Knott via talk wrote:
On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
Did you specify the full path to the command in the script? --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk -- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the rest dave.collier-brown@indexexchange.com | -- Mark Twain
*/CONFIDENTIALITY NOTICE AND DISCLAIMER/*/ : This telecommunication, including any and all attachments, contains confidential information intended only for the person(s) to whom it is addressed. Any dissemination, distribution, copying or disclosure is strictly prohibited and is not a waiver of confidentiality. If you have received this telecommunication in error, please notify the sender immediately by return electronic mail and delete the message from your inbox and deleted items folders. This telecommunication does not constitute an express or implied agreement to conduct transactions by electronic means, nor does it constitute a contract offer, a contract amendment or an acceptance of a contract offer. Contract terms contained in this telecommunication are subject to legal review and the completion of formal documentation and are not binding until same is confirmed in writing and has been signed by an authorized signatory./
--- Post to this mailing listtalk@gtalug.org Unsubscribe from this mailing listhttps://gtalug.org/mailman/listinfo/talk
--- Post to this mailing listtalk@gtalug.org Unsubscribe from this mailing listhttps://gtalug.org/mailman/listinfo/talk
-- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the rest dave.collier-brown@indexexchange.com | -- Mark Twain

Sorry I don't understand what you mean. In one case I am running a command in a script and activating it via a mouse click and the other case I am running the command directly on the command line. Running the script on the command line is giving the same results as running the command on the command line. ie. it works. Jim On Sat., Nov. 6, 2021, 10:02 p.m. Dave Collier-Brown via talk, < talk@gtalug.org> wrote:
This was a test for command-line vs putting it in a script. Your cases both use putting it i n a script, so this won't tell you anything.
--dave On 2021-11-06 10:29, Jim Ruxton via talk wrote:
I'm not sure I am clear here what you want me to try. I tried putting the command in a function in the script as below but it still didn't work. On 2021-11-06 9:20 a.m., Dave Collier-Brown via talk wrote:
Does it perhaps only apply in the process that issues the command? That would make it apply when run from the command-line, and (appear to) fail when you run it in a subshell, which is what happens when you call a script.
The man page doesn't say, so try making it a shell function,
alsa_me() {
alsa_out -j secondInterface -d hw:3 -c 6
}
and then call that from the command-line.
The thing is I want to avoid using the command line. I want a user to just double click the file to run it. Jim
On 2021-11-06 08:44, Jim Ruxton via talk wrote:
Ok, just added the path /usr/bin to the command but it didn't help. Still a mystery?
Jim
On 2021-11-06 8:37 a.m., James Knott via talk wrote:
On 2021-11-06 8:25 a.m., Jim Ruxton via talk wrote:
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
Did you specify the full path to the command in the script? --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
-- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the restdave.collier-brown@indexexchange.com | -- Mark Twain
*CONFIDENTIALITY NOTICE AND DISCLAIMER** : This telecommunication, including any and all attachments, contains confidential information intended only for the person(s) to whom it is addressed. Any dissemination, distribution, copying or disclosure is strictly prohibited and is not a waiver of confidentiality. If you have received this telecommunication in error, please notify the sender immediately by return electronic mail and delete the message from your inbox and deleted items folders. This telecommunication does not constitute an express or implied agreement to conduct transactions by electronic means, nor does it constitute a contract offer, a contract amendment or an acceptance of a contract offer. Contract terms contained in this telecommunication are subject to legal review and the completion of formal documentation and are not binding until same is confirmed in writing and has been signed by an authorized signatory.*
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
-- David Collier-Brown, | Always do right. This will gratify System Programmer and Author | some people and astonish the restdave.collier-brown@indexexchange.com | -- Mark Twain
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

On 2021-11-06 8:13 p.m., Jim Ruxton via talk wrote:
In one case I am running a command in a script and activating it via a mouse click and the other case I am running the command directly on the command line.
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? -- Cheers! Kevin. http://www.ve3syb.ca/ | "Nerds make the shiny things that https://www.patreon.com/KevinCozens | distract the mouth-breathers, and | that's why we're powerful" Owner of Elecraft K2 #2172 | #include <disclaimer/favourite> | --Chris Hardwick

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? Jim

| From: Jim Ruxton via talk <talk@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.

| From: Jim Ruxton via talk <talk@gtalug.org> | I'm having trouble with a simple script. It adds a second sounccard. This | command works on the command line but not in a script. Any ideas why? How are you running that script? Is it from a cron script or something like it? Does your script work when invoked from your command line? I haven't paid attention to JACK, but I assume that each Linux user session has some kind of jack context -- plumbing done by one user should not affect the plumbing of another user. I don't really see this issue addressed in the first few jack documents I read. My guess is that your script is modifying a different context from the one you are observing. That's really vague and hand-wavy, but that's the direction I'd investigate.

On Sat, 6 Nov 2021 at 10:04, D. Hugh Redelmeier via talk <talk@gtalug.org> wrote:
| From: Jim Ruxton via talk <talk@gtalug.org>
| I'm having trouble with a simple script. It adds a second sounccard. This | command works on the command line but not in a script. Any ideas why?
How are you running that script? Is it from a cron script or something like it? Does your script work when invoked from your command line?
I haven't paid attention to JACK, but I assume that each Linux user session has some kind of jack context -- plumbing done by one user should not affect the plumbing of another user. I don't really see this issue addressed in the first few jack documents I read.
My guess is that your script is modifying a different context from the one you are observing. That's really vague and hand-wavy, but that's the direction I'd investigate. --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
Similar to Hugh's ideas, but more specific, I would check first the PATH (mentioned by several other people) and then the environment as a whole. I'm not sure that what I'm going to suggest is the best way to do this, but it's the one I know: run the command 'export' and look for any settings that look to be specific to the program you're running, then make sure those same settings are set in the script you're working on. You can look at the PATH this way as well. Scripts often (especially under cron) run in different environments from what you expect, and thus don't get the information they need to function properly. -- Giles https://www.gilesorr.com/ gilesorr@gmail.com

I am running the script by double clicking on it after making it executable and setting scripts to run this way via nautilus. All the other scripts I wrote run fine this way. I tried running the script from the command line and that does work. So it is only not running correctly when activated by the mouse? Still a mystery. Jim On 2021-11-06 10:04 a.m., D. Hugh Redelmeier wrote:
| From: Jim Ruxton via talk <talk@gtalug.org>
| I'm having trouble with a simple script. It adds a second sounccard. This | command works on the command line but not in a script. Any ideas why?
How are you running that script? Is it from a cron script or something like it? Does your script work when invoked from your command line?
I haven't paid attention to JACK, but I assume that each Linux user session has some kind of jack context -- plumbing done by one user should not affect the plumbing of another user. I don't really see this issue addressed in the first few jack documents I read.
My guess is that your script is modifying a different context from the one you are observing. That's really vague and hand-wavy, but that's the direction I'd investigate.

On 2021-11-06 12:37 p.m., Jim Ruxton via talk wrote:
I am running the script by double clicking on it after making it executable and setting scripts to run this way via nautilus. All the other scripts I wrote run fine this way.
Modify the script to capture all output from the command as it may help you determine what may be going wrong when you run the command in a script. (e.g. >& messages.txt) -- Cheers! Kevin. http://www.ve3syb.ca/ | "Nerds make the shiny things that https://www.patreon.com/KevinCozens | distract the mouth-breathers, and | that's why we're powerful" Owner of Elecraft K2 #2172 | #include <disclaimer/favourite> | --Chris Hardwick

On Sat, 2021/11/06 01:32:13PM -0400, Kevin Cozens via talk <talk@gtalug.org> wrote: | Modify the script to capture all output from the command as it may help you | determine what may be going wrong when you run the command in a script. | (e.g. >& messages.txt) I'll echo Kevin's suggestion, and mention that potentially the output of "printenv" might be informative, and I think you can capture everything from a script by using (after the #! line) exec >/tmp/output 2>&1 which I think sends all output of all following commands to /tmp/output. I also try to check the result of commands in scripts and complain e.g. alsa_out args ... \ || echo 1>&2 "oh not alsa_out failed" or alsa_out args ... ret=$? if [ $ret -ne 0 ]; then echo 1>&2 "alsa_out failed with $ret" Hope that helps John

Thanks Kevin and John. When I capture the output of the script I get: Capture open error: Device or resource busy Again this doesn't happen when I run the command from the command line. There I get the expected output of: selected sample format: 16bit And the mystery continues. Thanks again for the help everyone. Jim On 2021-11-06 1:45 p.m., John Sellens via talk wrote:
On Sat, 2021/11/06 01:32:13PM -0400, Kevin Cozens via talk <talk@gtalug.org> wrote: | Modify the script to capture all output from the command as it may help you | determine what may be going wrong when you run the command in a script. | (e.g. >& messages.txt)
I'll echo Kevin's suggestion, and mention that potentially the output of "printenv" might be informative, and I think you can capture everything from a script by using (after the #! line) exec >/tmp/output 2>&1 which I think sends all output of all following commands to /tmp/output.
I also try to check the result of commands in scripts and complain e.g. alsa_out args ... \ || echo 1>&2 "oh not alsa_out failed" or alsa_out args ... ret=$? if [ $ret -ne 0 ]; then echo 1>&2 "alsa_out failed with $ret"
Hope that helps
John --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

My guess is environment variable. Maybe you got some variable as "normal shell variable" instead of "environment variable". Script will get environment variables, but not normal shell variables. --William On 11/6/21 8:25 AM, Jim Ruxton via talk wrote:
Hello,
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
The command line is:
alsa_out -j secondInterface -d hw:3 -c 6
or in a script :
#!/bin/bash alsa_out -j secondInterface -d hw:3 -c 6
I have also tried the shebang #!/bin/sh with the same result. alsa_out is in /usr/bin . I'm on Ubuntu 20.04.
Thanks for any advice here.
Jim
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

Ok, Something I just discovered is if I disable the soundcard for pulseaudio in pavucontrol. Clicking on the script works. I still find it strange however that this is not the case if I run the script on the command line. It runs regardless. Jim On 2021-11-06 11:29 p.m., William Park via talk wrote:
My guess is environment variable. Maybe you got some variable as "normal shell variable" instead of "environment variable". Script will get environment variables, but not normal shell variables. --William
On 11/6/21 8:25 AM, Jim Ruxton via talk wrote:
Hello,
I'm having trouble with a simple script. It adds a second sounccard. This command works on the command line but not in a script. Any ideas why?
The command line is:
alsa_out -j secondInterface -d hw:3 -c 6
or in a script :
#!/bin/bash alsa_out -j secondInterface -d hw:3 -c 6
I have also tried the shebang #!/bin/sh with the same result. alsa_out is in /usr/bin . I'm on Ubuntu 20.04.
Thanks for any advice here.
Jim
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

On 2021-11-07 04:54, Jim Ruxton via talk wrote:
... Clicking on the script works. I still find it strange however that this is not the case if I run the script on the command line. It runs regardless.
This may be very out of date information, but I remember being surprised that a whole lot of Linux sound stuff depended on the X11 DISPLAY variable being set. Maybe it's not set for you on the command line? Stewart (talking of Linux sound, have folks seen Orca — https://hundredrabbits.itch.io/orca ? No, not the screen reader, but Orca "... an esoteric programming language, designed to create procedural sequencers in which each letter of the alphabet is an operation, where lowercase letters operate on bang, uppercase letters operate each frame." It's been described as nethack crossbred with a spreadsheet for making EDM.
participants (11)
-
Alex Volkov
-
D. Hugh Redelmeier
-
Dave Collier-Brown
-
Giles Orr
-
James Knott
-
Jim Ruxton
-
John Sellens
-
Kevin Cozens
-
mwilson@Vex.Net
-
Stewart C. Russell
-
William Park