Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to beep in perl in Linux konsole

Status
Not open for further replies.

redsss

Programmer
Mar 17, 2004
72
US
I am seeking a way in perl to sound a beep in a "konsole" session under linux.

I can run a 1 line perl script containing "printf \007" which will beep in a fullscreen CONSOLE session, but it won't beep in a KONSOLE session window under KDE. Perhaps the escape code is intercepted by the konsole application...

I know there is a way to make a beep in a KONSOLE session, because (for example) the "import" command (screenshot utility) DOES make a beep in a konsole session.

Ideas?
 
print "\g";

might do it, though it may be down to application settings
--Paul

Nancy Griffith - songstress extraordinaire,
and composer of the snipers anthem "From a distance ...
 
Tried it under Windows, the \g does not work but the \007 does. James is clearly the winner ;)
 
Try messing with the terminal type, I'm not sure but I thing CTRL-G works with a VT100 type terminal

HTH
--Paul

Nancy Griffith - songstress extraordinaire,
and composer of the snipers anthem "From a distance ...
 
\a" is the alarm/bell character. Have you tried that yet?
 
My console session (where \007 works) has TERM=linux, but changing TERM from xterm to linux in my KONSOLE session still didnt give me a beep, whether using \007, \a or \g

Ideas?
 
That article got me on the right track... I just had to choose "use system bell" in the KDE control center, as well as in the konsole settings. And now it works!

Thanks for the tip!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top