Gentoo Archives: gentoo-user

From: Marc Joliet <marcec@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Can I suppress the bleep when shutting down?
Date: Tue, 20 Oct 2015 20:25:04
Message-Id: 3278376.jbJWGS44YQ@thetick
In Reply to: Re: [gentoo-user] Can I suppress the bleep when shutting down? by Alan McKinnon
1 On Tuesday 20 October 2015 20:48:22 Alan McKinnon wrote:
2 >On 20/10/2015 19:57, Marc Joliet wrote:
3 >> On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote:
4 >>> Hi Alan,
5 >>>
6 >>>> I simply want to disable that one particular beeping at shutdown time.
7 >>>
8 >>> well this topic made me curious where the beep is coming from.
9 >>>
10 >>> It does originate from the shutdown command itself which is part of the
11 >>> sys-apps/sysvinit package. In this package's source you find can a file
12 >>> "src/dowall.c", where you will in turn find a function "wall(...)".
13 >>>
14 >>> This is the function where the warning messages will be produced that
15 >>> show up in the terminal and the message is produced like this:
16 >>>
17 >>> snprintf(line, sizeof(line),
18 >>>
19 >>> "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
20 >>> user, hostname, tty, date);
21 >>>
22 >>> The "\007" is the beep you're getting. It's a bell character that you
23 >>> can produce manually by doing this, too:
24 >>>
25 >>> echo -e "\007"
26 >>>
27 >>> Unfortunately the bell character is hard coded into the warning message.
28 >>> Also there seems to be no way to suppress the warning message.
29 >>
30 >> [...]
31 >>
32 >> If it's caused by the call to wall(), then maybe the --no-wall option to
33 >> shutdown will help?
34 >
35 >I don't have that option in my ~arch shutdown
36
37 *Sigh* then it's probably unique to systemd[sysv-utils]. Sorry for not
38 thinking about that.
39
40 --
41 Marc Joliet
42 --
43 "People who think they know everything really annoy those of us who know we
44 don't" - Bjarne Stroustrup

Attachments

File name MIME type
signature.asc application/pgp-signature