<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/23/2016 01:25 PM, Ralf Mardorf
wrote:<br>
</div>
<blockquote cite="mid:20161023202525.5aac4edb@moonstudio"
type="cite">
<pre wrap="">Hi,
I'm using lubuntu-16.10-desktop-amd64.iso as live media. After the Lxde
session started I run a script [attached]. One thing done by the script
is enabling the PC speaker beep.
If the script run for one time launched in lxterminal, the bell doesn't
work. Nothing pulseaudio related is shown by ps aux and lsmod shows that
pcspkr is loaded after the script run. All changes applied to lxterminal
and xfce4-terminal are applied, I just need to close and open
lxterminal, resp. just open xfce4-terminal for the first time. However,
the bell doesn't work. If I run the script for the second time, the bell
works, even without closing and opening a terminal again, but not
before I closed and opened lxterminal one time.
If a mechanism would lock something as long as lxterminal is opened,
just closing and reopening the terminal should do the trick. I don't
understand why it works, if I close and reopen the terminal + run the
script a second time. As far as I can see nothing in this script and
the 126428 similar scripts I tested before, does something related to
the issue. Nothing that already is killed, purged and loaded gets
killed, purged or loaded a second time.
Any idea how I could enable the bell by running a script just one time?
Regards,
Ralf</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
maybe you need a bit of time after it loads...<br>
perhaps running<br>
<p><tt>modprobe pcspkr && sleep 10 # or whatever amount you
want</tt></p>
<p><tt>## the only real thing getting done would be sourcing your
bashrc</tt></p>
<p><tt>source ~/.bashrc ## you might need /home/user instead of ~
if you run as root</tt><tt><br>
</tt></p>
<p><tt>printf \\a</tt></p>
<p><br>
</p>
<p>####</p>
<p>the other thing ???????might?????? be an issue is that xset
*might* need to be 'refreshed' with <br>
</p>
<p>xset b on</p>
<p>Though you could add<br>
</p>
<p>xset q |grep bell</p>
<p>before the modprobe to see if you need that.... which you
probably don't.</p>
<p><br>
</p>
<p>Also... you might need to use setterm</p>
<p>setterm --bleangth 1000</p>
<p>maybe even the --bfreq option...</p>
<p>Just some guesses... I have never tried to enable the beep
personally, only disable it :D<br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Regards</pre>
</body>
</html>