Beep, when SUSE is up and running.
Hi, Recently I setup a SUSE 9.3 for router/firewall/proxy purposes, which starts up in runlevel 3. It has no peripheries or monitor at all, but I would like to be "notified", when the system is up and running. So, is there an easy way please to make the router beep e.g. through the speaker of the system, when we can in fact use its resources already?! Thanks, Pelibali
On 10/9/05, pelibali
Hi,
Recently I setup a SUSE 9.3 for router/firewall/proxy purposes, which starts up in runlevel 3. It has no peripheries or monitor at all, but I would like to be "notified", when the system is up and running. So, is there an easy way please to make the router beep e.g. through the speaker of the system, when we can in fact use its resources already?!
man beep + a small script should do it. \Steve
Hi, On Sun, 9 Oct 2005 09:55:21 +0200 Steve Graegert <.> wrote:
On 10/9/05, pelibali <.> wrote:
Hi,
Recently I setup a SUSE 9.3 for router/firewall/proxy purposes, which starts up in runlevel 3. It has no peripheries or monitor at all, but I would like to be "notified", when the system is up and running. So, is there an easy way please to make the router beep e.g. through the speaker of the system, when we can in fact use its resources already?!
man beep + a small script should do it.
Hmmm, maybe for you it's trivial, for me it is not:( 'man beep' is quite uninformative; 'beep' alone works, but none of my attempts, as beep 100 beep -100 beep 100% beep(100) change anything:( I wouldn't like you to solve my problem, but please if you can, give me a single hint, e.g. _where_ to put that "small script"... e.g. just now I made an executable file containing
#!/bin/sh beep <<< and put it into '/etc/init.d/beepsy', then symlinked it to '/etc/init.d/rc3.d/512beepsy' and no beep happens at all...
Thanks, Pelibali;)
On 10/9/05, pelibali
Hi,
On Sun, 9 Oct 2005 09:55:21 +0200 Steve Graegert <.> wrote:
On 10/9/05, pelibali <.> wrote:
Hi,
Recently I setup a SUSE 9.3 for router/firewall/proxy purposes, which starts up in runlevel 3. It has no peripheries or monitor at all, but I would like to be "notified", when the system is up and running. So, is there an easy way please to make the router beep e.g. through the speaker of the system, when we can in fact use its resources already?!
man beep + a small script should do it.
Hmmm, maybe for you it's trivial, for me it is not:( 'man beep' is quite uninformative; 'beep' alone works, but none of my attempts, as
beep 100 beep -100 beep 100% beep(100)
change anything:( I wouldn't like you to solve my problem, but please if you can, give me a single hint, e.g. _where_ to put that "small script"...
e.g. just now I made an executable file containing
#!/bin/sh beep <<<
beep is a builtin command and can be invoked as /bin/bash -i -c beep Put this line into your script and beeps everytime the system's up and running. Alternatively you can use echo $'\a' to enhance portability in case bash is not available. \Steve
Pelibali, On Sunday 09 October 2005 04:14, pelibali wrote:
...
man beep + a small script should do it.
Hmmm, maybe for you it's trivial, for me it is not:( 'man beep' is quite uninformative; 'beep' alone works, but none of my attempts, as
beep 100 beep -100 beep 100% beep(100)
Actually, the "beep" that Steve G. referred to does not have a man page. What you get when you run "man beep" is a man page for the Tk BLT library. That explains why your attempt to use what's defined there does not produce results consistent with the description.
...
e.g. just now I made an executable file containing
#!/bin/sh beep <<< and put it into '/etc/init.d/beepsy', then symlinked it to '/etc/init.d/rc3.d/512beepsy' and no beep happens at all...
The "beep" command is just an alias defined within one of the BASH start-up scripts. Use the fallback equivalent also mentioned by Steve: echo -n $'\a'
Thanks, Pelibali;)
Randall Schulz
On 10/9/05, Randall R Schulz
Pelibali,
On Sunday 09 October 2005 04:14, pelibali wrote:
...
man beep + a small script should do it.
Hmmm, maybe for you it's trivial, for me it is not:( 'man beep' is quite uninformative; 'beep' alone works, but none of my attempts, as
beep 100 beep -100 beep 100% beep(100)
Actually, the "beep" that Steve G. referred to does not have a man page. What you get when you run "man beep" is a man page for the Tk BLT library. That explains why your attempt to use what's defined there does not produce results consistent with the description.
...
e.g. just now I made an executable file containing
#!/bin/sh beep <<< and put it into '/etc/init.d/beepsy', then symlinked it to '/etc/init.d/rc3.d/512beepsy' and no beep happens at all...
The "beep" command is just an alias defined within one of the BASH start-up scripts. Use the fallback equivalent also mentioned by Steve:
echo -n $'\a'
Ok, thanks for the update. Thought that beep is a bash built-in command. (Actually I never used beep but I remembered that there was a beep function in BASIC, so I hacked in and voilà it beeped. Quite surprising for me :-) \Steve
pelibali wrote:
Hi,
Recently I setup a SUSE 9.3 for router/firewall/proxy purposes, which starts up in runlevel 3. It has no peripheries or monitor at all, but I would like to be "notified", when the system is up and running. So, is there an easy way please to make the router beep e.g. through the speaker of the system, when we can in fact use its resources already?!
You could add a command to one of the scripts. I don't recall what the command for a beep is though.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2005-10-09 at 09:08 +0200, pelibali wrote:
Recently I setup a SUSE 9.3 for router/firewall/proxy purposes, which starts up in runlevel 3. It has no peripheries or monitor at all, but I would like to be "notified", when the system is up and running. So, is there an easy way please to make the router beep e.g. through the speaker of the system, when we can in fact use its resources already?!
The script '/etc/init.d/after.local' is called by '/etc/init.d/rc' just after runlevel change, and can be used for the purpose. For example, mine has this code: #! /bin/bash cat /usr/share/sounds/au/hal9.au > /dev/audio & That only works if sound is available, but I find it "cute". To use a beep with the internal speaker, you could do: echo -en "\a" A more complicated "beep" tone could be: # octave for tone in 524 491 440 393 349 328 295 ; do echo -en "\033[10;${tone}]\a" usleep 125000 done echo -en "\033[10;262]" which you can see in '/etc/init.d/halt', and a few more. Knowing the trick, and the musical notes frequencies, you could play anything. A problem with beeping in Linux is that you need to have console output to beep anything at all. Thus, a script run from cron can not beep. A pity. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDSQuwtTMYHG2NR9URAvztAJoD9mGFQm4RQMFwoaDEMTUO/4IeMACcCpwb nn1V4FgnKIPeS0FOfyWDdeI= =4Yd+ -----END PGP SIGNATURE-----
Hi, On Sun, 9 Oct 2005 14:23:09 +0200 (CEST) "Carlos E. R." <.> wrote:
The script '/etc/init.d/after.local' is called by '/etc/init.d/rc' just after runlevel change, and can be used for the purpose. For example, mine has this code:
#! /bin/bash cat /usr/share/sounds/au/hal9.au > /dev/audio &
That only works if sound is available, but I find it "cute". To use a beep with the internal speaker, you could do:
echo -en "\a"
Thanks a lot Carlos, works flawlessly also on SUSE 10.0! By the way which access-rights did you define for that file? I made my copy (root:root,0755). Regards, Pelibali
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2005-10-29 at 13:58 +0200, pelibali wrote:
Thanks a lot Carlos, works flawlessly also on SUSE 10.0! By the way which access-rights did you define for that file? I made my copy (root:root,0755).
- -rwxr-xr-x 1 root root 328 2005-05-22 21:32 /etc/init.d/after.local* which is wrong, I think, but it is the same as many of the other scripts, made by SuSE. It should be "-rwxr--r-- 1 root root", IMO. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDZBIktTMYHG2NR9URAjYyAJ0YRBen4Y8wkmGs31wPllsQDU9cvQCcCET5 byMLNfnfAxgtOngIwQE2rDU= =RKll -----END PGP SIGNATURE-----
participants (5)
-
Carlos E. R.
-
James Knott
-
pelibali
-
Randall R Schulz
-
Steve Graegert