How to replace MATE's notification daemon (and customize it!)

:skull: This software is dead in Ubuntu 20.04, unless you feel like using an older version of VLC or VLC via snapd. Lack of maintenance and incapability of using Qt4 without removing VLC had made this guide difficult to use, and in my opinion invalidates it from hereon until a solution is found. Apologies for the inconvenience.

The specific thing which kills it:

:heavy_dollar_sign: x-terminal-emulator output for notifyosdconf:

notifyosdconf: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory

:ubuntu_mate: Introduction

It might seem silly at first; Why replace the notification daemon when MATE's daemon is good enough? Because it isn't good enough. It'll never be good enough. Know why? Because you can mod notify-osd, which is something you can't do with the supplied themes mate-notification-daemon installs.

If you're alright with the default daemon, then by all means ignore this guide. But if you want to have one you can customize and control til' your heart's content, then follow along and you'll have a notification display you can have a fair degree of control over. You can even make it match the colour of your desktop, just like on vanilla Ubuntu.

⛙ Pre-emptive patching

You can install notify-osd as it stands right now. But that won't do, because there's a patched version which exists that allows you to modify how it looks. Instead of installing it straight away, perform these following commands;

:heavy_dollar_sign: In x-terminal-emulator:

sudo add-apt-repository -y ppa:leolik/leolik
sudo add-apt-repository -y ppa:nilarimogard/webupd8
sudo apt update
sudo apt install -y notify-osd notifyosdconfig libqtgui4

:information_source: Not only will this install notify-osd, but also the customization software

:warning: Special information for Artful Aardvark onward

If using this PPA beyond 17.04, then you have to modify the source list after following this advice. As follows:
:spiral_notepad: In your preferred text editor:key: @ /etc/apt/sources.list.d/leolik-ubuntu-leolik-*.list:
Replace:

deb http://ppa.launchpad.net/leolik/leolik/ubuntu artful main
# deb-src http://ppa.launchpad.net/leolik/leolik/ubuntu artful main

With:

deb http://ppa.launchpad.net/leolik/leolik/ubuntu zesty main
# deb-src http://ppa.launchpad.net/leolik/leolik/ubuntu zesty main

:information_source: Initial source will differ between versions. Doesn't matter, it's being replaced anyway.

You also have to append onto the webupd8 repository. As shown:
:spiral_notepad: In your preferred text editor:key: @ /etc/apt/sources.list.d/nilarimogard-ubuntu-webupd8-*.list:
Append:

deb http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu zesty main
# deb-src http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu zesty main

:key: Run your preferred text editor as sudo in a terminal. If you would rather begin paths with admin:// for GNOME GVFS, you would then need to know the exact version of Ubuntu you are on and replace the asterisk with its codename. You can find this information in mate-system-monitor under the system tab. As an example; if on 19.10, replace * with eoan.

:arrow_right: Superseding the daemon

After, you'll need to make notify-osd the daemon in use instead of mate-notification-daemon. To do this, perform the following as admin / superuser:

This is where I would normally say Save the old version as something else, but because of how little is involved, you can just comment out the old exec line and instead use this;

:spiral_notepad: In your preferred text editor:key: @
/usr/share/dbus-1/services/org.freedesktop.mate.Notifications.service:
Replace:

Exec=/usr/lib/mate-notification-daemon/mate-notification-daemon

With:

#Exec=/usr/lib/mate-notification-daemon/mate-notification-daemon
Exec=/usr/lib/x86_64-linux-gnu/notify-osd

You could instead replace the exec line completely, save it as something else, rename the old file and make a link but that's quite fussy for a single line of text. Either way, when you are done making your changes sign out, then sign back in. When you do notify-send 'text1' 'text2' you should see that your notifications look different. That's the result we wanted. Now, we can have some fun with them;

:paintbrush: Customizing notifications

Leolik's patched notify-osd can be edited with notifyosdconf if you installed the notifyosdconfig package. It is also accessible from the Applications menu as NotifyOSD Configuration in Accessories.

notifyosdconf lets you change a lot of things. Here's a quick reference for each tab;
Behaviour
Position reference, location on screen, timeout, close on click, fade on hover

Bubble
Vertical and horizontal position fine-tuning ("gap"), colour, use of desktop colour, opacity of colour, icon size, gauge size (sliders and such), notificaton width, notification radius

Text
Title text margin (really notification margin), title size, title font weight, title colour, title opacity, body size, body font weight, body colour, body opacity, body shadow (applies to title also)

:warning: Caveats and differences

For some reason notify-osd gauges are not in effect, ergo the gauge size value is rendered irrelevant. Everything else works, and there should be no problem for any software relying on libnotify4. Main differences from mate-notification-daemon are the lack of displayed timers, and maybe a lack of buttons in notifications.

notifyosdconf was previously headed and maintained by Amandeep Grewal, it's now maintained by Alin Andrei.

:information_source: Information sources


https://forums.linuxmint.com/viewtopic.php?t=126670

:right_anger_bubble: Corrections

lah7 provided some important information about notifyosdconf and location of notify-osd for the exec line. Since everything worked, I assumed everything was fine; I was very wrong.

I also fixed up information about opening text files as admin, and added libqtgui4 as a package to install because I encountered an error about that in Eoan.

7 Likes

Many thanks for the guide. :slight_smile:

I had a bit of a fiddle in a VM first, and it worked well. There is a typo for the add-apt-repository command. I also needed ppa:amandeepgrewal/notifyosdconfig which was missed from the instructions. (It didn’t seem to import that PPA properly though…?)

I did things a bit differently:

It’s like pre-Unity Ubuntu again! :confetti_ball:

You are correct about the filepath and I will make an edit to this guide shortly. You are wrong about using amandeep’s repo, if you imply it is the only source; webupd8 (ppa:nilarimogard/webupd8) also has a copy of this software. I falsely implied that leolik’s PPA had it, I will also correct this.

That’s what I get for editing this on a late night. I make many mistakes when I should be in bed.

1 Like

Thank you for te guide, worked perfectly

Until somebody finds a way to make it work with Qt5, the notifyosdconf software is dead dead. I'll leave a notice top of OP and hopefully find a way.