LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2005, 01:01 AM   #1
hk_linux
Member
 
Registered: Nov 2004
Location: India
Distribution: RedHat, PCQLinux, Fedora
Posts: 95

Rep: Reputation: 15
beep from xterm


hi,
I am trying to raise continous beep from a script.

< code>
while :
do
echo -ne "\a"
usleep 1000
done
< /code>

This works fine if i run from a terminal. If i run the same from the xterm, it is not raising a beep. Finally i want this script to be called from another script.

Is there any setting which will control the beep.

Also in the /etc/inputrc, the line
# set bell-style none
is commented. The comment in the previous line also says that, this setting is only for the tab-completion.

Please help me.

TIA.
 
Old 02-10-2005, 04:17 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
beep on xterm depends on if you are accessing a local
machine probably.

Look at xset
you can set the duration of the beep etc. here.


Changing the default beep on console:
I can't test this as I'm on solaris at work.
But there are 2 escape sequences for this.
These change the default beep.

They are something like this (the numbers 10 + 11 are def. correct):

ESC[10;n where n is the frequency
ESC[11;n where n is the duration in milliseconds

so try (in bash need echo -e, ksh just echo or print):

Code:
echo -e  "\033[10;1000]\a"
echo -e  "\033[11;1000]\a"

Last edited by bigearsbilly; 02-10-2005 at 04:21 AM.
 
Old 02-10-2005, 09:41 PM   #3
hk_linux
Member
 
Registered: Nov 2004
Location: India
Distribution: RedHat, PCQLinux, Fedora
Posts: 95

Original Poster
Rep: Reputation: 15
thanks billy, That worked really good.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xterm - howto lauch an xterm into a specific directory jobano Linux - Software 11 01-30-2023 04:45 AM
looking for a beep lungsucker Programming 3 07-11-2005 08:01 AM
how is black xterm background in IceWM when issue a xterm command? BRAHmS Linux - Software 1 02-14-2005 03:51 AM
Beep Beep! Linux~Powered Linux - Hardware 3 05-18-2004 06:28 AM
Beep pixelV Slackware 10 01-04-2003 02:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration