notify-osd starts automatically in gnome session and prevents gnome-shell from owning notifications dbus service

Bug #943010 reported by Michael Moorman
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
notify-osd (Ubuntu)
Triaged
Low
Unassigned

Bug Description

When I log into Ubuntu 11.10's gnome-shell session, notify-osd is started first when I attempt to run a program that calls notifications. I have to manually kill notify-osd and restart gnome-shell, every time I log in. I mentioned this problem in LP #830467 but that bug is technically not the same issue, and that bug received no traffic or attempts to fix the bug in the last four months.

Expected behavior:
-Log into Gnome, open quodlibet, see gnome-shell notification on the bottom of the screen

Actual behavior:
-Log into gnome, open quodlibet, see notify-osd notification in upper right corner and notify-osd appears in the process list

Since removing notify-osd from Ubuntu is not possible, configuring the code that is run when notify-osd is started, presumably when there is a call made on dbus for notifications, such that if gnome-shell is running it is always favored over notify-osd. In the meantime it seems the only workaround for gnome-shell users is to remove notify-osd.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, what login manager do you use? could you echo $GDMSESSION?

the dbus service uses:
"Exec=/bin/sh -c 'if [ ! -x /usr/lib/notification-daemon/notification-daemon ] || [ "$GDMSESSION" = guest-restricted ] || [ "$GDMSESSION" = gnome-classic-guest-restricted ] [ "$GDMSESSION" = default -a "$(basename `readlink /etc/alternatives/x-session-manager`)" = gnome-session ] || [ "$GDMSESSION" = ubuntu ] || [ "$GDMSESSION" = ubuntu-2d ]; then exec /usr/lib/notify-osd/notify-osd; else exec /usr/lib/notification-daemon/notification-daemon; fi'"

so it should start only in ubuntu (unity) sessions

affects: notify-osd → notify-osd (Ubuntu)
Changed in notify-osd (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Michael Moorman (tensorpuddin) wrote :

I can see why it starts notify-osd. My $GDMSESSION is gnome-shell, but $(basename `readlink /etc/alternatives/x-session-manager`) = gnome-session, so It starts notify-osd in that code. I don't have /usr/lib/notification-daemon/notification-daemon installed anyway, so if that if statement predicate was not true, it would end up spewing errors anyway.

Revision history for this message
Michael Moorman (tensorpuddin) wrote :

After installing notification-daemon notify-osd doesn't start and notification-daemon starts instead. However that also doesn't provide the desired behavior with quodlibet, though for some reason volume controls use the gnome-shell notification style.

description: updated
Revision history for this message
Michael Moorman (tensorpuddin) wrote :

In case it wasn't clear, I use GDM as my login manager, and not the new one that Ubuntu introduced.

Revision history for this message
Michael Moorman (tensorpuddin) wrote :

The code is an if statement, it can only execute one of the two programs, and the desired behavior involves not running either since if either runs it claims that dbus service instead of gnome-shell.

So it should probably be changed to test for something which determines that we're running gnome-shell explicitly and to not do anything in that case.

Revision history for this message
Michael Moorman (tensorpuddin) wrote :

This bug affects 12.04 as well.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Right, that's all suboptimal but there is no good way to select at runtime what should get dbus activated, the easier way to workaround it for you is probably to uninstall notify-osd

Changed in notify-osd (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Taryn Fox (jewelfox) wrote :

The ubuntu-desktop, gnome-power-manager, and update-notifier packages are all dependent on notify-osd. Should this fact be filed as a separate bug?

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Taryn, it is correct for ubuntu-desktop to depend on notify-osd. gnome-power-manager and update-notifier are not dependent on notify-osd: they are dependent on notification-daemon, and notify-osd "Provides: notification-daemon".

Revision history for this message
Marius Gedminas (mgedmin) wrote :

This affects 12.10 too.

GDMSESSION is 'gnome', /usr/lib/notification-daemon/notification-daemon does not exist. I use gdm instead of lightdm with a gnome-shell session. Although in my case notify-osd is not launched when I log in, but, rather, when I resume from suspend.

Is there a way to distinguish gnome-shell sessions from legacy gnome sessions? Perhaps the if could be restructured so that notify-osd is only launched for ubuntu sessions? In other words, if the session is a gnome session, and notification-daemon doesn't exist, let's not launch notify-osd instead?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.