On Fri, Oct 18, 2024 at 3:00 PM Arbol One <ArbolOne@hotmail.ca> wrote:
Hello everyone.
Could anyone tell me how to make Debian 12-gnome-terminal make a beep sound after completing a shell script.
Way back in the day I used to do this:
echo '^G'
On Fri, Oct 18, 2024 at 7:10 PM Arbol One <ArbolOne@hotmail.ca> wrote:
Hello everyone.
Could anyone tell me how to make Debian 12-gnome-terminal make a beep
sound after completing a shell script.
Thanks in advance.
I googled around and found:
- tput bel: This command uses the tput utility to send the "bell"
control character to the terminal.
- echo -e "\a": The -e option enables interpretation of backslash
escapes, and \a represents the bell character.
- printf "\a": The printf command works similarly to echo -e "\a".
I tested them with no prevail.
--
*ArbolOne ™*
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing
free services to charitable organizations.
ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in progress [ í ]
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀
On Fri, Oct 18, 2024 at 7:10 PM Arbol One <ArbolOne@hotmail.ca> wrote:
Hello everyone.
Could anyone tell me how to make Debian 12-gnome-terminal make a beep
sound after completing a shell script.
Thanks in advance.
Instead of a plain beep you can play an mp3 instead.
sudo apt install alsaplayer-text
alsaplayer "/Path/To/Mp3"
This works on my system.
--
*ArbolOne ™*
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing
free services to charitable organizations.
ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in progress [ í ]
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀
On Sat, Oct 19, 2024 at 13:58:56 +1100, George at Clug wrote:user account (e.g. not the root user):
When logged in as root, the following worked for me using a local
/usr/share/sounds/purple/alert.wav'# runuser --user notroot -- bash -lic 'aplay
Huh, interesting. That --user option is NOT in the manpage. I'm
guessing it's a synonym for -u. (I verified that it actually doesthough. You
work on Debian 12. It's just not documented.)
The bash -lic '...' wrapper seems like overkill to me,
don't need a login shell (-l) or an interactive shell (-i) to runis
that aplay command.
I also wonder whether runuser is actually needed there, or whether
setpriv would be sufficient. It might depend on whether "notroot"
already logged in to establish a "seat" or whatever it's called withtest,
access to the audio devices. (That's another thing I'd want to
if this were my project -- does "notroot" need to be logged in for
this to work?)
</span></div>aplay: main:831: audio open error: Host is down<br>
<br></div><div>And I found that this worked even without the -l and -i <br></div><div><span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;"># runuser --user loggedinnotrootuser -- bash -c 'aplay /usr/share/sounds/sound-icons/prompt.wav'</span></span></div><div><br></div><div>I was not able get "# sudo -u" to work in place of using runuser.<br></div><div><br></div><div>So much more testing one could do.<br></div><div><br></div>
When logged in as root, the following worked for me using a local user account (e.g. not the root user):
# runuser --user notroot -- bash -lic 'aplay /usr/share/sounds/purple/alert.wav'
On Saturday, 19-10-2024 at 14:20 Greg Wooledge wrote:
I also wonder whether runuser is actually needed there, or whether
setpriv would be sufficient.It might depend on whether "notroot" is already logged in to establish a "seat" or whatever it's called with
access to the audio devices.(That's another thing I'd want to test,
if this were my project -- does "notroot" need to be logged in for
this to work?)
I was curious too:
# runuser --user notloggedinnotrootuser -- bash -lic 'aplay /usr/share/sounds/sound-icons/prompt.wav'
aplay: main:831: audio open error: Host is down
I guess you have to be logged in as yourself, using your own user
account, then open a terminal and su in as root.
And I found that this worked even without the -l and -i
# runuser --user loggedinnotrootuser -- bash -c 'aplay /usr/share/sounds/sound-icons/prompt.wav'
I was not able get "# sudo -u" to work in place of using runuser.
So much more testing one could do.
aplay /usr/share/sounds/alsa/Front_Center.wavjob 1 at Sat Oct 19 09:07:00 2024
<EOT>
On Fri, Oct 18, 2024 at 15:05:31 -0700, Larry Martell wrote:
On Fri, Oct 18, 2024 at 3:00 PM Arbol One <ArbolOne@hotmail.ca> wrote:
Hello everyone.
Could anyone tell me how to make Debian 12-gnome-terminal make a beep sound after completing a shell script.
Way back in the day I used to do this:
echo '^G'
The more-portable version of this is printf '\a'.
The issue, though, is that what the terminal *does* with this \007
byte depends on a truly formidable number of different settings and
layers. The terminal may cause the system to beep, or it may flash,
or it may do nothing at all.
Arbol One could try printf '\a' and see what happens. If they get a
beep, then all is well, and they can use this however they see fit.
But if it doesn't beep, then trying to diagnose *why* could be tricky.
If diagnosis/modification is needed, they might start with "xset q"
and see whether the bell is enabled in that particular layer. If
not, xset can change that setting. If the bell is enabled in xset but
still not audible, then I don't know what the next layer to check is.
(GNOME? ALSA? Pulse audio? Pipewire?)
Try this, it's so much fun!!
sleep 1; spd-say I; sleep 0.5; spd-say am; sleep 1; spd-say finished
On Sat, Oct 19, 2024 at 4:03 AM Greg Wooledge <greg@wooledge.org> wrote:
The terminal may cause the system to beep, or it may flash,
or it may do nothing at all.
Another issue is that some newer motherboards might not even have the
beeper physically installed.
* eben@gmx.us [24-10/22=Tue 11:06 -0400]:
Raj Kiran Grandhi wrote:
Another issue is that some newer motherboards might not even have the
beeper physically installed.
There is that. Fortunately you can buy them
cheaply. Well, tiny piezo things that do the job.
This is something I really need. What search string should I use to
find them? My mobo is a Gigabyte B450M DS3H WIFI (rev 1.5), manual
at <https://www.gigabyte.com/Motherboard/B450M-DS3H-WIFI-rev-15>.
On 10/18/24 21:14, Raj Kiran Grandhi wrote:
Another issue is that some newer motherboards might not even have the
beeper physically installed.
There is that. Fortunately you can buy them
cheaply. Well, tiny piezo things that do the job.
* eben@gmx.us <eben@gmx.us> [24-10/22=Tue 11:06 -0400]:
On 10/18/24 21:14, Raj Kiran Grandhi wrote:
Another issue is that some newer motherboards might not even have the
beeper physically installed.
There is that. Fortunately you can buy them
cheaply. Well, tiny piezo things that do the job.
This is something I really need. What search string should I use to
find them? My mobo is a Gigabyte B450M DS3H WIFI (rev 1.5), manual
at <https://www.gigabyte.com/Motherboard/B450M-DS3H-WIFI-rev-15>.
* eben@gmx.us <eben@gmx.us> [24-10/22=Tue 11:06 -0400]:
On 10/18/24 21:14, Raj Kiran Grandhi wrote:
Another issue is that some newer motherboards might not even have the
beeper physically installed.
There is that. Fortunately you can buy them
cheaply. Well, tiny piezo things that do the job.
This is something I really need. What search string should I use to
find them? My mobo is a Gigabyte B450M DS3H WIFI (rev 1.5), manual
at <https://www.gigabyte.com/Motherboard/B450M-DS3H-WIFI-rev-15>.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 164:11:20 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,517 |