This forum has been archived. All content is frozen. Please use KDE Discuss instead.

"beep" and "printf '\a' " don't work in Konsole

Tags: None
(comma "," separated)
onkeltem
Registered Member
Posts
5
Karma
0
I'd like to use
Code: Select all
beep
or
Code: Select all
printf '\a'
in my scripts but these commands just don't work - i.e. not playing any sound and I couldn't find a way to get them working.

I don't speak about pc speaker sound, no. I need them to play some notification sound but I didn't find anything related in neither of these places:
- System Settings > Notifications
- System Settings > Multimedia
- Konsole > Configure Notifications

Any ideas how to get this trivial thing working?
airdrik
Registered Member
Posts
1854
Karma
5
OS
Testing on Ubuntu 18.04, Konsole 17.12.3 (kde frameworks 5.47.0, qt 5.9.5)

In Konsole > Configure Notifications, for Bell in Visible Session: check Play a sound and set that to Oxygen-Sys-App-Message.ogg (initially that was empty and needed to be filled in to specify which sound to play when handling the Bell notification). Then running "printf '\a' " at the command prompt caused the sound to play.

Did you make sure to specify a sound to play when configuring the Konsole events?


airdrik, proud to be a member of KDE forums since 2008-Dec.
onkeltem
Registered Member
Posts
5
Karma
0
airdrik wrote:In Konsole > Configure Notifications, for Bell in Visible Session: check Play a sound and set that to Oxygen-Sys-App-Message.ogg (initially that was empty and needed to be filled in to specify which sound to play when handling the Bell notification). Then running "printf '\a' " at the command prompt caused the sound to play.


Hi! Yeah, I enabled what you said and both print '\a' and beep work, but it also triggers the sound every time some activity happens.
E.g. if I issue ls - it chimes. That's not what I want really - listen to ding ding ding while I work in a console.

P.S. How to mark inline code here?
airdrik
Registered Member
Posts
1854
Karma
5
OS
I don't think the terminal emulator is able to distinguish as they both use the same mechanism to emit the beep.

You'd probably have to configure it in bash, ls or whatever other commands are emitting the beep that you don't want. This SO question has answers for turning it off for Readline-based apps such as bash('s tab-completion)


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft