A note I was addicted to when making a beep on Linux

Note that I was addicted to beeping with printf ("\ a \ n"); on Linux.

environment

--OS: Linux Mint 18.1 (Maybe it's the same for Ubuntu) --USB connection of speakers on desktop PC

What I wanted to do

--I want to beep with printf ("\ a \ n") in C or ʻecho -e" \ a "` in the shell

What I did to make it sound

--Uncomment the following line in /etc/pulse/default.pa. (The lines are a little apart, so search by bell)

load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/bell.oga
load-module module-x11-bell sample=x11-bell

--Restart once or run pulseaudio --kill; pulseaudio --start

It rang. If you change the file path at bell.oga above, you can make your favorite sound a beep. There are various beep samples under / usr / share / sounds /.

Remarks

When I search, I often get the explanation to do the following, but it was unnecessary in my environment.

--Comment out blacklist pcspkr in /etc/modprobe.d/blacklist.conf (Run sudo modprobe pcspkr if it's temporary)

end

Recommended Posts

A note I was addicted to when making a beep on Linux
A note I was addicted to when creating a table with SQLAlchemy
A story I was addicted to trying to install LightFM on Amazon Linux
A note I was addicted to when running Python with Visual Studio Code
I was addicted to Flask on dotCloud
The record I was addicted to when putting MeCab on Heroku
What I was addicted to when dealing with huge files in a Linux 32bit environment
Memo (March 2020) that I was addicted to when installing Arch Linux on MacBook Air 11'Early 2015
A story I was addicted to when inserting from Python to a PostgreSQL table
I was addicted to trying Cython with PyCharm, so make a note
Log when I was worried that I could not connect to Wi-Fi on Linux
What I was addicted to when creating a web application in a windows environment
A story that I was addicted to at np.where
A story that I was addicted to when I made SFTP communication with python
What I was addicted to when using Python tornado
I set up TensowFlow and was addicted to it, so make a note
What I was addicted to when migrating Processing users to Python
(Note) Points to be addicted to when installing Scilab on ArchLinux
A note when I can't open Jupyter Notebook on Windows
I was addicted to multiprocessing + psycopg2
When I tried to install PIL and matplotlib in a virtualenv environment, I was addicted to it.
The story I was addicted to when I specified nil as a function argument in Go
A story that I was addicted to calling Lambda from AWS Lambda.
What I was addicted to when introducing ALE to Vim for Python
Note that I was addicted to sklearn's missing value interpolation (Imputer)
What I stumbled upon when using CodeIgniter on a Linux server
I was a little addicted to installing Python3.3 + mod_wsgi3.4 on Sakura VPS (CentOS), so a retrospective memo
When I tried to scrape using requests in python, I was addicted to SSLError, so a workaround memo
I was addicted to pip install mysqlclient
I want to use Linux on mac
Note that I was addicted to accessing the DB with Python's mysql.connector using a web application.
What I was addicted to Python autorun
Two things I was addicted to building Django + Apache + Nginx on Windows
I was addicted to running tensorflow on GPU with NVIDIA driver 440 + CUDA 10.2
I was addicted to creating a Python venv environment with VS Code
A story I was addicted to trying to get a video url with tweepy
I was addicted to not being able to use Markdown on pypi's long_description
[Python] When I tried to make a decompression tool with a zip file I just knew, I was addicted to sys.exit ()
[Fabric] I was addicted to using boolean as an argument, so make a note of the countermeasures.
[Introduction to json] No, I was addicted to it. .. .. ♬
Python Note: When assigning a value to a string
Try to create a new command on linux
I want to log file I / O on Linux
Three things I was addicted to when using Python and MySQL with Docker
Summary of linux command techniques that I knew when I was a fledgling engineer
Summary of points I was addicted to running Selenium on AWS Lambda (python)
[Linux] Let's talk about when I stumbled upon a symbolic link I was using.
I want to be notified when the command operation is completed on linux!
I was soberly addicted to calling awscli from a Python 2.7 script registered in crontab
Note that I was addicted to npm script not passing in the verification environment
A template that I often use when making Discord BOT in Python (memorial note)
The world changed when I opened a big Python project (Django) on Sourcetrail (Linux)
How to install Linux on a 32bit UEFI PC
What I did when I stumbled on a Django tutorial
I want to find a popular package on PyPi
I got a UnicodeDecodeError when pip install on ubuntu
I was addicted to scraping with Selenium (+ Python) in 2020
It was a life I wanted to OCR on AWS Lambda to locate the characters.
What I was addicted to when combining class inheritance and Joint Table Inheritance in SQLAlchemy
Things to note when initializing a list in Python
SoC FPGA: A small story when using on Linux