How do I ring my bell?

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

How do I ring my bell?

Postby kev » Wed Oct 19, 2011 10:44 pm

Hello

I want to write a script that will ring the PC's bell under certain conditions.

The bell works at Boot-time, so I know that it is OK.

I have tried the Konsole:
Settings > Bell > set to system bell

and then echoing 0x07 as well as \a

I have also tried echoing 0x07 and \a in an ordinary { Ctrl-Alt-F2 } terminal.
but it's silent.

What will make it ring please?
kev
 
Posts: 12
Joined: Tue Feb 16, 2010 4:40 pm

Postby Rhakios » Wed Oct 19, 2011 10:55 pm

Doesn't beep do that? Sadly this PC doesn't have an internal speaker, so I can't test it. You might need to install beep, but it's found in most repos I've seen.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby Ram » Thu Oct 20, 2011 12:28 pm

You can ring Solaris' bell with
Code: Select all
echo \\a


Thats with ksh for the shell.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1682
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby MartyBartfast » Thu Oct 20, 2011 1:13 pm

echo -e \\a

works in bash.
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 818
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby kev » Sat Oct 22, 2011 10:09 pm

Well, thanks for your ideas.
Although they didn't work, they did give me ideas for searching the 'net.

The answer in Mandriva is to do the following as Root:
Code: Select all
modprobe pcspkr


and then Ctrl^G and your ideas do work.

Also:
Code: Select all
xset -b

turns it off; and then:
Code: Select all
xset b

turns it back on again.

Unfortunately, I am using Knoppix mostly {kernel 2.6.19} and modprobe gives a FATAL error message.
Ubuntu will load the module, but the bell remains silent.

All of which has overtones of M$.
Knoppix 5.1
kev
 
Posts: 12
Joined: Tue Feb 16, 2010 4:40 pm

Postby kev » Mon Oct 24, 2011 8:01 pm

I have now found out that in Ubuntu:

The missing PC bell is a BIG issue;
more than that: it is a thoroughly disgraceful mess, the likes of which M$ users niether have nor will EVER have to put up with.

Read this ubuntu thread from post #79 onwards.
Knoppix 5.1
kev
 
Posts: 12
Joined: Tue Feb 16, 2010 4:40 pm

Postby Rhakios » Mon Oct 24, 2011 9:58 pm

Essentially, the problem is that Mark Shuttleworth wants your computer to go Bongggg!!!, like a Mac does on startup. However, as he can't achieve this, he's had them disable the bell.

Of course, this might be entirely untrue. :)
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby Ram » Tue Oct 25, 2011 12:57 am

Rhakios wrote:Essentially, the problem is that Mark Shuttleworth wants your computer to go Bongggg!!!, like a Mac does on startup. However, as he can't achieve this, he's had them disable the bell.

Of course, this might be entirely untrue. :)


Then it could just as easy be true, since I keep having to re-install alsa after every kernel update as sound only work via head phones not the speakers, also effecting my netbook now with Mint 8 and the fix I use for my laptop doesnee work Jimmy.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1682
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests