You are not logged in.

#1 2018-04-22 11:13:49

nesk
Member
Registered: 2011-03-31
Posts: 187

[solved] How to enable beep?

No, there's no typo - I want to enable it to have vim/less/bash etc beeping on reaching end of file and similar actions.

The system is a Dell E5450 laptop - I'm not sure if it has an internal "beep" speaker.
Things I tried/checked (according to Wiki article https://wiki.archlinux.org/index.php/PC_speaker ):

  • pcspkr module is loaded

  • "Beep" channel is unmuted in alsamixer

  • Loading snd-pcsp module instead of pcspkr - there's no snd-pcsp in 4.16 kernel. https://unix.stackexchange.com/question … -beep#1980

  • xset b

  • set bell-style audible in .inputrc

  • checked ~/.gtkrc-2.0 - there's no "gtk-error-bell = 0" line there

With all of the above doing echo -ne '\007' doesn't produce any sound, neither does reaching end of file in less or pressing multiple Esc in vim. I don't want to use bell program with setuid, seems like unwarranted privilege escalation.
Any advice?

Last edited by nesk (2018-04-22 16:59:12)

Offline

#2 2018-04-22 12:22:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,523
Website

Re: [solved] How to enable beep?

nesk wrote:

The system is a Dell E5450 laptop - I'm not sure if it has an internal "beep" speaker.

The present evidence would suggest it doesn't have one.  You should have a beep by default, and you've confirmed all the right bits at the OS/software level.  So that leaves just a hardware limitation or perhaps BIOS/firmware settings.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-04-22 16:33:12

nesk
Member
Registered: 2011-03-31
Posts: 187

Re: [solved] How to enable beep?

Looks like the system is capable of beeping after all: when I log in just to tty there are beeps! For example by doing echo -ne '\007'. Had to enable "Loopback Mixing" in alsamixer for it to be loud enough (without it I could barely hear it).
But when I startx - no beeps at all.

~/.xinitrc:

~:cat .xinitrc
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
exec i3

Stuff in /etc/X11/xinit/xinitrc.d/:

~:cat /etc/X11/xinit/xinitrc.d/*
#!/bin/sh

case "${DESKTOP_SESSION-}" in
  gnome*) # Done by gnome-settings-daemon
  ;;
  *)
    # Extra check in case DESKTOP_SESSION is not set correctly
    if [ -z "${GNOME_DESKTOP_SESSION_ID-}" ]; then
      GTK_MODULES="${GTK_MODULES:+$GTK_MODULES:}canberra-gtk-module"
      export GTK_MODULES
    fi
  ;;
esac
#!/bin/sh

systemctl --user import-environment DISPLAY XAUTHORITY

if command -v dbus-update-activation-environment >/dev/null 2>&1; then
        dbus-update-activation-environment DISPLAY XAUTHORITY
fi

~/.Xresources:

~:cat .Xresources
xscreensaver.logFile:/dev/null
xscreensaver.verbose:false
XTerm*selectToClipboard: true
XTerm*locale: true
Xterm*saveLines: 4096
XTerm*reverseVideo: on
  • i3's config doesn't exec anything related to sound, and I disabled all startup applications

  • $HOME/.Xmodmap, /etc/X11/xinit/.Xresources and /etc/X11/xinit/.Xmodmap do not exist.

  • ~/.asoundrc and /etc/asound.conf do not exist

With all those threads and a Wiki article dedicated to getting rid of the beep you'd think enabling it would be easy...
Any ideas please?

Offline

#4 2018-04-22 16:58:46

nesk
Member
Registered: 2011-03-31
Posts: 187

Re: [solved] How to enable beep?

OK, I got it - my terminal program (termite) had it disabled by default, started working after enabling it in config.
Now to find a way to feed a .wav file to it - default sound is rather boring...

Offline

Board footer

Powered by FluxBB