Discussion:
MNotification on MeeGo Tablet UX
Salvatore Iovene
2011-06-08 11:33:05 UTC
Permalink
Hi,
I set up a MeeGo chroot with the following image:
meego-tablet-ia32-oss+extra-pinetrail-1.2.0.90.3.20110606.1

I started the Tablet UX by launching `startmeego-debut-tablet` and it
seems to be working fine.

Then I installed 'libmeegotouch-devel' because I wanted to experiment
with `mnotificationtool`.

The first thing I noticed is that there were no Event Types created, so
I created /usr/share/meegotouch/notifications/eventtypes/test.conf, and
simply put the following in there:

iconId = Icon-close
persistent = false

After this, I tried to create a notification like this:

$ mnotification -a add test Test "This is just a test."

But nothing seems to happen. I have checked that `meego-ux-daemon` is
running, and `dbus-monitor` tells me the following (right after running
`mnotificationtool`:

signal sender=org.freedesktop.DBus -> dest=(null destination) serial=52
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
member=NameOwnerChanged string ":1.41" string ""
string ":1.41"
method call sender=:1.41 -> dest=org.freedesktop.DBus serial=1
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
member=Hello method call sender=:1.41 -> dest=org.freedesktop.DBus
serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
member=AddMatch string
"type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='com.meego.core.MNotificationManager'"
method call sender=:1.41 -> dest=org.freedesktop.DBus serial=5
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
member=RemoveMatch string
"type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='com.meego.core.MNotificationManager'"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=53
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
member=NameOwnerChanged string ":1.41" string ":1.41" string ""


Am I mistaken in expecting something to happen? Or am I missing
something?

Thanks,
Salvatore.
--
Salvatore Iovene <salvatore.iovene-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026
Salvatore Iovene
2011-06-08 11:50:52 UTC
Permalink
On Wed, 8 Jun 2011 14:33:05 +0300
Post by Salvatore Iovene
$ mnotification -a add test Test "This is just a test."
But nothing seems to happen. I have checked that `meego-ux-daemon` is
running, and `dbus-monitor` tells me the following (right after
I have even tried to debug `meego-ux-daemon`, putting a breakpoint here:

https://meego.gitorious.org/meego-ux/meego-ux-daemon/blobs/master/application.cpp#line1587

but, it won't stop there.
--
Salvatore Iovene <salvatore.iovene-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026
Andy Ross
2011-06-08 15:29:33 UTC
Permalink
Post by Salvatore Iovene
The first thing I noticed is that there were no Event Types created, so
I created /usr/share/meegotouch/notifications/eventtypes/test.conf, and
I don't think meego-ux-daemon supports custom event types. Did you
try one of the predefined ones (e.g. "device") first?

I've never used mnotificationtool, but I have played with the
MNotificationManager dbus interface using qdbus/dbus-send (on
a device, not in a chroot, though I doubt that should matter as
long as meego-ux-daemon is running) and it works.

Andy
Salvatore Iovene
2011-06-09 08:25:42 UTC
Permalink
Hey Andy,

On Wed, 08 Jun 2011 08:29:33 -0700
Post by Andy Ross
Post by Salvatore Iovene
The first thing I noticed is that there were no Event Types
created, so I
created /usr/share/meegotouch/notifications/eventtypes/test.conf,
I don't think meego-ux-daemon supports custom event types. Did you
try one of the predefined ones (e.g. "device") first?
Thanks for the suggestion. I've tried something simple like:

#> mnotificatontool -a add device Test "This is a test"

But with the same poor luck.
Post by Andy Ross
I've never used mnotificationtool, but I have played with the
MNotificationManager dbus interface using qdbus/dbus-send (on
a device, not in a chroot, though I doubt that should matter as
long as meego-ux-daemon is running) and it works.
Do you have that dbus-send command at hand? I can't seem to manage to
identify the right service name.

Thanks,
Salvatore.
--
Salvatore Iovene <salvatore.iovene-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026
Salvatore Iovene
2011-06-09 08:31:52 UTC
Permalink
On Thu, 9 Jun 2011 11:25:42 +0300
Post by Salvatore Iovene
Do you have that dbus-send command at hand? I can't seem to manage to
identify the right service name.
I have tried this, and I think this might be the culprit:

# dbus-send --print-reply \
--dest=com.meego.core.MNotificationManager /notificationmanager \
com.meego.core.MNotificationManager.addNotification \
uint32:0 uint32:0 \
string:'test1' string:'test2' string:'test3' string:'test4' \
string:'Icon-close' uint32:1 Error

org.freedesktop.DBus.Error.ServiceUnknown: The name
com.meego.core.MNotificationManager was not provided by any .service
files

Is something missing?
--
Salvatore Iovene <salvatore.iovene-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026
Andy Ross
2011-06-09 16:05:18 UTC
Permalink
Post by Salvatore Iovene
The name
com.meego.core.MNotificationManager was not provided by any .service
files
Is something missing?
Yes, meego-ux-daemon apparently isn't running. I'm lost on the SDK
specifics unfortunately. Hopefully someone else here can tell you how
to get your image set up correctly.

Honestly I find the easiest development/test environment to be a
pinetrail box.

Andy
Salvatore Iovene
2011-06-10 06:14:52 UTC
Permalink
On Thu, 09 Jun 2011 09:05:18 -0700
Post by Andy Ross
Post by Salvatore Iovene
The name
com.meego.core.MNotificationManager was not provided by any .service
files
Is something missing?
Yes, meego-ux-daemon apparently isn't running. I'm lost on the SDK
specifics unfortunately. Hopefully someone else here can tell you how
to get your image set up correctly.
Hi, actually it was running. I have solved the issue (at least for
myself) by creating the following file:

/usr/share/dbus-1/services/MNotificationManager.service

and writing in it:

[D-BUS Service]
Name=com.meego.core.MNotificationManager
Exec=/usr/libexec/meego-ux-daemon

If I export DISPLAY=:2 and run dbus-send again, it will work.

I'm wondering if that file should've been there in the first place.
--
Salvatore Iovene <salvatore.iovene-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026
Andy Ross
2011-06-10 16:57:43 UTC
Permalink
Post by Salvatore Iovene
Hi, actually it was running. I have solved the issue (at least for
/usr/share/dbus-1/services/MNotificationManager.service
Wait, I'm confused. The service definition is a dbus activation
record. It tells dbus-daemon to launch meego-ux-daemon automatically
when MNotificationManager is requested on the bus. If you need this,
it means it was *not* running and you needed a mechanism to start it.

While this will work, it's really not correct; meego-ux-daemon has
more work to do than just answering notifications. It should be
running all the time. I'm too lazy to check, but I'm all but certain
meego-ux-daemon should be started by uxlaunch via an entry in
/etc/xdg/autostart/. Do you not see it there?

Andy
Salvatore Iovene
2011-06-13 06:19:23 UTC
Permalink
On Fri, 10 Jun 2011 09:57:43 -0700
Post by Andy Ross
Post by Salvatore Iovene
Hi, actually it was running. I have solved the issue (at least for
/usr/share/dbus-1/services/MNotificationManager.service
Wait, I'm confused. The service definition is a dbus activation
record. It tells dbus-daemon to launch meego-ux-daemon automatically
when MNotificationManager is requested on the bus. If you need this,
it means it was *not* running and you needed a mechanism to start it.
While this will work, it's really not correct; meego-ux-daemon has
more work to do than just answering notifications. It should be
running all the time. I'm too lazy to check, but I'm all but certain
meego-ux-daemon should be started by uxlaunch via an entry in
/etc/xdg/autostart/. Do you not see it there?
/etc/xdg/autostart/meego-ux-daemon.desktop is there, and indeed
meego-ux-daemon is started after I do `startmeego`.

Rusty Lynch (CCed; Rusty, let's continue here, please) replied to me in
Post by Andy Ross
Looks to me like somehow you didn't manage to start meego-ux-daemon
in the same session as the one you were sending notification request.
I wonder if that can have anything to do with mic-chroot bind mounting
the following?

/var/run/dbus -> /chroots/meego/var/run/dbus
/var/lib/dbus -> /chroots/meego/var/lib/dbus

Thanks,
Salvatore.
--
Salvatore Iovene <salvatore.iovene-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Linux Software Engineer
Intel Open Source Technology Center, Finland
Tel.: +358504804026
Loading...