Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #184476 > unrolled thread

Darn 'beep' stoped working after installing Stretch in place of Jessie

Started by"Juan R. de Silva" <juan.r.d.silva@gmail.com>
First post2017-07-31 23:30 +0200
Last post2017-08-05 14:30 +0200
Articles 18 — 9 participants

Back to article view | Back to linux.debian.user


Contents

  Darn 'beep' stoped working after installing Stretch in place of  Jessie "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2017-07-31 23:30 +0200
    Re: Darn 'beep' stoped working after installing Stretch in place of   Jessie Dan Purgert <dan@djph.net> - 2017-08-01 00:20 +0200
      Re: Darn 'beep' stoped working after installing Stretch in place of   Jessie "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2017-08-01 00:40 +0200
    Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie RavenLX <ravenlx@sitesplace.net> - 2017-08-01 15:10 +0200
      Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie Dejan Jocic <jodejka@gmail.com> - 2017-08-01 17:20 +0200
        Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie Henrique de Moraes Holschuh <hmh@debian.org> - 2017-08-01 17:30 +0200
          Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie Jude DaShiell <jdashiel@panix.com> - 2017-08-01 18:00 +0200
            Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2017-08-01 19:20 +0200
              Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie Jude DaShiell <jdashiel@panix.com> - 2017-08-01 20:30 +0200
          Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie RavenLX <ravenlx@sitesplace.net> - 2017-08-01 21:10 +0200
        Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2017-08-01 19:20 +0200
          Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie RavenLX <ravenlx@sitesplace.net> - 2017-08-01 21:10 +0200
        Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie RavenLX <ravenlx@sitesplace.net> - 2017-08-01 21:00 +0200
          Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie Dejan Jocic <jodejka@gmail.com> - 2017-08-01 21:30 +0200
            Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie Ralph Katz <ralph@ralphkatz.com> - 2017-08-02 06:00 +0200
              Re: Darn 'beep' stoped working after installing Stretch in place of Jessie Gene Heskett <gheskett@shentel.net> - 2017-08-02 06:30 +0200
    Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie davidson@freevolt.org - 2017-08-02 16:40 +0200
      Re: Darn 'beep' stoped working after installing Stretch in place of  Jessie RavenLX <ravenlx@sitesplace.net> - 2017-08-05 14:30 +0200

#184476 — Darn 'beep' stoped working after installing Stretch in place of Jessie

From"Juan R. de Silva" <juan.r.d.silva@gmail.com>
Date2017-07-31 23:30 +0200
SubjectDarn 'beep' stoped working after installing Stretch in place of Jessie
Message-ID<u9qqd-2Vo-11@gated-at.bofh.it>
Hi folks,

I installed (fresh install instead of an upgrade) Debian Stretch on my laptop. 
The installation is full success without any problem except a little one - 
'beep' does not produce a sound neither from CLI nor from a bash scripts. I had
Jessie installed on the same laptop before and it worked just fine.

I checked everything I possibly could: pcspkr module loaded, alsa does not have
any muted channels, tried to use it as a user and as a root. No clue why it does
not work any longer in Strech.

Any suggestions?

Thanks.

[toc] | [next] | [standalone]


#184477 — Re: Darn 'beep' stoped working after installing Stretch in place of Jessie

FromDan Purgert <dan@djph.net>
Date2017-08-01 00:20 +0200
SubjectRe: Darn 'beep' stoped working after installing Stretch in place of Jessie
Message-ID<u9rcC-3sn-13@gated-at.bofh.it>
In reply to#184476
Juan R. de Silva wrote:
> Hi folks,
>
> [...]
> 'beep' does not produce a sound neither from CLI nor from a bash
> scripts. I had Jessie installed on the same laptop before and it worked
> just fine.

perhaps you need to install 'beep'?

$ apt-cache search beep
beep - advanced pc-speaker beeper


-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281

[toc] | [prev] | [next] | [standalone]


