Score:1

Change terminal beep from drip to glass using command line?

us flag

How can I change the terminal beep from the default "drip" to "glass"?

I know I can open Settings, select Sound, and then, in the Alert Sound section, select "Glass".

How can this change be achieved using the command line?

N0rbert avatar
zw flag
Theoretically it should be inside GSettings database, check with `gsettings list-recursively org.gnome.desktop.sound` .
br flag
@PJSingh this post may give some idea? https://askubuntu.com/a/1149567/739431
us flag
@UnKNOWn, thanks-- your tip lead me to the solution I was looking for!
Score:0
cn flag

Copy the folder /usr/share/sounds/Yaru into a new folder /usr/share/sounds/myBell

sudo cp -a /usr/share/sounds/Yaru /usr/share/sounds/myBell

Then open index.theme

sudo nano /usr/share/sounds/myBell/index.theme

and change its content like below:

[Sound Theme]
Name=myBell
Directories=myBell

[stereo]
OutputProfile=stereo

Go to Settings and change sound like below:

enter image description here

Score:0
us flag
  1. Example alert sounds are stored in /usr/share/sounds/gnome/default/alerts:

    ls -1 /usr/share/sounds/gnome/default/alerts/
    bark.ogg
    drip.ogg
    glass.ogg
    sonar.ogg
    
  2. The sound themes are stored in /usr/share/sounds:

    ls -1 /usr/share/sounds
    alsa
    freedesktop
    gnome
    sf2
    sf3
    sound-icons
    speech-dispatcher
    Yaru
    
  3. The default sound theme is freedesktop.

  4. Based on this information, we can replace the bell.ogg file in the freedesktop directory with the glass.ogg file from /usr/share/sounds/gnome/default/alerts/.

    cd /usr/share/sounds/freedesktop/stereo/
    sudo mv bell.oga bell.oga.original
    sudo cp /usr/share/sounds/gnome/default/alerts/glass.ogg ./bell.ogg
    
  5. To make the change effective, log-out and log-back-in, or toggle your sound theme using a tool like Gnome Tweaks or Dconf editor.


Thanks to @UnKNOWn for pointing me in the right direction. The link to the other answer, Symlink for Currently Selected Alert Sound?, that UnKNOWn provided may be the more "proper" way of changing the system's alert sound, but I didn't want to create a whole new sound theme just to change this one sound.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.