Change login sound in Ubuntu 12.04


When I opened the Startup Application Preferences to disable the login sound ( as I used to do in the old versions of Ubuntu), all I saw was a blank window. The reason for this is that the login sound option is hidden on the Startup Application Preferences by default but you can make it visible again easily. Just open the terminal and type the following command to edit the login sound script:

 sudo gedit /usr/share/gnome/autostart/libcanberra-login-sound.desktop 

You will have the script looking like this:

 [Desktop Entry] Type=Application Name=GNOME Login Sound Comment=Plays a sound whenever you log in Exec=/usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login" OnlyShowIn=GNOME;Unity; AutostartCondition=GSettings org.gnome.desktop.sound event-sounds X-GNOME-Autostart-Phase=Application X-GNOME-Provides=login-sound X-GNOME-Autostart-enabled=false NoDisplay=true 

To make the login sound option visible on the Startup Application Preferences, just edit the last line of the above file into:

 NoDisplay=false 

Save the file and open the Startup Application Preference again and you will see the login sound option. To turn off the login sound, just uncheck the box:

turn off log in sound ubuntu 12.04

In case you want to change the login sound instead of turning it off, you just need to edit this line of the login sound script:

 Exec=/usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login" 

The part “desktop-login” is the name of the login sound file desktop-login.ogg which is located in /usr/share/sounds/ubuntu/stereo. To change the login sound, you just need to move a new sound file (must be in .ogg format) to this folder and change the part “desktop-login” into the name of the new sound file.

To convert a sound file into .ogg format, you can use ffmpeg. For instance, the command to convert a .mp3 file to .ogg is:

 ffmpeg -i sound-file.mp3 sound-file.ogg 

To view the Source Click Here

About pacesettergraam

A good and realistic person

Posted on May 22, 2012, in ubuntu. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: