Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu Gnome 13.10 (Gnome Shell 3.8).

When I change the volume or brightness via hotkeys or my volume +/- buttons on my keyboard I do not get the notification in the middle of the screen.

Other notifications (bottom of screen) work.

How do I enable the notification again?

share|improve this question

1 Answer 1

The notification program responsible for the pop-up with the volume and the brightness is notify-osd. It is called by the dbus service under the name org.freedesktop. Notifications and executed with the command Exec=<path to notification program of your choice>.

In my case, I had installed Xfce and then there were two files in /usr/share/dbus-1/services/<naming scheme foreign to me>.service that called the org.freedesktop.Notifications. I checked the whole folder by grepping for Name= and counting the results of non-unique results and found that every namespace in that directory was unique except for my notifications namespace.

This led me to the solution of renaming the file that executed the Xfce notifyd to service.disabled which made the file unreadable to dbus and then after a restart my volume and brightness notifications came back.

So a general more abstract method of resolving this issue for multiple users might involve grepping for org.freedesktop.Notifications in the /usr/share/dbus-1/services folder and then renaming any of the offending entries to anything that doesn't end in .service leaving only the path to the actual executable you wish to load and if it's not available.

You can create one using the template below as a guide for adding your desired notification service. One could also theoretically call bash and use conditionals in the dbus service file as it allows for that and you could also use environment variables against a boolean check to select which notification program you want based on your desktop environment, but I haven't finished getting that to work yet. I was just glad to get my volume and brightness indicators back.

Anyway, here's the code: this is specific to my 64-bit Ubuntu. There will be some slight modifications based on your environment. Also make sure you have installed notify-osd if it isn't installed already. I tried looking for an update-alternatives type method to switch it, but this is the best I could come up with so far.

This method will allow you to keep whatever other programs you installed that disabled it in the first place. I found other methods that just brute forced the issue by completely purging the programs that took its place, but if you wish to keep the programs then this method is for you.

grep org.freedesktop.Notifications /usr/share/dbus-1/services/*
sudo mv <offending entries to same filename>.service.disabled

gksu gedit /usr/share/dbus-1/services/org.freedesktop.Notifications.service

Add the following content:

[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/x86_64-linux-gnu/notify-osd

I hope that helps. Forgive my poor editing, feel free to improve my presentation to make it easier to read.

share|improve this answer
    
I added sudo and gksu where needed. Also switched vim to gedit... as far as I know vim isn't installed on a default Ubuntu installation, only vi is. –  MadMike Oct 17 at 6:06
    
thank you, MadMike. You were right about vim, I remember I had to install that. I appreciate the changes. I really also wanted to include my sources but it took me a lot of reading to get to the point I did and by that time I was just burnt out on it and wanted to get the message out to about three or four threads I found along the way where other people were also waiting for responses and fixes. –  keldwud Oct 18 at 5:45
    
Don't feel sorry to post a first draft as an answer. If the answer is missing stuff you want to add later, simply add a note to the answer like "Note: Answer is not complete. I'm going to complete it later". Like in this case, someone else can even pick it up and improve some further. Should someone upvote the answer, the original editor (in this case: you) will receive the reputation. –  MadMike Oct 18 at 8:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.