#184478 — Re: Darn 'beep' stoped working after installing Stretch in place of Jessie

From"Juan R. de Silva" <juan.r.d.silva@gmail.com>
Date2017-08-01 00:40 +0200
SubjectRe: Darn 'beep' stoped working after installing Stretch in place of Jessie
Message-ID<u9rvY-3zm-17@gated-at.bofh.it>
In reply to#184477
On Mon, 31 Jul 2017 22:02:00 +0000, Dan Purgert wrote:

> apt-cache search beep

It's most certenly installed. Thanks anyway, I appreciate it as a joke. :-)

[toc] | [prev] | [next] | [standalone]


#184488

FromRavenLX <ravenlx@sitesplace.net>
Date2017-08-01 15:10 +0200
Message-ID<u9F5T-4q3-1@gated-at.bofh.it>
In reply to#184476
On 07/31/2017 05:21 PM, Juan R. de Silva wrote:
> Hi folks,
> 
> I installed (fresh install instead of an upgrade) Debian Stretch on my laptop.
> The installation is full success without any problem except a little one -
> 'beep' does not produce a sound neither from CLI nor from a bash scripts. I had
> Jessie installed on the same laptop before and it worked just fine.
> 
> I checked everything I possibly could: pcspkr module loaded, alsa does not have
> any muted channels, tried to use it as a user and as a root. No clue why it does
> not work any longer in Strech.
> 
> Any suggestions?
> 
> Thanks.

I've noticed that as well. I'm very sorry I don't know if my experiences 
below is a solution for you (or at all) but maybe my saying something 
might mean others won't think as I first did that it was my hardware or 
something. Sound does work fine in my system. I even tried adjusting the 
sound levels and setting notifications for system beep. Nothing seemed 
to work.

Having it work out-of-the-box would be nice. After a fresh install, I 
have a bash script I run that installs all the apps I use and configures 
them. Sometimes though, there are things that a user needs to answer. 
Thus, if I want to have the script running and go do something else, I 
want to "beep" when it's going to need attention by the user. I noticed 
this does not work in Stretch so I ended up removing the part to install 
the "beep" package and use beep to alert the user. I have tried escape 
codes via echo -e as well, and no beep there either.

