I was testing i3wm (sudo apt-get install i3
is what I ran, and chose i3 from the log in screen) on my machine and after a while, decided to switch back to Unity. Upon switching back, I noticed that notifications came in the top right corner similar to i3 even though I was using Unity.
I'd really like it to use the normal Unity notification bubbles instead.
I looked into it and turns out instead of notify-osd
, dunst
is being used.
I tried using sudo vim /usr/share/dbus-1/services/org.freedesktop.Notifications.service
and editing the file, but it has the correct line (i.e. Exec=/usr/lib/x86_64-linux-gnu/notify-osd
) as expected.
I also tried unity-tweak-tool --reset-unity
but that didn't do anything.
Is it possible for me to return to the normal notifications? Any help would be greatly appreciated. Thanks 🙂
Edit: I was able to return to the normal notifications by removing i3wm itself (and dunst). What I am actually asking is: is it possible to change to normal notifications while still keeping i3 and dunst on my system?
Note: This is NOT a duplicate of Notify-osd notifications appear unthemed in top-left corner. The solution there is to remove dunst and I would like to keep dunst and have that work when I choose i3, and have notify-osd work when I choose Unity.
Best Answer
I realize I'm two years late to the party, but if anyone else encounters this problem, here's a solution that will use notify-osd when logged into Unity, and dunst when running i3.
If you just want to keep dunst installed, but not auto-invoke it via DBus skip to the Quick Hack section.
Dunst in i3, notify-osd in Unity
Step 1
We want to override the behaviors of
/usr/share/dbus-1/services/org.freedesktop.Notifications.service
and more importantly/usr/share/dbus-1/services/org.knopwob.dunst.service
.Since Dbus looks at $XDG_DATA_HOME when searching for service files, and Ubuntu for some reason doesn't set that environment variable, we need to do it ourselves:
Step 2
We need to create our service file:
Make the file look like this:
Step 3
Create the script referred to in your D-BUS file that invokes dunst if i3 is running, otherwise notify-osd:
Make it look like this:
Make it executable:
Step 4
That should be it. Log out and then log in again. Test it in both Unity and i3 by running
Quick Hack
If you exclusively want to use notify-osd it's enough to edit
/usr/share/dbus-1/services/org.knopwob.dunst.service
accordingly: