|
Home > Archive > Unix Shell > February 2007 > basic question: other than xset how to turn terminal bell off
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
basic question: other than xset how to turn terminal bell off
|
|
| atishay 2007-02-12, 1:18 pm |
| Hi
I am a solaris user. How do we turn the terminal bell off. One way is
to use xset. But xset will not work when we do not have a XWindow
running. How can i turn the bell off in that case.
thanks/atishay
| |
| Stephane CHAZELAS 2007-02-12, 1:18 pm |
| 2007-02-12, 10:43(-08), atishay:
> Hi
> I am a solaris user. How do we turn the terminal bell off. One way is
> to use xset. But xset will not work when we do not have a XWindow
> running. How can i turn the bell off in that case.
[...]
One way can be to used GNU screen.
Another could be to use
script | tr -d '\7'
Another could be to use expect
expect -c '
spawn $env(SHELL)
interact {
-o \007 {}
}'
If your applications are smart enough to use the termcap or
terminfo databases to decide which character sequence to send to
generate a bell, you could make your own terminfo/termcap entry
where "bel" is disabled.
--
Stéphane
| |
| atishay 2007-02-12, 7:28 pm |
| On Feb 13, 12:07 am, Stephane CHAZELAS <this.addr...@is.invalid>
wrote:
> 2007-02-12, 10:43(-08), atishay:> Hi
>
> [...]
>
> One way can be to used GNU screen.
Yes! I do use screen for my dev environment.
>
> Another could be to use
>
> script | tr -d '\7'
I need to study in detail what are we doing here. I get output like
following
[0] root@braveheart:easyput2# script | tr -d
'\7' =
[0:48:33]
ZFC Load Status: Setting Environment ... xset: unable to open display
""
[0] root@braveheart:easyput2#
pwd
[0:48:54]
/space/easyput2
[0] root@braveheart:easyput2#
ls
[0:49:00]
apollotool/ typescript
*checkpoint*
Cursor waits at checkpoint and does not display when i type the
command unless I press enter here.
>
> Another could be to use expect
>
> expect -c '
> spawn $env(SHELL)
> interact {
> -o \007 {}
> }'
>
> If your applications are smart enough to use the termcap or
> terminfo databases to decide which character sequence to send to
> generate a bell, you could make your own terminfo/termcap entry
> where "bel" is disabled.
Thank you for this info.
What I am looking for is something basic. Say I do a command line
login in solaris. There is no XWindow running. I am on shell (zsh)
prompt and not using screen, then How do I turn of the terminal bell
because xset does not work? What is it that I need to modify so that I
do not get the terminal bell?
Thank you
--
Atishay
>
> --
> St=E9phane
| |
| Stephane CHAZELAS 2007-02-12, 7:28 pm |
| 2007-02-12, 11:25(-08), atishay:
[...]
> What I am looking for is something basic. Say I do a command line
> login in solaris. There is no XWindow running. I am on shell (zsh)
> prompt and not using screen, then How do I turn of the terminal bell
> because xset does not work? What is it that I need to modify so that I
> do not get the terminal bell?
[...]
Solaris will issue a sound when the character 0x7 is written to
$TTY by any of the application you're running. You can either
tell your applications to stop sending those characters. Like
for zsh, "setopt nobeep nohistbeep nolistbeep"
Or you can tell your applications, that they need to send
something else if they want to beep (like... nothing), that's
the termcap/termindo approach.
You can tell Solaris not to beep on 0x7, I don't know how you do
that. On Linux, you would do for instance "rmmod pcspkr", there
may be an equivalent for Solaris.
You can use an application like expect, script or screen that
run applications in a pseudo-tty, and that intercepts the
0x7 characters so that they are not sent to the real tty.
GNU screen is probably the easiest option, just add to your
~/.screenrc:
vbell on
termcapinfo * vb=
--
Stéphane
| |
| atishay 2007-02-13, 1:30 am |
| Thank you Stephane
On Feb 13, 1:08 am, Stephane CHAZELAS <this.addr...@is.invalid> wrote:
> 2007-02-12, 11:25(-08), atishay:
> [...]> What I am looking for is something basic. Say I do a command line
>
> [...]
>
> Solaris will issue a sound when the character 0x7 is written to
> $TTY by any of the application you're running. You can either
> tell your applications to stop sending those characters. Like
> for zsh, "setopt nobeep nohistbeep nolistbeep"
>
> Or you can tell your applications, that they need to send
> something else if they want to beep (like... nothing), that's
> the termcap/termindo approach.
>
> You can tell Solaris not to beep on 0x7, I don't know how you do
> that. On Linux, you would do for instance "rmmod pcspkr", there
> may be an equivalent for Solaris.
>
> You can use an application like expect, script or screen that
> run applications in a pseudo-tty, and that intercepts the
> 0x7 characters so that they are not sent to the real tty.
>
> GNU screen is probably the easiest option, just add to your
> ~/.screenrc:
>
> vbell on
> termcapinfo * vb=3D
>
> --
> St=E9phane
| |
| John DuBois 2007-02-16, 1:17 pm |
| In article <1171305806.877517.59430@m58g2000cwm.googlegroups.com>,
atishay <atishay.kumar@gmail.com> wrote:
>Hi
>I am a solaris user. How do we turn the terminal bell off. One way is
>to use xset. But xset will not work when we do not have a XWindow
>running. How can i turn the bell off in that case.
I use mapchan, which it appears Solaris also has.
If 'mapchan -d' shows a null map, try:
echo "input\n\noutput\n7 1\n" | mapchan -f /dev/stdin
This maps the output code 7 (bell) to 1 (control-A, which probably doesn't
display anything on the Solaris console). On the system I use, you can't map
to a null character or to nothing on output.
If there's already a mapping in place, see the appropriate man pages for
information on adding a "7 1" mapping to the output section.
John
--
John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/
|
|
|
|
|