From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 96DEA13888F for ; Tue, 20 Oct 2015 17:23:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3F69721C03C; Tue, 20 Oct 2015 17:23:04 +0000 (UTC) Received: from mail.ncp-e.com (mail.ncp-e.com [62.153.165.35]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 106F821C011 for ; Tue, 20 Oct 2015 17:23:02 +0000 (UTC) Received: from viruswall.ncp.de (viruswall.ncp.de [62.153.165.41]) by mail.ncp-e.com (Postfix) with ESMTPS id 11B9DA0007 for ; Tue, 20 Oct 2015 19:18:59 +0200 (CEST) Received: from [172.16.11.201] (port=37006 helo=ex07.ncp.local) by viruswall.ncp.de with esmtps (TLSv1:RC4-MD5:128) (Exim 4.76) (envelope-from ) id 1Zoaca-0004tY-2q; Tue, 20 Oct 2015 19:22:48 +0200 Received: from localhost (172.16.15.110) by ex07.ncp.local (172.16.11.201) with Microsoft SMTP Server (TLS) id 8.3.348.2; Tue, 20 Oct 2015 19:22:48 +0200 Date: Tue, 20 Oct 2015 19:22:48 +0200 From: Matthias Gerstner To: Alan Mackenzie CC: "gentoo-user@lists.gentoo.org" Subject: Re: [gentoo-user] Can I suppress the bleep when shutting down? Message-ID: <20151020172248.GA32751@mgpc.ncp.de> References: <20151020161029.GC1781@acm.fritz.box> <20151020182704.6f90804f@hal9000.localdomain> <20151020164439.GA6901@acm.fritz.box> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20151020164439.GA6901@acm.fritz.box> User-Agent: Mutt/1.5.23 (2014-03-12) X-Archives-Salt: 6f4eb779-804c-4119-ad70-b14f412a7b5a X-Archives-Hash: e06abd7c4ea714f85b2a5639a130de29 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Alan, > I simply want to disable that one particular beeping at shutdown time. well this topic made me curious where the beep is coming from. It does originate from the shutdown command itself which is part of the sys-apps/sysvinit package. In this package's source you find can a file "src/dowall.c", where you will in turn find a function "wall(...)". This is the function where the warning messages will be produced that show up in the terminal and the message is produced like this: snprintf(line, sizeof(line), "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n", user, hostname, tty, date); The "\007" is the beep you're getting. It's a bell character that you can produce manually by doing this, too: echo -e "\007" Unfortunately the bell character is hard coded into the warning message. Also there seems to be no way to suppress the warning message. But you could still try is to disable the interpretation of the bell character by your terminal. Then you could make an alias or wrapper around the original shutdown command that does this. According to Arch Linux docs here: https://wiki.archlinux.org/index.php/Disable_PC_speaker_beep You can locally disable the bell in the terminal by calling "setterm -blength 0". But this doesn't work with my terminals. Says it's unsupported. Then you can put this in your ~/.inputrc: "set bell-style none". This works for me. Then, however, all terminals stop beeping. The pcspkr is still loaded though and can be used. As you only want to stop the beep only during shutdown you might also be able to call "xset -b", disabling the bell on the X-server (globally?). This is not persistent across reboots and you won't have any beeps until the machine shuts down. Regards Matthias --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWJnhoAAoJEEOOx8hIrs/bUUIQAMjTRaQhBxAWk+HnywYKQk1B SyrsBTbOu9ZUsvqiS8g361cE51s2y+4bbWgpjRx4XatQJRT0tOp3h5OvwyAsvMI7 WTtxgeVrQZh3Adwkr2T7XcDnRWinq6BXxT+LJRh9vcQIaT+VGRWm5uzxzfdQ4T9h sMl/qu1LVMErD0UC0EWJ53YCmqeR1G0NcO8brl+zicQg1Fo89RUn6+gSFtiYOggZ 8LdwVNEnBgomfNhbn2jrSggoCtM3KFEdIBfQYNlpHH+bkB8xkX0XOge1oi7U92Vk CP67T6BbC4Bd2NM1UNirW9lIELryJxAn3Z+n40CBYIKgfBv1hlMdSQsyi0Ns0Aku PYDO6AORiwId85ff1eKR46QuK+DbPkVanYialcdHBNYk3eFzcWsKVrlKUiyrVWwX /bnt4KNNg87Gfh3o9FkJe6vrIczbmrGuxeGFXxHW5YTzzYdtfr38G6oZcmtgGci9 PTrcTSdqFRJBjkDexdL153I8oXAabKiGHWOH2jG0GMU52KtCZHrgJ7V/GmRkgeDG xqij0XDWvwPB6gfhatBfDl9ihV7qcdC2tpSu9Nu7JPYGbRTifOdNhZremE+tISoA yTmUSXqIRItlFv0Ez4oswhn7UbN4EIZtn8k38jYbYkqROLnDljjZGpTBxiku9Y22 DXz7DmrmAGuu/let2Fgq =+dfY -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--