On 10/23/2016 01:25 PM, Ralf Mardorf wrote: > 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 > > maybe you need a bit of time after it loads... perhaps running
modprobe pcspkr && sleep 10 # or whatever amount you want ## the only real thing getting done would be sourcing your bashrc source ~/.bashrc ## you might need /home/user instead of ~ if you run as root printf \\a #### the other thing ???????might?????? be an issue is that xset *might* need to be 'refreshed' with xset b on Though you could add xset q |grep bell before the modprobe to see if you need that.... which you probably don't. Also... you might need to use setterm setterm --bleangth 1000 maybe even the --bfreq option... Just some guesses... I have never tried to enable the beep personally, only disable it :D -- Regards
-- Lubuntu-users mailing list Lubuntu-users@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/lubuntu-users