As for more information, I've tried this in a regular non-GUI shell 
(before installing a desktop environment) and also while in Konsole 
(KDE's terminal program). It did not work.

Now, if you install beep *after* you have installed your desktop 
environment, then it *does* work when you type "beep" at the Konsole 
prompt and in bash scripts.

I don't know why this is other than maybe you have to have your sound 
system pre-installed.

I don't know if this information would help you. I am beginning to 
wonder also if the update to 9.1 fixed things. I had the experience with 
9.0.

Another thing to try is to update your system to 9.1 and see if that 
fixes it.

[toc] | [prev] | [next] | [standalone]


#184490

FromDejan Jocic <jodejka@gmail.com>
Date2017-08-01 17:20 +0200
Message-ID<u9H7I-5CS-21@gated-at.bofh.it>
In reply to#184488
On 01-08-17, RavenLX wrote:
> Having it work out-of-the-box would be nice. After a fresh install, I have a
> bash script I run that installs all the apps I use and configures them.
> Sometimes though, there are things that a user needs to answer. Thus, if I
> want to have the script running and go do something else, I want to "beep"
> when it's going to need attention by the user. I noticed this does not work
> in Stretch so I ended up removing the part to install the "beep" package and
> use beep to alert the user. I have tried escape codes via echo -e as well,
> and no beep there either.
> 

Does printf "\a" works for you? Though, echo -e "\a" works here too.

[toc] | [prev] | [next] | [standalone]


#184491

FromHenrique de Moraes Holschuh <hmh@debian.org>
Date2017-08-01 17:30 +0200
Message-ID<u9Hho-5Gd-41@gated-at.bofh.it>
In reply to#184490
On Tue, 01 Aug 2017, Dejan Jocic wrote:
> On 01-08-17, RavenLX wrote:
> > Having it work out-of-the-box would be nice. After a fresh install, I have a
> > bash script I run that installs all the apps I use and configures them.
> > Sometimes though, there are things that a user needs to answer. Thus, if I
> > want to have the script running and go do something else, I want to "beep"
> > when it's going to need attention by the user. I noticed this does not work
> > in Stretch so I ended up removing the part to install the "beep" package and
> > use beep to alert the user. I have tried escape codes via echo -e as well,
> > and no beep there either.
> 
> Does printf "\a" works for you? Though, echo -e "\a" works here too.

If it doesn't, you likely must fiddle with "digital beep" controls in
the sound subsystem.  Check alsa (alsactl, amixer...) and pulse audio
(pauvcontrol).  And try it from an xterm or the Linux text-mode console
just to make sure the beep ioctl is actually being issued...

-- 
  Henrique Holschuh

[toc] | [prev] | [next] | [standalone]


#184492

FromJude DaShiell <jdashiel@panix.com>
Date2017-08-01 18:00 +0200
Message-ID<u9HKp-5Q8-5@gated-at.bofh.it>
In reply to#184491
Maybe modprobe pcspkr might be helpful too.

On Tue, 1 Aug 2017, Henrique de Moraes Holschuh wrote:

> Date: Tue, 1 Aug 2017 11:24:05
> From: Henrique de Moraes Holschuh <hmh@debian.org>
> To: debian-user@lists.debian.org
> Subject: Re: Darn 'beep' stoped working after installing Stretch in place of
>     Jessie
> Resent-Date: Tue,  1 Aug 2017 15:24:25 +0000 (UTC)
> Resent-From: debian-user@lists.debian.org
> 
> On Tue, 01 Aug 2017, Dejan Jocic wrote:
>> On 01-08-17, RavenLX wrote:
>>> Having it work out-of-the-box would be nice. After a fresh install, I have a
>>> bash script I run that installs all the apps I use and configures them.
>>> Sometimes though, there are things that a user needs to answer. Thus, if I
>>> want to have the script running and go do something else, I want to "beep"
>>> when it's going to need attention by the user. I noticed this does not work
>>> in Stretch so I ended up removing the part to install the "beep" package and
>>> use beep to alert the user. I have tried escape codes via echo -e as well,
>>> and no beep there either.
>>
>> Does printf "\a" works for you? Though, echo -e "\a" works here too.
>
> If it doesn't, you likely must fiddle with "digital beep" controls in
> the sound subsystem.  Check alsa (alsactl, amixer...) and pulse audio
> (pauvcontrol).  And try it from an xterm or the Linux text-mode console
> just to make sure the beep ioctl is actually being issued...
>
>

-- 

[toc] | [prev] | [next] | [standalone]


#184494

From"Juan R. de Silva" <juan.r.d.silva@gmail.com>
Date2017-08-01 19:20 +0200
Message-ID<u9IZQ-6Oe-7@gated-at.bofh.it>
In reply to#184492
On Tue, 01 Aug 2017 11:54:34 -0400, Jude DaShiell wrote:

> Maybe modprobe pcspkr might be helpful too.

Unfortunatelly it wasn't.

[toc] | [prev] | [next] | [standalone]


#184498

FromJude DaShiell <jdashiel@panix.com>
Date2017-08-01 20:30 +0200
Message-ID<u9K5z-7tS-9@gated-at.bofh.it>
In reply to#184494
On Tue, 1 Aug 2017, Juan R. de Silva wrote:

> Date: Tue, 1 Aug 2017 13:14:32
> From: Juan R. de Silva <juan.r.d.silva@gmail.com>
> To: debian-user@lists.debian.org
> Subject: Re: Darn 'beep' stoped working after installing Stretch in place of
>     Jessie
> Resent-Date: Tue,  1 Aug 2017 17:15:27 +0000 (UTC)
> Resent-From: debian-user@lists.debian.org
> 
> On Tue, 01 Aug 2017 11:54:34 -0400, Jude DaShiell wrote:
>
>> Maybe modprobe pcspkr might be helpful too.
>
> Unfortunatelly it wasn't.
>
Have you tried adjusting grub?  I'm thinking of GRUB-INIT-TUNE= line in 
/etc/default/grub and then recreating grub again?  If the system already 
beeps on boot, this will have already been done and will not help.

>

--

[toc] | [prev] | [next] | [standalone]


#184505

FromRavenLX <ravenlx@sitesplace.net>
Date2017-08-01 21:10 +0200
Message-ID<u9KIi-7WV-21@gated-at.bofh.it>
In reply to#184491
On 08/01/2017 11:24 AM, Henrique de Moraes Holschuh wrote:
> On Tue, 01 Aug 2017, Dejan Jocic wrote:
>> On 01-08-17, RavenLX wrote:
>>> Having it work out-of-the-box would be nice. After a fresh install, I have a
>>> bash script I run that installs all the apps I use and configures them.
>>> Sometimes though, there are things that a user needs to answer. Thus, if I
>>> want to have the script running and go do something else, I want to "beep"
>>> when it's going to need attention by the user. I noticed this does not work
>>> in Stretch so I ended up removing the part to install the "beep" package and
>>> use beep to alert the user. I have tried escape codes via echo -e as well,
>>> and no beep there either.
>>
>> Does printf "\a" works for you? Though, echo -e "\a" works here too.
> 
> If it doesn't, you likely must fiddle with "digital beep" controls in
> the sound subsystem.  Check alsa (alsactl, amixer...) and pulse audio
> (pauvcontrol).  And try it from an xterm or the Linux text-mode console
> just to make sure the beep ioctl is actually being issued...
> 

That's weird. I tried it in XTerm and it works. It doesn't in Konsole 
though. I think you might be right about the sound subsystem. Seems like 
a lot to go through though to set up terminal beeps in Konsole. I guess 
maybe in my particular case (note that I am *not* the OP), I may just 
have to run my script from XTerm if I want beep notifications.

[toc] | [prev] | [next] | [standalone]


#184495

From"Juan R. de Silva" <juan.r.d.silva@gmail.com>
Date2017-08-01 19:20 +0200
Message-ID<u9IZQ-6Oe-17@gated-at.bofh.it>
In reply to#184490
On Tue, 01 Aug 2017 17:17:05 +0200, Dejan Jocic wrote:

> On 01-08-17, RavenLX wrote:
>> Having it work out-of-the-box would be nice. After a fresh install, I
>> have a bash script I run that installs all the apps I use and
>> configures them. Sometimes though, there are things that a user needs
>> to answer. Thus, if I want to have the script running and go do
>> something else, I want to "beep" when it's going to need attention by
>> the user. I noticed this does not work in Stretch so I ended up
>> removing the part to install the "beep" package and use beep to alert
>> the user. I have tried escape codes via echo -e as well, and no beep
>> there either.
>> 
>> 
> Does printf "\a" works for you? Though, echo -e "\a" works here too.

printf "\a" and echo -e "\a" work, as well as all other versions of 
echo like:
echo -e \\a
echo -e '\a'
echo -en '\x07'
echo -en "\x07"

However neither of them produces an expecting "beep sound" (do not 
confuse with 'beep' comand/utility). Exsecuting any of the above 
produces default system "Sounds Effects" sound instead.

[toc] | [prev] | [next] | [standalone]


#184504

FromRavenLX <ravenlx@sitesplace.net>
Date2017-08-01 21:10 +0200
Message-ID<u9KIh-7WV-3@gated-at.bofh.it>
In reply to#184495
On 08/01/2017 01:13 PM, Juan R. de Silva wrote:
> On Tue, 01 Aug 2017 17:17:05 +0200, Dejan Jocic wrote:
> 
>> On 01-08-17, RavenLX wrote:
>>> Having it work out-of-the-box would be nice. After a fresh install, I
>>> have a bash script I run that installs all the apps I use and
>>> configures them. Sometimes though, there are things that a user needs
>>> to answer. Thus, if I want to have the script running and go do
>>> something else, I want to "beep" when it's going to need attention by
>>> the user. I noticed this does not work in Stretch so I ended up
>>> removing the part to install the "beep" package and use beep to alert
>>> the user. I have tried escape codes via echo -e as well, and no beep
>>> there either.
>>>
>>>
>> Does printf "\a" works for you? Though, echo -e "\a" works here too.
> 
> printf "\a" and echo -e "\a" work, as well as all other versions of
> echo like:
> echo -e \\a
> echo -e '\a'
> echo -en '\x07'
> echo -en "\x07"
> 
> However neither of them produces an expecting "beep sound" (do not
> confuse with 'beep' comand/utility). Exsecuting any of the above
> produces default system "Sounds Effects" sound instead.

When I tried it in Konsole (the printf and the echo -e "\a" lines) I got 
no sound. In Xterm I got the default beep that I don't think is from the 
sound subsystem. Sounded very much like a standard terminal beep.

[toc] | [prev] | [next] | [standalone]


#184503

FromRavenLX <ravenlx@sitesplace.net>
Date2017-08-01 21:00 +0200
Message-ID<u9KyC-7DW-21@gated-at.bofh.it>
In reply to#184490
On 08/01/2017 11:17 AM, Dejan Jocic wrote:
> On 01-08-17, RavenLX wrote:
>> Having it work out-of-the-box would be nice. After a fresh install, I have a
>> bash script I run that installs all the apps I use and configures them.
>> Sometimes though, there are things that a user needs to answer. Thus, if I
>> want to have the script running and go do something else, I want to "beep"
>> when it's going to need attention by the user. I noticed this does not work
>> in Stretch so I ended up removing the part to install the "beep" package and
>> use beep to alert the user. I have tried escape codes via echo -e as well,
>> and no beep there either.
>>
> 
> Does printf "\a" works for you? Though, echo -e "\a" works here too.

I just now tried it in Konsole. Nope, doesn't work.

[toc] | [prev] | [next] | [standalone]


#184507

FromDejan Jocic <jodejka@gmail.com>
Date2017-08-01 21:30 +0200
Message-ID<u9L1D-85L-1@gated-at.bofh.it>
In reply to#184503
On 01-08-17, RavenLX wrote:
> On 08/01/2017 11:17 AM, Dejan Jocic wrote:
> > On 01-08-17, RavenLX wrote:
> > > Having it work out-of-the-box would be nice. After a fresh install, I have a
> > > bash script I run that installs all the apps I use and configures them.
> > > Sometimes though, there are things that a user needs to answer. Thus, if I
> > > want to have the script running and go do something else, I want to "beep"
> > > when it's going to need attention by the user. I noticed this does not work
> > > in Stretch so I ended up removing the part to install the "beep" package and
> > > use beep to alert the user. I have tried escape codes via echo -e as well,
> > > and no beep there either.
> > > 
> > 
> > Does printf "\a" works for you? Though, echo -e "\a" works here too.
> 
> I just now tried it in Konsole. Nope, doesn't work.
> 

I do not have Konsole here and did not use it for a long time, but in
Xterm there are setting for terminal bell, so there are in
gnome-terminal. Perhaps there are those settings in Konsole too. Under
preferences, or some such thing.

[toc] | [prev] | [next] | [standalone]


#184519

FromRalph Katz <ralph@ralphkatz.com>
Date2017-08-02 06:00 +0200
Message-ID<u9SZb-4CX-1@gated-at.bofh.it>
In reply to#184507

[Multipart message — attachments visible in raw view] — view raw

On 08/01/2017 01:21 PM, Dejan Jocic wrote:
> On 01-08-17, RavenLX wrote:
>> On 08/01/2017 11:17 AM, Dejan Jocic wrote:
>>> On 01-08-17, RavenLX wrote:
>>>> Having it work out-of-the-box would be nice. After a fresh install, I have a
>>>> bash script I run that installs all the apps I use and configures them.
>>>> Sometimes though, there are things that a user needs to answer. Thus, if I
>>>> want to have the script running and go do something else, I want to "beep"
>>>> when it's going to need attention by the user. I noticed this does not work
>>>> in Stretch so I ended up removing the part to install the "beep" package and
>>>> use beep to alert the user. I have tried escape codes via echo -e as well,
>>>> and no beep there either.
>>>>
>>>
>>> Does printf "\a" works for you? Though, echo -e "\a" works here too.
>>
>> I just now tried it in Konsole. Nope, doesn't work.
>>
> 
> I do not have Konsole here and did not use it for a long time, but in
> Xterm there are setting for terminal bell, so there are in
> gnome-terminal. Perhaps there are those settings in Konsole too. Under
> preferences, or some such thing.
> 

I once had this issue in xfce.  Check .config/Terminal/terminalrc for
the line:
MiscBell=TRUE

Regards,
Ralph



[toc] | [prev] | [next] | [standalone]


#184520 — Re: Darn 'beep' stoped working after installing Stretch in place of Jessie

FromGene Heskett <gheskett@shentel.net>
Date2017-08-02 06:30 +0200
SubjectRe: Darn 'beep' stoped working after installing Stretch in place of Jessie
Message-ID<u9Tse-55X-7@gated-at.bofh.it>
In reply to#184519
On Tuesday 01 August 2017 23:52:48 Ralph Katz wrote:

> On 08/01/2017 01:21 PM, Dejan Jocic wrote:
> > On 01-08-17, RavenLX wrote:
> >> On 08/01/2017 11:17 AM, Dejan Jocic wrote:
> >>> On 01-08-17, RavenLX wrote:
> >>>> Having it work out-of-the-box would be nice. After a fresh
> >>>> install, I have a bash script I run that installs all the apps I
> >>>> use and configures them. Sometimes though, there are things that
> >>>> a user needs to answer. Thus, if I want to have the script
> >>>> running and go do something else, I want to "beep" when it's
> >>>> going to need attention by the user. I noticed this does not work
> >>>> in Stretch so I ended up removing the part to install the "beep"
> >>>> package and use beep to alert the user. I have tried escape codes
> >>>> via echo -e as well, and no beep there either.
> >>>
> >>> Does printf "\a" works for you? Though, echo -e "\a" works here
> >>> too.
> >>
> >> I just now tried it in Konsole. Nope, doesn't work.
> >
> > I do not have Konsole here and did not use it for a long time, but
> > in Xterm there are setting for terminal bell, so there are in
> > gnome-terminal. Perhaps there are those settings in Konsole too.
> > Under preferences, or some such thing.
>
> I once had this issue in xfce.  Check .config/Terminal/terminalrc for
> the line:
> MiscBell=TRUE
>
> Regards,
> Ralph

Thank you, I've been looking for that since Hector was puppy.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#184541

Fromdavidson@freevolt.org
Date2017-08-02 16:40 +0200
Message-ID<ua2Yx-2AD-3@gated-at.bofh.it>
In reply to#184476
On Mon, 31 Jul 2017, Juan R. de Silva wrote:

> Hi folks,
>
> I installed (fresh install instead of an upgrade) Debian Stretch on my laptop.
> The installation is full success without any problem except a little one -
> 'beep' does not produce a sound neither from CLI nor from a bash scripts. I had
> Jessie installed on the same laptop before and it worked just fine.
>
> I checked everything I possibly could: pcspkr module loaded, alsa does not have
> any muted channels, tried to use it as a user and as a root. No clue why it does
> not work any longer in Strech.
>
> Any suggestions?

Possibly the following excerpt from https://github.com/johnath/beep/
applies. (TLDR: Skip to the end, read the last three quoted lines.)

| A note about ioctl
| ------------------

| As noted in the man page, some users are running into a situation
| where beep dies with a complaint from ioctl().  The reason for this,
| as Peter Tirsek was nice enough to point out to me, stems from how
| the kernel handles beep's attempt to poke at (for non-programmers:
| ioctl is a sort of catch-all function that lets you poke at things
| that have no other predefined poking-at mechanism) the tty, which is
| how it beeps.  The short story is, the kernel checks that either:

