How To Disable Login Sound on Ubuntu 24.04 LTS
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
- Click on the “Activities” button in the top-left corner of your screen or press the Super (Windows) key on your keyboard
- Type “Settings” in the search bar and click on the Settings app icon
- In the Settings window, scroll down and select “Sound” from the left sidebar
- Scroll to the bottom of the Sound settings page
- Find the “Startup Sound” toggle switch
- 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
- Open Terminal by pressing Ctrl+Alt+T on your keyboard
- 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.
- 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
- Open Terminal (Ctrl+Alt+T)
- 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
- Open Terminal (Ctrl+Alt+T)
- Use the file manager with administrative privileges to access the sound directory:
nautilus admin:/usr/share/sounds/Yaru/stereo/
- Rename or move the existing
warty-startup.oga
file (or use the backup command from earlier) - Copy your custom sound file into this directory
- 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
- Open Terminal (Ctrl+Alt+T)
- 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
- Edit the file to disable autostart for all users:
sudo nano /usr/share/gnome/autostart/libcanberra-login-sound.desktop
- Find the line containing
X-GNOME-Autostart-enabled=true
and change it toX-GNOME-Autostart-enabled=false
- 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:
- 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
- Edit the file as described above, changing the autostart setting to false
- 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
- Press the Super (Windows) key and search for “Startup Applications”
- Open the Startup Applications utility
- 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:
- Click the “Add” button
- In the “Name” field, enter “Disable Login Sound”
- In the “Command” field, enter:
gsettings set org.gnome.desktop.sound event-sounds false
- 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:
- Open Startup Applications and click “Add”
- In the “Name” field, enter “Custom Login Sound”
- In the “Command” field, enter:
paplay /path/to/your/custom/sound.oga
- 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
- Install dconf-editor if it’s not already installed:
sudo apt install dconf-editor
- Open dconf-editor and navigate to org → gnome → desktop → sound
- 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:
- Open Terminal (Ctrl+Alt+T)
- Edit the GDM custom configuration:
sudo nano /etc/gdm3/custom.conf
- Add the following line under the [daemon] section:
InitialSetupEnable=false
- 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:
- Create a user configuration directory if it doesn’t exist:
mkdir -p ~/.config/pipewire
- Copy the default configuration:
cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire/
- 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:
- 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.
- Verify that you’re modifying settings for the correct user account.
- 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:
- Ensure you’re using
sudo
for commands that modify system directories - 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:
- 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
- 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:
- Check if you’re seeing “Dummy Output” in sound settings:
pulseaudio -k && pulseaudio --start
- Try reinstalling audio components:
sudo apt reinstall pipewire pipewire-pulse
- 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:
- Open Settings
- Go to Sound
- Navigate to the Alert Sound section
- 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:
- Adjust the system volume before logging out
- 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.