All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
POSIX.EXE Shell BEEP
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
POSIX.EXE Shell BEEP - Jun. 16, '04, 10:13:33 AM
|
|
|
breiter
Posts: 346
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
KSH, CSH, BASH and other shells all generate annoying, loud beeps as feedback to certain "errors". I'm sure you know what I mean. As though designed specifically to demonstrate the separation of the POSIX and Win32 subsystems, it is not obvious to me how to control the BEEP volume or mute it altogether. The Windows volume settings are totally ignored.
This drives my wife crazy late at night and wakes up the baby. How do I shut off the BEEP?!
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 16, '04, 11:41:07 AM
|
|
|
breiter
Posts: 346
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
I'm generally using BASH.
set bell-style visible
or
set bell-style none
Are completely ignored.
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 16, '04, 12:51:29 PM
|
|
|
breiter
Posts: 346
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
Aha!
add
bind "set bell-style none"
to ~/.bashrc for sweet silence.
However some apps, like man, still beep.
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 16, '04, 4:20:44 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
if the beep char (^G) makes it to the Windows console window, then your PC internal speaker will beep. No way to turn that off except by disconnecting the internal speaker.
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 16, '04, 5:29:57 PM
|
|
|
breiter
Posts: 346
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
OK. Having solved the problem for BASH, I created a ~/.cshrc. I don't have a ~/.tcshrc. This should get executed for both tcsh and csh. I added Rodney's two lines to quell the beeping. The set statements work fine when I type them and run them from the shell, but not in ~/.cshrc. Supicious, I added an echo statemet to ./cshrc and... nothing. It seems that my ~/.cshrc to be completely ignored.
What the #%&@*?!
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 16, '04, 11:55:15 PM
|
|
|
Rodney
Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
When the shells startup on most Unix systems they do zero security checks on
the startup scripts (system or user). It was decided for Interix 3.0 that the
sh/ksh and csh/tcsh should do ownership and permission checks
on the startup files. The intended effort is to prevent trojan horses getting
sneaked into the startup scripts.
So check that the user owns the ~/.cshrc file in their home directory and that
the file permissions are not permissive (cannot be written to by someone other
than the owner).
Alternatively, you can install the tcsh package version 6.12.0. This is
much newer than the 6.08.03 version that ships with 3.5. The 6.12.0 version
leaves the checks they have been done "traditionally" (which is to say none).
6.12.0 installs in /usr/local/bin leaving 6.08.03 in /bin. The env packages
place /usr/local/bin ahead of /bin in your PATH. But you should run chsh
to update what your default shell location is. You have to update shortcuts (via
the properties) yourself.
To add tcsh 6.12.0 do:
pkg_add ftp://www.interopsystems.com/pkgs/3.5/tcsh-current-bin.tgz
Otherwise adjust the permissions on the ~/.cshrc file.
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 17, '04, 12:15:14 AM
|
|
|
breiter
Posts: 346
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
Huh. That's interesting, but doesn't seem to be my problem.
From cmd.exe:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
> echo %USERPROFILE%
C:\Documents and Settings\breiter
> cacls "%USERPROFILE%"\.cshrc
C:\Documents and Settings\breiter\.cshrc JOHNGALT\breiter:F
> posix /u /c /usr/local/bin/tcsh -l
Welcome to the Interix UNIX utilities.
DISPLAY=localhost:0.0
% echo $HOME
/dev/fs/C/Documents and Settings/breiter
% [down-arrow BEEP BEEP]
% set matchbeep=never
% set nobeep
% [down-arrow SILENCE]
%USERPROFILE%/.cshrc Win32 should map to ~/.cshrc in POSIX. The file is a UNIX text file not a DOS text file. Also my ~/.bash_profile and ~/.bashrc scripts execute.
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 17, '04, 12:39:19 AM
|
|
|
Rodney
Posts: 3728
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Well, cacls is only partially useful. It would be better
and more clear to see the Unix permissions (the o/p from ls -l)
because that's the way they are being looked at. Cacls is only
useful when you see the extra "+" in the perms of an ls -l o/p
indicating additional ACL ACE's.
For tcsh the lines in any script will be run up to the end of the
file or to the first line with an error. The error can be a subtle thing
with csh/tcsh.
From the fact that "DISPLAY..." appears means the system script is run (/etc/csh.login).
So the problem is in or with ~/.cshrc.
To debug it throw in several different echo statements such as "echo 'one'",
"echo 'two'", etc. Make sure one of those echoes is the last line in ~/.cshrc.
Then "source .cshrc" to run the script. See what the last echo o/p is. Narrow it
down from there by moving and/or adding echoes.
The most typical mistake is "set dog= fido" or set dog =fido". Doesn't wash with
csh/tcsh. It's gotta be "set dog=fido" or "set dog = fido".
< Message edited by Rodney -- Jun. 17, '04, 12:40:04 AM >
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 17, '04, 1:21:00 AM
|
|
|
breiter
Posts: 346
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
Invisible character VOODOO!
It now works with the echo statements in there. But the last echo doesn't echo anything.
Welcome to the Interix UNIX utilities.
DISPLAY=localhost:0.0
about to set mathcbeep=never
about to set nobeep
% cat .cshrc
echo "about to set mathcbeep=never"
set matchbeep=never
echo "about to set nobeep"
set nobeep
echo done% ls -l .cshrc
-rwx------ 1 breiter None 103 Jun 17 01:10 .cshrc
%
What the BLEEP: look at that cat output. Do you s'pose my issue was that there was no return character after "set nobeep"?
Shaw nuff. Add a return and all is well. Duh!
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 20, '04, 7:36:52 PM
|
|
|
Skywing
Posts: 17
Joined: Apr. 29, '04,
Status: offline
|
quote:
ORIGINAL: markfunk
if the beep char (^G) makes it to the Windows console window, then your PC internal speaker will beep. No way to turn that off except by disconnecting the internal speaker.
Try running net stop beep as an administrator, or stopping and disabling the Beep driver-service.
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 20, '04, 8:35:48 PM
|
|
|
breiter
Posts: 346
Joined: Jun. 14, '04,
From: Washington, DC
Status: offline
|
OK stopping the "Beep" services works for all cases. Can someone explain why there is no "Beep" service in services.msc, but I can "sc query beep"?
> sc query beep
SERVICE_NAME: beep
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
> sc stop beep
SERVICE_NAME: beep
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
(NOT_STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
> sc config beep start= disabled
[SC] ChangeServiceConfig SUCCESS
>
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 21, '04, 10:18:34 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
Cool !
|
|
|
RE: POSIX.EXE Shell BEEP - Jun. 24, '04, 2:35:58 AM
|
|
|
Skywing
Posts: 17
Joined: Apr. 29, '04,
Status: offline
|
Services.msc only displays Win32 services, not driver services.
The Beep service is a (very simple) driver service (beep.sys in %systemroot%\system32\drivers).
|
|
|
RE: POSIX.EXE Shell BEEP - Feb. 12, '05, 10:24:11 PM
|
|
|
yoldas
Posts: 5
Status: offline
|
Following steps can be followed for controlling the Beep driver of the Windows box, so any shell of SFU shuts up!
Go to control panel, double click System icon
System properties dialog opens
click hardware tab, click device manager button
Device manager opens
on the view menu click show hidden devices item
Under Non-Plug and Play Drivers find Beep item
Right click on it, then properties
Beep properties dialog opens
Click Driver tab,
To stop temporarily click Stop button
For permanent control of loading this driver:
under Startup section, select Type as you want. You may disable this device completely.
Hope this helps...
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|