Ubuntu

No login sound in Ubuntu 11.10

Asked by Hoàng Ngọc Long on 2011-10-19

I have just install Ubuntu 11.10 (fresh install using Wubi). The problem here is that the login sound for my account does not work. In the "Startup application preference", I have enabled "GNOME Login Sound", its command is: /usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login". After I login there is no welcome sound. When I run that command in Terminal, I got an error "Failed to play sound: File or data not found". Although I have checked that the file desktop-login.ogg is in the folder "/usr/share/sounds/ubuntu/stereo", its permission is "-rw-r--r--". In System Preference->Sound, Sound Alert theme is Default, Alert Level is 100. Here is the result of command "cat ~/.gconf/desktop/gnome/sound/%gconf.xml":
<?xml version="1.0"?>
<gconf>
 <entry name="theme_name" mtime="1319010906" type="string">
  <stringvalue>freedesktop</stringvalue>
 </entry>
 <entry name="event_sounds" mtime="1319010906" type="bool" value="true"/>
</gconf>
I have tried to chang freedesktop to ubuntu but this still does not work.
Other users on my computer (even the guest session) does not have this issue, the login sound play every time they login. The only different is that they don't have the folder "sound" in "~/.gconf/desktop/gnome".
The only way I found to make the login sound works with my account is add the value: --file="/usr/share/sounds/ubuntu/stereo/desktop-login.ogg" to the command of "GNOME Login Sound". But that is not what I want. Why other accounts still work without this value? How can I know and define which path canberra-gtk-play looks for to play the login sound?
Thanks in advanced.
P/S: canberra-gtk-play from libcanberra 0.28, Ubuntu 11.10 64-bit.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu libcanberra Edit question
Assignee:
No assignee Edit question
Last query:
2011-12-02
Last reply:
2011-12-15

I'm experiencing the exact same problem. If I place the ogg files directly under /usr/share/sounds it is able to play the sounds.
There must be some place where you set the sound theme path, but I haven't been able to find it.

Using dconf I set /org/gnome/desktop/sound/theme-name to ubuntu (it was set to freedesktop).
This did the trick for me.

Francois (francoismoolman) said : #3

Hi Daniel.

I have some questions for you.

1) How did you change the sound the sound in Ubuntu 11.10 ? Please give the correct terminal command.
2) When I tried to copy or the.org files from gnome. I got the a error message which say I don't have permission to move or copy the files. Please could you explain, how you had done it.

Regards,

Francois

Hi Francois,
You need root privileged rights to move or copy those files. You can try this command "gksudo nautilus", this will run Nautilus with root privilege.
Best regards,
Long

Francis Lau (francislau97) said : #5

What I did (running Ubuntu Oneiric Ocelot and Unity):

   1. Go to Dash Home.
   2. Search and run "Startup Applications".
   3. Click on "GNOME Login Sound".
   4. Click "Edit" on the right panel.
   5. Add "--file="/usr/share/sounds/ubuntu/stereo/desktop-login.ogg"" without the beginning and ending parentheses to the end of string in the "Command" box.
   6. Click "Save".
   7. Click "Close".
   8. Restart your computer. If you still don't hear any sound, please go back and remove the string and from the "Command" box. Always remember to save your changes!!!

Hi Francis Lau,
That is what I did (please read my first post).
Other accounts but mine still work without this value.

Francis Lau (francislau97) said : #7

@Hoàng Ngọc Long: This sounds more like a problem during your installation. I've used Wubi to install too but my computer could not detect my sound card (speaker icon stuck with three dashes). Then, I've uninstalled it and made a fresh install with a LiveUSB. Maybe you should consider backing up your system and make a fresh install with a LiveUSB? Wubi is not bug-free after all, and many problems are still arising from it.

Max (alywgo) said : #8

I had the same problem with Ubuntu 11.10.
To test the command /usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login" I opened a shell window and the command dosen't work.
So I test all sound file in the directory /usr/share/sounds/ubuntu/stereo and the only file that canberra-gtk-play command plays is bell.ogg. All other . files have a "-" in the filename. I guess that this is the problem.

Anyway according to the following post: https://bugs.launchpad.net/ubuntu/+source/libcanberra/+bug/862374
I put the file desktop-login.ogg in /usr/share/sounds directory and the command canberra-gtk-play works fine.

I hope this can help.

Bye.

Max

HaoCS (zhanghaowx) said : #9

I had the exactly same problem and after following the instructions here
http://www.upubuntu.com/2011/11/how-to-fix-no-sound-after-login-on.html
the problem is fixed
Hope that can help

eunjin Jin (eunjj79) said : #10

hi everyone :)
I have just install Ubuntu 11.10 (fresh install using Wubi). The problem here is that the login sound me too :)
i'm using Apple macbook pro, Installing Windows 7 in Boot Camp. and triple-booting with Ubuntu.
Of course, in Windows to install Ubuntu with wubi installation
Win 7 boot loader menu to choose from agent.
Well I've been all around, start by searching the sound I can not hear anything.

The path of sound file
/ usr / share / sounds / ubuntu / stereo
/ usr / share / sounds / gnome / deafult / alerts

This is a command from the Start program did not?
/usr/bin/canberra-gtk-play -V 0.0 --id="desktop-login" --description="GNOME Login"

Package installed GNOME session log in and log out sound events
gnome-session-canberra

May be
Wrong command from the Start program

   1. Go to Dash Home.
   2. Search and run "Startup Applications".
   3. Click on "GNOME Login Sound".
   4. Click "Edit" on the right panel.
   5. Add "--file="/usr/share/sounds/ubuntu/stereo/desktop-login.ogg"" without the beginning and ending parentheses to the end of string in the "Command" box.
   6. Click "Save".
   7. Click "Close".
   8. Restart your computer. If you still don't hear any sound, please go back and remove the string and from the "Command" box. Always remember to save your changes!!!

thanks
the problem is fixed

bye :)

Can you help with this problem?

Provide an answer of your own, or ask Hoàng Ngọc Long for more information if necessary.

To post a message you must log in.