You are not logged in.

#1 2020-06-22 14:15:00

tethys
Member
Registered: 2019-08-13
Posts: 178

[SOLVED] Bell in Gnome terminal with Openbox

Hello Arch community,

tl;dr: How do I make Gnome terminal beep when launched from Openbox? Now 'echo -e "\a"' doesn't produce any sound.

I have a problem with the sound on my laptop. I am using Openbox, but first a will give a little history. Initially I installed Gnome on this old laptop some time ago but I had video problems with Gnome that became worse so I installed Openbox, which I am using now. It's a very basic Openbox installation, just openbox and obconf.

Now back to the sound problems. I noticed that, other than in Gnome, when using "Gnome terminal" in Openbox:
- the "Gnome terminal" does not produce any sound when for example pressing the left arrow on an empty line;
- 'echo -e "\a"' does not produce any sound either, and I need this for some scripts I am using.

I must mention that I can hear sound when I play videos/music as well as sound from notifications. I can also use the "Gnome Control Center" > Audio to control the volume of speakers and microphone.

So the question: how can I make 'echo -e "\a"' produce a sound when using "Gnome terminal" in Openbox? I would appreciate if somebody could give me a hint where to look to fix this.

Last edited by tethys (2020-06-25 14:58:26)

Offline

#2 2020-06-22 16:01:46

StJimmy
Member
From: Rheinland
Registered: 2020-02-26
Posts: 72

Re: [SOLVED] Bell in Gnome terminal with Openbox

This may or may not be a shot in the dark:
- Do you have libcanberra and either libcanberra-pulse or libcanberra-gstreamer installed? That's what's normally required to get event sounds to play and the bell to be rung.
If you have PulseAudio installed, maybe also this:
- When I installed Arch on my system, the bell wasn't enabled in spite of that library and module being installed and enabled. I had to modify /etc/pulse/default.pa and added the following lines to it:

load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/bell.oga
load-module module-x11-bell sample=x11-bell

Although I believe there's also a user-specific configuration file for it as well (~/.pulse/default.pa), if you're not comfortable editing system-wide configuration files. Then simply add the lines to that file, rather than to the one in /etc/pulse. Either way, restart PulseAudio afterwards with pulseaudio -k. You may need to load the Canberra GTK module if it's not loaded, too.


Nanos gigantum humeris insidentes.

Online

#3 2020-06-23 14:29:09

tethys
Member
Registered: 2019-08-13
Posts: 178

Re: [SOLVED] Bell in Gnome terminal with Openbox

Thank you for your answer, StJimmy!

Yes I have all sorts of canberra's installed, I do get sound from other applications, the problem is only with Gnome terminal it seems.

Regarding your second point, I tested it but in didn't work. In fact, after adding the two lines to the ~/config/.pulse/default.pa, the system became very slow/unresponsive so I had to revert the change.

Offline

#4 2020-06-23 14:33:46

StJimmy
Member
From: Rheinland
Registered: 2020-02-26
Posts: 72

Re: [SOLVED] Bell in Gnome terminal with Openbox

Another guess in the dark, but maybe something I should've also added in my previous post:
Do you have any system sound scheme installed? Something like sound-theme-freedesktop [repositories], ubuntu-sounds [AUR] or mint-sounds [AUR]? I assumed that to be installed - it may be that if Pulse doesn't find the sound file, it chokes itself.


Nanos gigantum humeris insidentes.

Online

#5 2020-06-23 14:36:15

tethys
Member
Registered: 2019-08-13
Posts: 178

Re: [SOLVED] Bell in Gnome terminal with Openbox

StJimmy wrote:

Another guess in the dark, but maybe something I should've also added in my previous post:
Do you have any system sound scheme installed? Something like sound-theme-freedesktop [repositories], ubuntu-sounds [AUR] or mint-sounds [AUR]? I assumed that to be installed - it may be that if Pulse doesn't find the sound file, it chokes itself.

No, I don't!

Offline

#6 2020-06-23 14:39:42

StJimmy
Member
From: Rheinland
Registered: 2020-02-26
Posts: 72

Re: [SOLVED] Bell in Gnome terminal with Openbox

Try installing that (I'd take sound-theme-freedesktop, as it's in the repos and also what I used in my example), add the lines to the PulseAudio config file, and see if it works then. If it does, it was the absence of the sound theme that was the issue - if not, there may be something else that might be the underlying cause.


Nanos gigantum humeris insidentes.

Online

#7 2020-06-23 14:48:27

tethys
Member
Registered: 2019-08-13
Posts: 178

Re: [SOLVED] Bell in Gnome terminal with Openbox

Sorry for the previous wrong answer, I do have sound-theme-freedesktop installed as a dependency of the gnome-control-center (I have Gnome installed).

Offline

#8 2020-06-25 14:54:03

tethys
Member
Registered: 2019-08-13
Posts: 178

Re: [SOLVED] Bell in Gnome terminal with Openbox

I found the solution. Add the following two lines to the Openbox autostart configuration file:

pactl upload-sample /usr/share/sounds/freedesktop/stereo/bell.oga bell
pactl load-module module-x11-bell sample=bell

Could someone post this solution in the Wiki Openbox?

Last edited by tethys (2020-06-25 14:57:02)

Offline

Board footer

Powered by FluxBB