Move Chrome notifications or use system notification

The problem

I have the Chrome notifications popping up in the lower left corner of my main screen. This is quite annoying, 'cause the cursor of my terminal windows are right there, and they cover completly the command line.

I'm on Ubuntu 14.04 and Chrome 42

I've already tried:

  • making my secondary (on the right) screen as primary: it still display notifications on the lower left angle of my left monitor
  • Activate Chrome native notifications
    • Libnotify Notifications in Chrome doesn't work, even with the modifications proposed by the accepted answer
    • Linux Native Notification is incompatible, needs Unity plugin (what's that???)
    • Chromify-OSD requires NPAPI, that I can't install, it's deprecated

Question

What can I try? I will accept any of those solutions:

  • redirect the notifications to Unity
  • move them in an other angle of my screen
  • move to an other monitor (I'm using Chrome on the secondary monitor)

Also...

I also found this on Chromium FAQs:

Q. Why don't Chromium notifications use the D-BUS-based notifications system (aka libnotify / notification-daemon)?

A1. HTML5 notifications can contain arbitrary HTML, which is not supported by the notification protocol. (This is the same reason we don't use Growl on OS X.)

A2. Chromium's notifications include a button that brings up an options menu, which is also not supported by the notification protocol.

A3. The glitzy Ubuntu notifications daemon, by design, does not allow the user to interact with notifications at all, which doesn't work when the notification HTML includes clickable links.

A4. It would be nice to extend the protocol to allow Chromium to integrate. Any takers?


Solution 1:

So here's the problem. Like you mentioned, NPAPI is on its way out and Webkit applications are going to make heavy use of their own in-built notification system instead of respecting the one provided by a desktop environment [1]. Unless someone comes up with a way with intercepting the notification requests for the browser and have it to speak at a local daemon that can in turn speak with notify-osd; we're out of luck.

Expanding on this, KDE allows for button manipulation in its notification service whereas Ubuntu does not. If they've unified this one action as a generic feature, it might be even more feasible to implement the above. But alas.

[1]: More likely, they want to make it as rich as possible but without worrying too much about cross platform support.

Solution 2:

Have you tried this?

Step 1: install patched libnotify

sudo add-apt-repository ppa:leolik/leolik 
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libnotify-bin
pkill notify-osd

Step2: Install config utility

  • 32-bit version
  • 64-bit version