[HOW TO] Get the new Notifications on Intrepid

Update: fixed a minor glitch in the how-to, added a troubleshooting section.

Update2: added new dependency to the instructions. Also note that to update your existing version you need to go into its directory, type “bzr pull”, sudo apt-get install libwnck-dev, and recompile.

Hi, Alex Rybicki posted a tutorial about how to get the new Jaunty notifications on Ubuntu Intrepid.

Since the tutorial got some minor detail wrong, I am going post a better version here and take the chance to comment a little bit the new notification system.

Will this mess the system ?

No way, what you’re going to do will just download the source code and start it in place of the existing notification system. Interrupting the program with Ctrl+C, kill, or system restart will bring your beloved old notification system back.

How to install it ?

cd ~
sudo apt-get install bzr gnome-common automake libwnck-dev
bzr branch lp:notify-osd
cd notify-osd
./autogen.sh
make

Now you can start it:

killall notification-daemon ;  /home/[username]/notify-osd/src/notify-osd

..where [username] is your username.

You can interrupt the new notifications system by hitting ctrl+C. That will automatically bring back the old ones.

[the full credit of this tutorial goes to Alex]

If anyone of you figures out a tutorial to make them working on non-debian distributions, let me know, I’ll publish it or link it from here happily.

How to test it ?

A test script is included, which will show a bunch of fake notifications. To test it, open a new terminal window and type:

/home/[username]/notify-osd/src/send-test-notification.sh

Now a the test notifications should show. On the right upper corner of the window.

How to make it default ?

A simple way may be:

gedit ~/.new-notifications.sh

Then paste there this:

#!/bin/bash
killall notification-daemon ;  /home/[username]/notify-osd/src/notify-osd

Then save, exit from gedit and..

chmod +x ~/.new-notifications.sh

Then go in System->Preferences->Sessions and add a new item with /home/[username]/.new-notifications.sh as the launching command.

UPDATE: further troubleshooting

Thanks for everyone’s signalations. If you still experience issues, try the following:

  • If you’re running a non-Gnome environment (such as KDE), and the thing doesn’t compile, you may need additional dependencies. Try:
    sudo apt-get install gnome-common automake libdbus-glib-1-dev libgtk2.0-0
    libgtk2.0-dev libgtk2.0-common libgconf2-dev libx11-dev
    libnotify-dev libnotify1 libnotify-bin
  • If you run the program from terminal and you see assertion coming up complaining about icons try this tip from MadsRH.
  • If some notification come out as an alert-box instead of a notification, it probably means it’s a notification that requires user interaction. Those will come as messagebox. That’s a design choice from canonical.So not a bug, a feature (?!?).

My test and thoughts:

I tried the new notifications using a little python script I developed time ago, which uses libnotify to notify the user about available text snippets to replace what he’s currently typing.

It worked without any change, and quite nicely, I say:

Before:

Old style

After:

New notifications

The result is pretty nice. One difference you hardly notice in this pictures, is the position of the dialog box. While my script asks libnotify do display the notification in the right bottom corner of the screen, the new notifications completely ignore that setting.

The second test I did is try changing sound volume, but Gnome kept using the usual way to notify me of the change.

The third test I did is activating the notifications on Banshee.

banshee-notifications

The results leave much to be desidered. The new notifications don’t support action buttons in the bubbles by choice. That’s not bad, but instead of suppressing the buttons they just fallback to normal dialogs.

Plainly said, this sucks. In such cases you’ll get a foreground message box while you’re typing:

screenshot11

Further more, if you don’t close manually all those dialogs, they won’t time out as the old libnotify bubbles:

Multiple annoyances here

Needless to say, I find this choice quite obnoxious. They should have fell back to old notifications, or find some kind of trick (right button or something else) to manage the action bubbles.

This is just going to put pressure on upstreams for nothing, and make ubuntu packages more patchy than ever.

I won’t discuss the choice of not supporting user interaction on the bubbles, but the workaround is sucky at the least.

Conclusions

Is this gonna change radically the way users interact with the desktop ? No. It’s just a small step, and surely not the most needed right now. Just a testing the ground one, as in “Hello upstreams, I’m Canonical, you don’t mind if I mess with your stuff, right ?“. A clever move, from a certain point of view, I say.

As for me, I am going to leave the new notifications as default, since I don’t really use any software that implements the action bubbles and/or doesn’t allow disabling. But if I find any, that will wipe out the new style bubbles in a second.

Need some more desktop eye candy ?

.. or maybe Ear Candy ?

This seems like a great time to subscribe my RSS !

74 responses to “[HOW TO] Get the new Notifications on Intrepid”

  1. Vadim P.

    I think you veered off the goal of providing instructions a bit.

  2. Stefano Forenza

    What you mean ?

  3. alex

    hey stefan, great guide. you were even more straightforward then i was :)
    im glad you got everything working, and i like your script to make it default.
    also, dugg ;)
    -alex

  4. Vadim P.

    A howto doesn’t critisize the technology or offer personal opinion. It’s instructions on how to install something, and that’s it ;)

  5. jorge

    The banshee annoying-popus is a known bug and is being worked on.

  6. Stefano Forenza

    @Vadim P.: Good point. I shall have choosen another title maybe. Beside that, I am kinda flooding the planet these days, so making two separate posts wouldn’t have been a good solution.

    @jorge: I know that. One of the cons I am pointing on, is the need to patch software to make the new thing to work smoothly. Seems like the ‘easy path’ to me. I really would rather have looked for some better workaround inside the new noticing system, but that’s just me.

  7. Filo

    i get this error:

    Running autoconf…
    configure.in:45: error: possibly undefined macro: AM_PATH_GTK_2_0
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.

    do you know the fix ??
    I tried to upgrade automake to 1.10 (with jaunty package) whithout success.

    Thanks

  8. Stefano Forenza

    @Filo: as I am not on Jaunty, I can’t reproduce the issue. But grrr.. you’re reminding me about something I wanted to write in the post and simply forgot. As it is a development repository, some revisions may be broken.

    To see if that’s the case, delete the branch, then branch it back with:

    bzr branch lp:notify-osd -r193

    That will pull from launchpad the revision no. 193, which is the one I used for the test.

    That *may* solve.

  9. Filo

    I just solved by installing this packages:

    libdbus-glib-1-dev libgconf2-dev libgtk2.0-dev

    but if i try to run make it doesn’t compile -_-

  10. Stefano Forenza

    I guess you lack further dependencies then. That probably mean you’re on kde, am I wrong ? If so, the road could be still long and steep :-)

  11. Tim

    Hey. Awesome guide, I just an issue. I think

    tim@tim-desktop:~$ killall notification-daemon && /home/tim/notify-osd/src/notify-osd
    notification-daemon: no process killed
    tim@tim-desktop:~$

  12. Stefano Forenza

    Tim: true ! && should be just a ;

    Updating the post.

  13. Tim

    It works. Thanks.

    One more thing, in the compile steps, you forgot “make” at the end.

  14. Eric Wendelin

    Almost there! When running ./send-test-notification.sh:
    ./send-test-notification.sh: 3: notify-send: not found

    Any ideas?

  15. Stefano Forenza

    Look better, it’s there ! (*blinks*)

    Thanks !

  16. Stefano Forenza

    @Eric: try installing libnotify-bin. (sudo apt-get libnotify-bin)
    Seems weird to me, but it may be required. Please let me know if it works !

    (chances are it’s strictly required only by the test script)

  17. Eric Wendelin

    @Stefano: Yes! That seems to help. I’m now seeing the notifications, but I’m getting this while running ./send-test-notifcation.sh now:
    ** (notify-osd:30064): CRITICAL **: load_icon: assertion `info’ failed

    Either way. Most excellent, thanks!

  18. Elgin Mones

    I get the same error as Eric.

  19. Jean-Francois

    Here is what I get:

    jean-francois@jean-francois-desktop:~$ killall notification-daemon ; /home/jean-francois/notify-osd/src/notify-osd
    notification-daemon: no process killed
    bash: /home/jean-francois/notify-osd/src/notify-osd: No such file or directory
    jean-francois@jean-francois-desktop:~$

    and if I go into: /home/jean-francois/notify-osd/src/notify-osd there is only a notify-osd.xml file is that it?

    Thanks in advance!
    Cheers!

  20. Stefano Forenza

    If you refer to the file not found error: sudo apt-get libnotify-bin
    If you refer to the CRITICAL assertion then just don’t mind. That’s a notice that will be eventually resolved by the developers, and won’t influence the working of the program at all.

  21. Stefano Forenza

    @Jean-Francois:
    “notification-daemon: no process killed”: that’s normal. don’t mind that.
    The rest is worrysome, I’d suggest you to delete everything and start again from scratch.

  22. Vadim P.

    Looks like a lot of people are having trouble with this guide.

    If you want it easier, just follow the updates: http://macslow.thepimp.net/?p=175 to get them… no compiling.

  23. Sarah

    It won’t let me do the ‘make’ command. Everytime I run ‘./autogen’ I read:

    Running aclocal-1.10…
    configure.in:45: warning: macro ‘AM_PATH_GTK_2.0′ not foun in library
    autoconf…
    configure.in:45: possibly undefined macro: AM_PATH_GTK_2_0
    If this token and others are legitimate, please use m4 pattern allow. See the Autoconf documentation.

    Can anyone help a noob out?

  24. 2null » NotifyOSD unter Intrepid

    [...] Get the new Notifications on Intrepid Written by nullnull in: Ubuntu | Schlagworte: Ubuntu [...]

  25. Matthew Bauer

    The command for running the notification could be:
    killall notification-daemon ; ~/notify-osd/src/notify-osd
    That way you don’t have to specify your username.

  26. David

    I think a more complete command for step #2 would be:
    sudo apt-get -y install bzr gnome-common automake libgtk2.0-dev libgconf2-dev \
    libnotify-dev libdbus-glib-1-dev

    I’m not certain that this is the complete list of packages which are needed to compile this, but it’s more complete than before. Since having people try to install packages which they already have is harmless, this expanded list is preferrable.

  27. Vlad

    I followed all your instructions but when I try to start the new notifications I get an error:

    bash: /home/vlad/notify-osd/src/notify-osd: No such file or directory

    What happened?

  28. keith

    after trudging through the dependencies, i finally got it to work…

    $ sudo apt-get install bzr gnome-common automake libdbus-glib-1-dev libgtk2.0-0 libgtk2.0-dev libgtk2.0-common libgconf2-dev libx11-dev libnotify-dev libnotify1 libnotify-bin

    $ cd ~/notify-osd
    $ ./autogen.sh
    $ make
    $ killall notification-daemon ; ~/notify-osd/src/notify-osd

    only thing i see so far that bothers me is that the notifications default to my second monitor instead of the one in front of me. it doesn’t seem to work “all the time”, yet, either…

  29. Andrew

    I had issues using bzr to get the source but i managed to figure out the direct url and used wget to grab it.
    Thanks to the lib advice above I got it compiled but when i try run ./notify-osd (after I’ve killed the notification daemon) i get the following error:

    (notify-osd:2823): Gtk-WARNING **: cannot open display:

    I’m not using a standard ubuntu distro. I’m running the crunchbang distro so it could very well be related to that.
    I’m still using Gnome though so I’m hoping it’s something else.

  30. Enhanced notifications on Intrepid « 0ddn1x: tricks with *nix

    [...] Enhanced notifications on Intrepid Filed under: Linux — 0ddn1x @ 2009-02-24 22:42:25 +0000 http://www.stefanoforenza.com/how-to-get-the-new-notifications-on-intrepid/ [...]

  31. Jaymoon

    Of the three Ubuntu setups I have, all ranging in various hard ware, and all installed from different versions over the past few years… I still cannot get anything to compile through ‘make’.

    No matter what guide I follow, no matter what dependency it asks for, I follow line by line in the guides, and it just doesn’t want to work.

    That’s OK, I am a patient man by now to wait for the final release of the new notifications, thanks for your guide and help though.

  32. ubukool

    Sarah,

    Try installing the dependencies that keith listed above. The problem is you don’t have GTK 2.0, but if you run the first command that keith gave, you will be able to install it and it might work

  33. ubukool

    I typed ‘make’ and it didn’t work. I typed ‘sudo make’ and it seemed to be working until it spewed out all these errors:

    test-withlib.c:31:30: error: libnotify/notify.h: No such file or directory
    cc1: warnings being treated as errors
    test-withlib.c: In function ‘test_withlib_get_server_information’:
    test-withlib.c:51: error: implicit declaration of function ‘notify_init’
    test-withlib.c:52: error: implicit declaration of function ‘notify_get_server_info’
    test-withlib.c: In function ‘test_withlib_get_server_caps’:
    test-withlib.c:67: error: implicit declaration of function ‘notify_get_server_caps’
    test-withlib.c:67: error: assignment makes pointer from integer without a cast
    test-withlib.c: In function ‘test_withlib_show_notification’:
    test-withlib.c:85: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:85: error: (Each undeclared identifier is reported only once
    test-withlib.c:85: error: for each function it appears in.)
    test-withlib.c:85: error: ‘n’ undeclared (first use in this function)
    test-withlib.c:89: error: implicit declaration of function ‘notify_notification_new’
    test-withlib.c:92: error: implicit declaration of function ‘notify_notification_show’
    test-withlib.c: In function ‘test_withlib_update_notification’:
    test-withlib.c:101: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:101: error: ‘n’ undeclared (first use in this function)
    test-withlib.c:113: error: implicit declaration of function ‘notify_notification_update’
    test-withlib.c: In function ‘test_withlib_pass_icon_data’:
    test-withlib.c:128: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:128: error: ‘n’ undeclared (first use in this function)
    test-withlib.c:129: error: ‘GdkPixbuf’ undeclared (first use in this function)
    test-withlib.c:129: error: ‘pixbuf’ undeclared (first use in this function)
    test-withlib.c:135: error: implicit declaration of function ‘gdk_pixbuf_new_from_file_at_scale’
    test-withlib.c:137: error: implicit declaration of function ‘notify_notification_set_icon_from_pixbuf’
    test-withlib.c: In function ‘test_withlib_priority’:
    test-withlib.c:150: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:150: error: ‘n1’ undeclared (first use in this function)
    test-withlib.c:150: error: ‘n2’ undeclared (first use in this function)
    test-withlib.c:150: error: left-hand operand of comma expression has no effect
    test-withlib.c:150: error: ‘n3’ undeclared (first use in this function)
    test-withlib.c:150: error: left-hand operand of comma expression has no effect
    test-withlib.c:150: error: ‘n4’ undeclared (first use in this function)
    test-withlib.c:150: error: left-hand operand of comma expression has no effect
    test-withlib.c:164: error: implicit declaration of function ‘notify_notification_set_hint_string’
    test-withlib.c:169: error: implicit declaration of function ‘notify_notification_set_urgency’
    test-withlib.c:169: error: ‘NOTIFY_URGENCY_CRITICAL’ undeclared (first use in this function)
    test-withlib.c: At top level:
    test-withlib.c:185: error: expected ‘)’ before ‘*’ token
    test-withlib.c: In function ‘test_withlib_actions’:
    test-withlib.c:196: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:196: error: ‘n1’ undeclared (first use in this function)
    test-withlib.c:201: error: implicit declaration of function ‘notify_notification_add_action’
    test-withlib.c:204: error: ‘NotifyActionCallback’ undeclared (first use in this function)
    test-withlib.c:204: error: expected ‘)’ before ‘callback’
    test-withlib.c: In function ‘test_withlib_close_notification’:
    test-withlib.c:218: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:218: error: ‘n’ undeclared (first use in this function)
    test-withlib.c:231: error: implicit declaration of function ‘notify_notification_close’
    test-withlib.c: In function ‘test_withlib_append_hint’:
    test-withlib.c:243: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:243: error: ‘n’ undeclared (first use in this function)
    test-withlib.c: In function ‘test_withlib_swallow_markup’:
    test-withlib.c:285: error: ‘NotifyNotification’ undeclared (first use in this function)
    test-withlib.c:285: error: ‘n’ undeclared (first use in this function)
    make[2]: *** [test_modules-test-withlib.o] Error 1

    Help!!! :-)

  34. Planeta jakilinux.org » Instalacja nowych powiadomień w Ubuntu 8.10
  35. Ryan

    I get the same errors as ubukool… I’m stuck =(

  36. Vadim P.

    So skip the error prone manual compilation method, and just get the update via Synaptic: http://macslow.thepimp.net/?p=175 (see comments).

  37. x0r

    very cool. once i added all dependencies, it worked like a charm :D

  38. ubukool

    @ Vadim P,

    yes, but the update via synaptic is for Jaunty only, isn’t it? I looked for notify-osd in the Intrepid repositories and there’s nothing.

  39. Omar

    When I tried to enter the “make” command, it gave me this error:

    make: *** No targets specified and no makefile found. Stop.

  40. Vadim P.

    Yes, because it -just- came out. It also won’t be backported because most apps in Intrepid simply don’t support it / do their notifications properly as they should.

  41. Peng’s links for Friday, 26 February « I’m Just an Avatar

    [...] Forenza: [HOWTO] Get the new Notifications on Intrepid. The release of Ubuntu 9.04 will see some new, and much nicer display of the system notifications. [...]

  42. Rishi

    Ubukool and Ryan… make sure libnotify-dev is installed:

    sudo apt-get install libnotify-dev

  43. ubukool

    Dear Rishi,

    Thanks for coming to the rescue, it works a treat now! :)

  44. ukblacknight

    I managed to install it after installing some extra dependencies, but I’m getting these messages when I ran the test script:

    ** (notify-osd:1300): CRITICAL **: load_icon: assertion `info’ failed

    ** (notify-osd:1300): CRITICAL **: load_icon: assertion `info’ failed

    ** (notify-osd:1300): WARNING **: bubble_recalc_size(): WARNING, no layout!!!

    ** (notify-osd:1300): CRITICAL **: load_icon: assertion `info’ failed

    ** (notify-osd:1300): CRITICAL **: load_icon: assertion `info’ failed

    ** (notify-osd:1300): WARNING **: WARNING: No layout defined!!!

    It seems to be working with mixed results. Sometimes notifications from emesene show in the new notifications, whilst sometimes they appear windowed like Banshee in the how-to. Anyone else getting these errors?

  45. Stefano Forenza

    Ok, thank you very much everyone.
    I’ve been away (traveling to France) in the days when many help request were made, but it’s nice to see some help came from other readers.

    @ukblacknight: i’ve added a troubleshooting section in the article. Look there for the link to a tip that may solve your problem.

  46. ukblacknight

    @Stefano: The link you provided as part of the troubleshooting doesn’t seem to do much for me, there’s no content on the page! It doesn’t seem to be a major problem anyway as most applications tend to be using the new notifications fine :)

  47. ukblacknight

    Actually, it’s working now. Thanks for that! To those who have looked at that link and can’t find your index file, you need to save your current theme first if you haven’t already. Then, you’ll find it under ~/.themes/[name_of_theme]/index.theme.

  48. Gabe

    You’ll need to do:
    apt-get install build-essential libgtk2.0-dev libgconf2-dev libdbus-glib-1-dev libnotify-dev

    before running autogen.

    If you want to do a proper local install, do:

    autogen –prefix=/usr/local && make && sudo make install

    This will install the binary in /usr/local/libexec

    or use checkinstall to make a .deb ;)

  49. Jinx-Wolf

    I know this is much later in development, which is probably why I can no longer get it to work, but I just want to point out that this tutorial is NOT working for me.

    from the ./autgen.sh:
    [
    checking for WNCK... configure: error: Package requirements (libwnck-1.0) were not met:

    No package 'libwnck-1.0' found
    ]

    I’ve tried installing ever dependency stated here and from the other tutorial.

  50. Stefano Forenza

    @Jinx-Wolf: Have you tried to sudo apt-get install libwnck ?
    Nice packages offerings popup. I’d try: sudo apt-get install libwnck-dev

Leave a Reply

Bills

Don’t forget to Subscribe

Latest Activity

Posts

  • LOL
    https://lists.ubuntu.com/archives/ubuntu-desktop/2011-November/003467.html many lessons to be learned there * Share it !
  • Deja vu
    Reminds me of something. Share it !
  • Google this is ridiculous
    Google you’re doing it wrong. Very wrong. This is utterly ridiculous. It’s a screenshot with a standard Firefox browser, in the standard screen resolution (1280×800), on Read More
  • A step back from the open source
    One month ago, I created my first Android app. While the app was a paid one, the reception has been outstanding. I’ve gotten a fair amount Read More
  • Facebook shuts down EventPress development.
    When you’re a big company, especially one that makes its money on free web services and advertising, it’s very easy to say you love open Read More