| - you are the superuser
| - you own the current tty

| What this means is that root can always make beep work (to the best
| of my knowledge!), and that any local user can make beep work, BUT a
| non-root remote user cannot use beep in it's natural state.  What's
| worse, an xterm, or other x-session counts, as far as the kernel is
| concerned, as 'remote', so beep won't work from a non-priviledged
| xterm either.  I had originally chalked this up to a bug, but
| there's actually nothing I can do about it, and it really is a Good
| Thing that the kernel does things this way.  There is also a
| solution.

| By default beep is not installed with the suid bit set, because that
| would just be zany.  On the other hand, if you do make it suid root,
| all your problems with beep bailing on ioctl calls will magically
| vanish, which is pleasant, and the only reason not to is that any
| suid program is a potential security hole.  Conveniently, beep is
| very short, so auditing it is pretty straightforward.

| Decide for yourself, of course, but it looks safe to me - there's
| only one buffer and fgets doesn't let it overflow, there's only one
| file opening, and while there is a potential race condition there,
| it's with /dev/console.  If someone can exploit this race by
| replacing /dev/console, you've got bigger problems.  :)

| So the quick solution is beep is not beeping when you want it to is:

| $ su
| Password:
| # chmod 4755 /usr/bin/beep

| (or wherever you put it)

| The one snag is that [making beep suid root] will give any little
| nitwit the ability to run beep successfully - make sure this is what
| you want.  If it isn't, a slightly more complex fix would be
| something like:

| # chgrp beep /usr/bin/beep
| # chmod 4750 /usr/bin/beep

| and then add only beep-worthy users to the 'beep' group.

[toc] | [prev] | [next] | [standalone]


#184676

FromRavenLX <ravenlx@sitesplace.net>
Date2017-08-05 14:30 +0200
Message-ID<ub6nn-4WP-11@gated-at.bofh.it>
In reply to#184541
On 08/02/2017 10:38 AM, davidson@freevolt.org wrote:
> On Mon, 31 Jul 2017, Juan R. de Silva wrote:
> 
>> Hi folks,
>>
>> I installed (fresh install instead of an upgrade) Debian Stretch on my 
>> laptop.
>> The installation is full success without any problem except a little 
>> one -
>> 'beep' does not produce a sound neither from CLI nor from a bash 
>> scripts. I had
>> Jessie installed on the same laptop before and it worked just fine.
>>
>> I checked everything I possibly could: pcspkr module loaded, alsa does 
>> not have
>> any muted channels, tried to use it as a user and as a root. No clue 
>> why it does
>> not work any longer in Strech.
>>
>> Any suggestions?
> 
> Possibly the following excerpt from https://github.com/johnath/beep/
> applies. (TLDR: Skip to the end, read the last three quoted lines.)
> 
> | A note about ioctl
> | ------------------
[snip]

> | What this means is that root can always make beep work (to the best
> | of my knowledge!), and that any local user can make beep work, BUT a
> | non-root remote user cannot use beep in it's natural state. 

Amazingly, I tried 'sudo beep' in Konsole and it worked! So this is not 
going to be a problem for my script because some items in the script use 
sudo anyway. I'll just do that with beep as well.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web