Skip to content

Instantly share code, notes, and snippets.

@mharsch
Created December 18, 2023 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mharsch/ce4ec394a3a058b7d0d3d25f52595f13 to your computer and use it in GitHub Desktop.
Save mharsch/ce4ec394a3a058b7d0d3d25f52595f13 to your computer and use it in GitHub Desktop.
enable pc speaker control via beep when logged in remotely (Ubuntu 22.04)
This will save you from going down a rather deep documentation rabbit hole:
1.) enable pcspkr driver by removing blacklist entry for pcspkr in /etc/modprobe.d/blacklist.conf
2.) create user group 'beep' for controlling permissions to speaker
sudo addgroup --system beep
3.) Add your user account to the new beep group (logout and log back in after this step)
sudo usermod -aG beep $USER
4.) change default permissions on speaker device to allow members of group 'beep' to access speaker.
Comment out previous entry and add the following line to /usr/lib/udev/rules.d/70-pcspkr-beep.rules
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", GROUP="beep", MODE="0620"
5.) install beep(1) command
sudo apt install beep
6.) reboot
Now your user account should be able to beep the speaker using beep command (even when logged in remotely)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment