Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I ring my bell?

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
kev



Joined: Tue Feb 16, 2010 4:40 pm
Posts: 12

PostPosted: Wed Oct 19, 2011 11:44 pm    Post subject: How do I ring my bell? Reply with quote

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?
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7632
Location: Midlands, UK

PostPosted: Wed Oct 19, 2011 11:55 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1672
Location: Guisborough

PostPosted: Thu Oct 20, 2011 1:28 pm    Post subject: Reply with quote

You can ring Solaris' bell with
Code:
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.....
Back to top
View user's profile Send private message MSN Messenger
MartyBartfast
LXF regular


Joined: Mon Aug 22, 2005 8:25 am
Posts: 814
Location: Hants, UK

PostPosted: Thu Oct 20, 2011 2:13 pm    Post subject: Reply with quote

echo -e \\a

works in bash.
_________________
I have been touched by his noodly appendage.
Back to top
View user's profile Send private message
kev



Joined: Tue Feb 16, 2010 4:40 pm
Posts: 12

PostPosted: Sat Oct 22, 2011 11:09 pm    Post subject: Reply with quote

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:
modprobe pcspkr


and then Ctrl^G and your ideas do work.

Also:
Code:
xset -b

turns it off; and then:
Code:
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
Back to top
View user's profile Send private message
kev



Joined: Tue Feb 16, 2010 4:40 pm
Posts: 12

PostPosted: Mon Oct 24, 2011 9:01 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7632
Location: Midlands, UK

PostPosted: Mon Oct 24, 2011 10:58 pm    Post subject: Reply with quote

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. Smile
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1672
Location: Guisborough

PostPosted: Tue Oct 25, 2011 1:57 am    Post subject: Reply with quote

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. Smile


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.....
Back to top
View user's profile Send private message MSN Messenger
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast