UbuntuUbuntu Based

How To Disable Login Sound on Ubuntu 24.04 LTS

Disable Login Sound on Ubuntu 24.04

Ubuntu 24.04 LTS, like its predecessors, welcomes users with a distinctive login sound that plays when you enter your desktop environment. While this audio greeting adds personality to the Ubuntu experience, many users prefer a quieter login process for various reasons. Whether you’re working in a quiet environment, using your computer in public spaces, or simply prefer a silent startup, Ubuntu offers several methods to disable or customize this login sound.

This comprehensive guide walks you through multiple approaches to manage the login sound in Ubuntu 24.04 LTS, from simple GUI toggles to advanced terminal commands and configuration file edits. By the end, you’ll have complete control over your Ubuntu audio experience from the moment you log in.

Understanding Login Sounds in Ubuntu 24.04 LTS

The history of Ubuntu login sounds is a journey of musical evolution spanning nearly two decades. In Ubuntu’s early years (around version 4.10), login sounds were a standard feature that helped brand the operating system with a unique audio identity. These sounds created a signature experience that many users associated with the Ubuntu ecosystem.

However, around Ubuntu 12.04 LTS, the distribution made a significant change by disabling login sounds by default. This decision came after user feedback suggested that startup sounds could be annoying or even embarrassing in certain situations, such as when booting up a laptop in a quiet library or during a meeting.

Fast forward to recent versions, and Ubuntu has reintroduced the login sound as part of its 20th-anniversary celebration. The sound selected for Ubuntu 24.04 LTS is a nod to Ubuntu’s heritage, specifically recalling the first login sound used back in Ubuntu 4.10.

Sound File Locations and Technical Implementation

The default Ubuntu 24.04 LTS login sound is stored at /usr/share/sounds/Yaru/stereo/warty-startup.oga. This audio file plays through Ubuntu’s sound system immediately after login authentication is complete.

The sound system in Ubuntu 24.04 LTS uses PipeWire as the default audio server, replacing the older PulseAudio system. This change brings improved hardware compatibility, better Bluetooth audio support, and reduced CPU usage—all factors that can affect how system sounds like the login audio perform.

The login sound functionality is managed by the libcanberra library, which handles event sounds throughout the GNOME desktop environment. When you log in, the system triggers an audio event that plays the designated sound file.

Method 1: Disabling Login Sound via System Settings

The simplest and most user-friendly approach to disable the login sound in Ubuntu 24.04 LTS is through the graphical System Settings interface. This method requires no technical knowledge and can be completed in just a few clicks.

Step-by-Step Guide to Disable Login Sound

  1. Click on the “Activities” button in the top-left corner of your screen or press the Super (Windows) key on your keyboard
  2. Type “Settings” in the search bar and click on the Settings app icon
  3. In the Settings window, scroll down and select “Sound” from the left sidebar
  4. Scroll to the bottom of the Sound settings page
  5. Find the “Startup Sound” toggle switch
  6. Click the toggle to turn it to the “Off” position

After completing these steps, the login sound will be disabled for your user account. The next time you log in, you’ll be greeted with silence instead of the usual audio welcome.

Advantages of the GUI Method

This approach is ideal for beginners or those who prefer not to use command-line interfaces. It’s straightforward, reversible, and doesn’t require any system file modifications. If you ever want to re-enable the login sound, simply return to the Sound settings and toggle the Startup Sound switch back to “On”.

The settings change takes effect immediately, so there’s no need to restart your system or log out to test the change. However, to fully verify that the sound is disabled, you should log out and log back in once.

Method 2: Using Terminal Commands to Disable Login Sound

For users who prefer command-line interfaces or need to disable login sounds across multiple systems efficiently, the terminal approach offers a powerful alternative. This method allows for more precise control and can be incorporated into scripts for automation.

Terminal Commands for Disabling Login Sound

  1. Open Terminal by pressing Ctrl+Alt+T on your keyboard
  2. To disable the login sound completely, enter the following command:
gsettings set org.gnome.desktop.sound event-sounds false

This command disables all event sounds, including the login sound.

  1. If you want to specifically target only the login sound while keeping other system sounds enabled, use:
sudo cp /usr/share/gnome/autostart/libcanberra-login-sound.desktop /usr/share/gnome/autostart/libcanberra-login-sound.desktop.bak
sudo sed -i 's/X-GNOME-Autostart-enabled=true/X-GNOME-Autostart-enabled=false/' /usr/share/gnome/autostart/libcanberra-login-sound.desktop

The first command creates a backup of the login sound configuration file, and the second command modifies the file to disable the login sound autostart feature.

Understanding Command Permissions and Safety

When using terminal commands that modify system files, you’ll often need to use sudo to gain the necessary permissions. Always exercise caution when using sudo, as incorrect commands can potentially cause system issues.

The commands provided above are safe when used correctly, but it’s always a good practice to create backups before making changes to system files, as shown in the example where we created a .bak file before modifying the original.

Verifying Your Changes

To verify that your changes took effect, log out of your current session and log back in. If the login sound no longer plays, your modifications were successful. If you still hear the sound, double-check that you entered the commands correctly and that there were no error messages during execution.

Method 3: Replacing the Login Sound with a Custom Sound

If you enjoy having a login sound but prefer something different from the default Ubuntu audio, you can replace the existing sound file with a custom one. This approach allows for complete personalization while maintaining the login sound functionality.

Locating and Backing Up the Original Sound File

  1. Open Terminal (Ctrl+Alt+T)
  2. Create a backup of the original sound file:
sudo cp /usr/share/sounds/Yaru/stereo/warty-startup.oga /usr/share/sounds/Yaru/stereo/warty-startup.oga.bak

Preparing Your Custom Sound File

The login sound should be in OGG/OGA format for compatibility with Ubuntu’s sound system. If your audio file is in another format (MP3, WAV, etc.), you’ll need to convert it using a tool like FFmpeg or Audacity.

For optimal performance, consider these guidelines:

  • Keep the file size reasonable (under 1MB if possible)
  • Use a moderate length (5-15 seconds is ideal)
  • Ensure the audio isn’t too loud or jarring

Replacing the Default Sound File

  1. Open Terminal (Ctrl+Alt+T)
  2. Use the file manager with administrative privileges to access the sound directory:
nautilus admin:/usr/share/sounds/Yaru/stereo/
  1. Rename or move the existing warty-startup.oga file (or use the backup command from earlier)
  2. Copy your custom sound file into this directory
  3. Rename your custom sound file to warty-startup.oga

Alternatively, you can use terminal commands to accomplish the same task:

sudo cp /path/to/your/custom/sound.oga /usr/share/sounds/Yaru/stereo/warty-startup.oga

Testing Your New Login Sound

Log out of your current session and log back in to hear your custom sound. If the sound doesn’t play, check that:

  • The file format is correct (.oga or .ogg)
  • The file permissions allow system access (should be readable by all users)
  • The filename exactly matches the original

Method 4: Disabling Login Sound for All Users

If you manage a multi-user Ubuntu system and want to disable the login sound for everyone, you’ll need to make system-wide changes. This approach is particularly useful for administrators of shared computers or educational environments.

Understanding System-Wide vs. User-Specific Settings

Ubuntu maintains two levels of configuration:

  • User-specific settings: Stored in the user’s home directory and affect only that user
  • System-wide settings: Stored in system directories and affect all users

For login sounds, the system-wide configuration is managed through files in the /usr/share/gnome/autostart/ directory.

Commands for Global Sound Disabling

  1. Open Terminal (Ctrl+Alt+T)
  2. Create a backup of the original configuration file:
sudo cp /usr/share/gnome/autostart/libcanberra-login-sound.desktop /usr/share/gnome/autostart/libcanberra-login-sound.desktop.bak
  1. Edit the file to disable autostart for all users:
sudo nano /usr/share/gnome/autostart/libcanberra-login-sound.desktop
  1. Find the line containing X-GNOME-Autostart-enabled=true and change it to X-GNOME-Autostart-enabled=false
  2. Save the file (Ctrl+O, then Enter) and exit the editor (Ctrl+X)

Ensuring Changes Persist After Updates

System updates might occasionally restore default configurations. To ensure your changes persist:

  1. Create a configuration override in the local configuration directory:
sudo mkdir -p /etc/gnome/autostart
sudo cp /usr/share/gnome/autostart/libcanberra-login-sound.desktop /etc/gnome/autostart/
sudo nano /etc/gnome/autostart/libcanberra-login-sound.desktop
  1. Edit the file as described above, changing the autostart setting to false
  2. Save and exit

This creates a local override that will take precedence over the system default, even after updates.

Method 5: Managing Login Sound via Startup Applications

Another approach to controlling the login sound is through Ubuntu’s Startup Applications utility. This method gives you fine-grained control over what programs and scripts run when you log in.

Accessing and Configuring Startup Applications

  1. Press the Super (Windows) key and search for “Startup Applications”
  2. Open the Startup Applications utility
  3. If you see an entry related to login sound (e.g., “GNOME Login Sound” or similar), you can simply uncheck it to disable it

If you don’t see a login sound entry but want to be sure it’s disabled:

  1. Click the “Add” button
  2. In the “Name” field, enter “Disable Login Sound”
  3. In the “Command” field, enter:
gsettings set org.gnome.desktop.sound event-sounds false
  1. Click “Add” to save this new entry

This entry will run when you log in and disable event sounds, including the login sound.

Creating Custom Sound Startup Entries

If you prefer to have a custom login sound, you can create a startup entry for it:

  1. Open Startup Applications and click “Add”
  2. In the “Name” field, enter “Custom Login Sound”
  3. In the “Command” field, enter:
paplay /path/to/your/custom/sound.oga
  1. Click “Add” to save

This approach gives you the flexibility to use any sound file without modifying system files, though it will play slightly later in the login process than the default method.

Advanced Configuration Options

For users who want deeper control over Ubuntu’s sound system, there are several advanced configuration options available. These methods require more technical knowledge but offer greater customization potential.

Using dconf-editor for Direct GNOME Configuration

  1. Install dconf-editor if it’s not already installed:
sudo apt install dconf-editor
  1. Open dconf-editor and navigate to org → gnome → desktop → sound
  2. Find the event-sounds key and set it to false to disable all event sounds, including login sound

Configuring Display Manager Sound Settings

Ubuntu 24.04 LTS uses GDM (GNOME Display Manager) by default. To configure sound settings for the login screen itself:

  1. Open Terminal (Ctrl+Alt+T)
  2. Edit the GDM custom configuration:
sudo nano /etc/gdm3/custom.conf
  1. Add the following line under the [daemon] section:
InitialSetupEnable=false
  1. Save and exit (Ctrl+O, Enter, Ctrl+X)

Creating a Persistent Sound Configuration with PipeWire

Since Ubuntu 24.04 LTS uses PipeWire as the default sound server, you can create custom PipeWire configurations:

  1. Create a user configuration directory if it doesn’t exist:
mkdir -p ~/.config/pipewire
  1. Copy the default configuration:
cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire/
  1. Edit the configuration file to adjust sound behavior according to your needs

Troubleshooting Common Issues

Even with clear instructions, you might encounter issues when configuring login sounds. Here are solutions to common problems:

Sound Still Plays After Disabling

If you’ve followed the steps to disable the login sound but it still plays:

  1. Check if multiple methods are conflicting. For example, if you’ve disabled via System Settings but have a startup application playing a sound, the startup application will still work.
  2. Verify that you’re modifying settings for the correct user account.
  3. Try a more aggressive approach by muting the sound entirely at login:
sudo nano /etc/profile.d/mute-login.sh

Add these lines:

#!/bin/bash
pactl set-sink-mute @DEFAULT_SINK@ 1

Make it executable:

sudo chmod +x /etc/profile.d/mute-login.sh

Permission Denied Errors

If you encounter “Permission denied” errors when trying to modify system files:

  1. Ensure you’re using sudo for commands that modify system directories
  2. Check file permissions with ls -l and adjust if necessary:
sudo chmod 644 /path/to/file

Missing Configuration Files

If you can’t find the configuration files mentioned:

  1. Ubuntu versions may have slight differences in file locations. Use the find command to locate files:
sudo find / -name "libcanberra-login-sound.desktop" 2>/dev/null
  1. Ensure required packages are installed:
sudo apt install libcanberra-gtk-module libcanberra-pulse

Sound System Problems

If you’re experiencing broader sound issues beyond just the login sound:

  1. Check if you’re seeing “Dummy Output” in sound settings:
pulseaudio -k && pulseaudio --start
  1. Try reinstalling audio components:
sudo apt reinstall pipewire pipewire-pulse
  1. For persistent issues, consider switching between PipeWire and PulseAudio:
sudo apt install pulseaudio
sudo apt remove --purge pipewire-pulse

Additional Sound Management in Ubuntu 24.04

Beyond just the login sound, Ubuntu 24.04 LTS offers comprehensive audio management capabilities that allow you to control various system sounds and create a customized audio experience.

Managing Other System Sounds

Ubuntu’s sound theme includes multiple event sounds for actions like:

  • Error notifications
  • Window actions (minimize, maximize, close)
  • Button clicks
  • System alerts

To manage these sounds:

  1. Open Settings
  2. Go to Sound
  3. Navigate to the Alert Sound section
  4. Choose your preferred alert sound or select “None” to disable alert sounds

Understanding Sound Themes

Sound themes in Ubuntu are collections of audio files organized for different system events. The default theme in Ubuntu 24.04 LTS is Yaru, which provides a consistent audio experience throughout the desktop.

If you want to install alternative sound themes:

sudo apt install ubuntu-sounds

This package includes the classic Ubuntu sounds that many long-time users remember fondly.

Volume Control During Startup

If your login sound plays at an uncomfortable volume:

  1. Adjust the system volume before logging out
  2. Create a startup script that sets a reasonable volume level:
mkdir -p ~/.config/autostart
nano ~/.config/autostart/set-volume.desktop

Add these lines:

[Desktop Entry]
Type=Application
Name=Set Volume
Exec=pactl set-sink-volume @DEFAULT_SINK@ 50%
Terminal=false
NoDisplay=true
X-GNOME-Autostart-enabled=true

This script will set your volume to 50% at login.

Restoring Default Settings

If you’ve made changes to your login sound configuration and want to revert to Ubuntu’s default settings, here are several methods to restore the original behavior.

Reinstalling Sound Packages

The simplest way to restore default sound settings is to reinstall the relevant packages:

sudo apt reinstall --reinstall yaru-theme-sound

This command reinstalls the default Yaru sound theme, including the original login sound file.

Resetting GNOME Settings

To reset all GNOME sound settings to their defaults:

gsettings reset-recursively org.gnome.desktop.sound

This command reverts all sound-related settings in GNOME to their original values.

Restoring Backed-Up Files

If you followed the backup steps in earlier sections:

sudo cp /usr/share/sounds/Yaru/stereo/warty-startup.oga.bak /usr/share/sounds/Yaru/stereo/warty-startup.oga

This restores your original login sound file from the backup.

Verifying Restored Settings

After restoring settings, log out and log back in to verify that the default login sound plays correctly. If issues persist, check the troubleshooting section for additional guidance.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button