Properly support libnotify notifications in Chrome.
This is an extension for Chrome in Linux. It won't do anything for Windows users. This catches Chrome Webkit notifications from webpages and displays those notifications in native Libnotify (xfce4-notify, notify-osd, etc) popups instead. This is rewrite of Linux Native Notification for Chrome, which is based on Chromify-OSD. Both of those solutions only work with selected libnotify servers. This aims to work with everything based on libnotify. A list of servers that should work is here: https://wiki.archlinux.org/index.php/Desktop_notifications Also, the previous solutions are based on NPAPI, which is being phased out. This is a Native Messaging implementation, so you also need to install the "host" portion of this software, which is written in C. You can download that zip file here. https://drive.google.com/file/d/0BzOewlVTs_tpdTNFckZKeG5HRE0/edit?usp=sharing Extract it and run the install.sh. Hopefully this can be automated in the future. TODO: - make it work with gmail :( If you are interested, the code base is here: https://drive.google.com/folderview?id=0BzOewlVTs_tpek54TDVNbFFxWlk&usp=sharing Want a test? (Notifications API): http://jsfiddle.net/yoshi6jp/Umc9A/ (webkitnotifications API):http://0xfe.muthanna.com/notifyme.html
- (2017-01-24) François Robichet: Doesn't work (I'm on Arch)
- (2016-11-04) David Strobach: Broken and outdated. The worst thing about this extension is that it prevents the desktop notifications from showing altogether.
- (2016-10-23) Aaron Papin: Needs updating. The extension works fine once you fix it on your own. See: http://askubuntu.com/questions/465727/activate-chrome-native-notifications for help.
- (2016-05-23) Tilman Adler: I've looked at the code and having developed a similar extension I think it should work. However I will not install some random binary and I did not care to compile the C stuff myself. Why not have some simple python script instead, which could be easily verified and be much shorter, too?
- (2016-05-18) Alex Kelly: Tried in Fedora 23, with dev packages installed and after discovering the "host" part that needed done. It didn't work at all. When going to pages that should request authorization, that authorization request never shows up. Disable the extension and they do. Chrome notifications suck, and I was hoping this was going to be the answer to merge it into the OS, but it didn't work for me.
- (2016-03-05) Cassidy James Blaede: Doesn't work.
- (2015-12-12) Vikram Jit Singh: Doesn't work on Fedora 23
- (2015-08-28) I actually got this to work on Arch Linux & Chromium 44, but sadly it cannot intercept Chrome notifications created by extensions. To be fair, the author does say "this catches Chrome Webkit notifications from webpages" and my short-sightedness is my own. If someone does have a need for web notifications then here's how I got this working: * Make sure libcurl and json-c is installed (and their -dev packages if your distro likes to split them up) In invoke_notify.c: * add #include <stdint.h> under the string.h line * remove the "json/" part from the relevant #include line * Build with: gcc -march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -o invoke_notify `pkg-config --cflags --libs libnotify json-c libcurl` invoke_notify.c * Open com.initiated.chrome_libnotify_notifications.json and change the extension ID already in there to gphchdpdmccpjmpiilaabhpdfogeiphf * Get a root shell If using chromium: TARGET=/etc/chromium/native-messaging-hosts/ Chrome: TARGET=/etc/opt/chrome/native-messaging-hosts * mkdir -p $TARGET * cd $TARGET * copy com.initiated.chrome_libnotify_notifications.json and invoke_notify into target * edit com.initiated.chrome_libnotify_notifications.json and replace HOST_PATH with $TARGET/invoke_notify (perform the expansion manually in your mind) * make sure the $TARGET directory has 755 permission and is owned by root:root, the json file is 644 and owned by root:root and the invoke_notify binary 755 and root:root
- (2015-08-06) Horațiu Mlendea: Does not work on Arch Linux x64 with GNOME Shell 3.16.2
- (2015-03-01) Russell Sim: doesn't work
- (2014-12-28) Not working
- (2014-11-22) Gergo Tisza: Does not work on Ubuntu 14.04 / Chrome 39.
- (2014-09-15) Not working with Ubuntu 14.04
- (2014-08-30) Artem Hluvchynskyi: Non-functional.
- (2014-08-08) Crowler Van Helsing: Doesn't work... :(
- (2015-07-14, v:1.1) Paulo Diovani: Notifications not working
After install the extension and try to request permission (with your test site): `Uncaught TypeError: Notification.requestPermission is not a function`
- (2015-01-29, v:1.1) Не работает.
Протестировал расширение в трех браузерах: Ubuntu Chromium Google Chrome Opera К сожалению, даже на вашем тестовом сайте, при включенном расширении не работает проверка прав доступа. Т.е. Нажимая на "Request Permission" Получаем "embedded:9 Uncaught TypeError: undefined is not a function" Нажимая на "Check Permission" Получаем "notify_hook.js:8 Uncaught TypeError: Cannot read property 'body' of undefined" На сайте vk.vom при попытке получить права доступа получаем "im.js?349:6893 Uncaught TypeError: undefined is not a function" И так повсюду, во всех браузерах. Если же расширение отключить то всё работает: Запрашиваются права и появляются стандартные уведомления.
- (2014-12-02, v:1.1) Francescodario Cuzzocrea: Can't install host
Hello, I'm trying to install the host part but it give me the following errors : ./install.sh: 9: [: Linux: unexpected operator ./install.sh: 12: [: root: unexpected operator ./install.sh: 35: ./install.sh: Bad substitution I'm on ubuntu linux 14.10
- (2014-05-21, v:1.0) Christopher Cook: Not working
This does not seem to work. I've installed the host component correctly, I think, as well as the browser extension. I used the pre-compiled binary so perhaps that is the issue. Instead of libnotify toasts I still see the Chrome toasts.