007900800083 | 14 May 17:44
Favicon

Way to show programs receiving dbus-signal ?

Hi dbus maillist friends:
     
  I'm searching a way to get which programs or processes have interested in specific dbus-signal,
given by name,interface of dbus-signal. It's helpful for seeing system's status & debugging.
Does someone kindly tell me whether there is a simple way or deep into source code of dbus? Thanks.

Cheers
Liang.


_______________________________________________
dbus mailing list
dbus@...
http://lists.freedesktop.org/mailman/listinfo/dbus
Lusy Hakobyan | 9 May 17:48
Picon

MessageRead in Dbus java is not found

Hello guys,

I am new to Dbus world.
I would highly appreciate if someone would react to my email.

I m using ubuntu 12.04 and making a program with Dbus java.
I could connect successfully to the session bus but when i am trying to read or write i get strange errors.

I should mention that i got all the jar files by installing directly from ubuntu so I didnt not build anything special.
just apt-get install libdbus-java.

the peace of code that i have is here.

mDBusConn = DBusConnection.getConnection("tcp:host=xxx.xxx.xxx.xxx,port=123544");

 InputStream in = new ByteArrayInputStream(data);
 MessageReader mReader = MessageReader(in);

the error that i get during the compilation is

[javac] DbusChannel.java:39: cannot find symbol
    [javac] symbol  : method MessageReader(java.io.InputStream)
    [javac] location: class com.tomtom.reflection2.dbus.DbusChannel
    [javac]      MessageReader mReader = MessageReader(in);
    [javac]                                                         ^
    [javac] 1 error


I dont understand why it is complaining about the constructor, since based on documentation(http://dbus.freedesktop.org/doc/dbus-java/api/) it should be there.
I am using just gedit for implementing classes so i cant see immediately if it is there or not.


Thanks in advance,
Kind regards,
Lusy

_______________________________________________
dbus mailing list
dbus@...
http://lists.freedesktop.org/mailman/listinfo/dbus
Andrew Marlow | 3 May 15:21

alloc_link, pthread mutex locks, malloc and performance

Hello dbus guys,

I am new to dbus and need some help please. I have some performance
concerns about a dbus app I am working on.

callgrind indicates that many posix mutex locks are being taken on the
server side during message validation. These calls are in alloc_link
(and the corresponding call to free_link). I did a temporary hack to
these functions, making them use malloc and free instead. This caused
the mutex locks to drop off the radar (hurrah!) but it also caused
malloc to feature much higher in the costs (boo!).

I know that the code is the way it is because originally the cost of
lots of small allocates via direct calls to malloc was found to be
expensive. Heap fragmentation springs to mind. This was solved using a
memory pool which was later made thread-safe by adding the locks. So
going back to direct malloc is only an experimental hack. I am not
proposing that this is done officially. Indeed, my profile results
demonstrate that the repeated allocates are an issue. But I have a few
thoughts about how to deal with this issue that I want to discuss in
this mailinglist.

First, has anyone looked at replacing the memory pool with a more
efficient allocator than malloc? I came across one called nedmalloc, at
http://www.nedprod.com/programs/portable/nedmalloc. This seems to
compare very favourably with hoard but with a more permissive license.
Has anyone tried that? What do people think?

Second, I notice from my callgrind results that the memory pool is used
extensively during message validation. Would it not be possible to
change the message validation so it used its own memory management. A
validation memory management package might still use a memory pool but
might also take a parameter to say whether or not to lock the pool. I am
just guessing here, since I dont know enough about the dbus code, but I
am wondering about specifying such a flag in my server since I know my
server is single-threaded. Maybe there should be a set flag routine that
a server can call during initialisation that says whether or not it is
single-threaded. What do people think about this please?

Third, a hybrid approach could be used. alloc_link could continue to use
the memory pool but the pool could employ a flag that controls whether
or not it locks the pool. Single threaded servers can set this flag to
false. This is slightly more dangerous because it assumes that a
single-threaded server will not have any threads started behind the dbus
scenes that calls alloc_link.

--
Regards,

Andrew Marlow

This transmission contains information that may be confidential and contain personal views which are not
necessarily those of YouView TV Ltd. YouView TV Ltd (Co No:7308805) is a limited liability company
registered in England and Wales with its registered address at B6, Ground Floor Broadcast Centre, 201
Wood Lane, London, UK, W12 7TP.

For details see our web site at http://www.youview.com.

_______________________________________________
dbus mailing list
dbus@...
http://lists.freedesktop.org/mailman/listinfo/dbus

Dave Lee | 21 Apr 11:55
Picon
Favicon

Activation problem: shell script

hello. I am trying to set up dbus activation for a service (running on system bus). The service file looks
like this:

[D-BUS Service]
Name=...
Exec=...
User=root

The Exec= line specifies a shell script, which basically read options from a config file, and then
launch a daemon with these options as arguments.

I found that if my script's hashbang is #!/bin/sh, dbus won't do activation. When I launch a client,
it will attempt to activate the service, but then will show an error:

ERROR: Failed to connect to XXXXX: org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch
daemon, file not found or permissions invalid
ERROR: Failed to connect to daemon (bus: 'system')!

However if the hashbang is #!/usr/bin/env sh, activation works.

Why does the hashbang make a difference? Thanks.

_______________________________________________
dbus mailing list
dbus@...
http://lists.freedesktop.org/mailman/listinfo/dbus

ben ayed wiem | 18 Apr 17:05
Picon
Favicon

problem with dbus execution

Hi,

I have runned an application, on the robot MarXbot, that call these 2 functions in the same time and wait for their replies. 

First function:
QDBusConnection connection = QDBusConnection::systemBus();
 ch::epfl::mobots::AsebaNetwork network(DBUS_SERVICE_ASEBA, DBUS_PATH_ASEBA, connection);
 QDBusPendingReply<Values> reply = network.GetVariable("base-sensors","proximity.corrected");
 reply.waitForFinished();
 if (reply.isError()){
     qDebug() << "error proxy \n";
   } 

Second function:
QDBusConnection connection = QDBusConnection::systemBus();
ch::epfl::mobots::AsebaNetwork network(DBUS_SERVICE_ASEBA, DBUS_PATH_ASEBA, connection);
QDBusPendingReply<Values> replyV = network.GetVariable("sensor-turret","sharp.value");
 replyV.waitForFinished();   
QDBusPendingReply<Values> replyA = network.GetVariable("sensor-turret","sharp.angle");
replyA.waitForFinished();
if (replyV.isError()||replyA.isError()){     
 qDebug() << "error sharp \n";
  } 

but some times I get this message:

QDBusConnectionPrivate::connectSignal: received error from D-Bus server while connecting signal to QDBusAbstractInterface::_q_serviceOwnerChanged(QString,QString,QString): org.freedesktop.DBus.Error.NoMemory (Not enough memory)
QDBusConnectionPrivate::connectSignal: received error from D-Bus server while connecting signal to QDBusAbstractInterface::_q_serviceOwnerChanged(QString,QString,QString): org.freedesktop.DBus.Error.NoMemory (Not enough memory)
error proxy
 
QDBusConnectionPrivate::connectSignal: received error from D-Bus server while connecting signal to QDBusAbstractInterface::_q_serviceOwnerChanged(QString,QString,QString): org.freedesktop.DBus.Error.NoMemory (Not enough memory)
error sharp
 
QDBusConnectionPrivate::connectSignal: received error from D-Bus server while connecting signal to QDBusAbstractInterface::_q_serviceOwnerChanged(QString,QString,QString): org.freedesktop.DBus.Error.NoMemory (Not enough memory)

When I run only one function in a time, I don't get this message and the execution go very well.

Is there any way to avoid this problem?

Best regards


_______________________________________________
dbus mailing list
dbus@...
http://lists.freedesktop.org/mailman/listinfo/dbus
Robert Schweikert | 17 Apr 19:39
Gravatar

DBus for LSB

Hi,

For the next LSB release (LSB 5.0) the LSB work group would like to 
include DBus in the LSB. For this to heppen we need to figure out what 
interfaces and commands should be included in the LSB. The target 
version for inclusion would be DBus 1.4

Taking a look at openSUSE 11.4 I found 333 interfaces marked as GLOBAL 
in the library. But I didn't find any documentation of the interfaces on 
the DBus site. I was probably looking the the wrong place, thus if 
someone can point me in the right direction, that would be great. Also, 
should all the 333 interfaces be in the LSB, and if not what would be 
the best candidates for LSB inclusion?

On the DBus site I found the following commands documented:

dbus-daemon, dbus-send, dbus-monitor, dbus-launch, and dbus-uuidgen

on openSUSE the dbus-launch command does not exist. Is this also common 
on other distributions?

Thanks,
Robert

Havoc Pennington | 11 Apr 15:49
Picon
Favicon

control groups

Hi,

In the performance paper
http://shorestreet.com/sites/shorestreet.com/files/dbus-perf-report-0.9.9.pdf
there's discussion of scheduler issues where the bus only gets the
same CPU slice as each individual dependent app, so in the aggregate
the apps get way too much time and the bus way too little.

I was just reading Lennart's post here
http://0pointer.de/blog/projects/cgroups-vs-cgroups.html where he
mentions balancing mysql and httpd even though they are made up of
different numbers of processes.

Some docs here:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu.html

If you were to split the system into "dbus-daemon" and "everything
else" and say that when both need CPU, the CPU should be divided
equally between those two groups, I wonder if that would solve the
scheduling problem. I don't know if it's possible.

Havoc
_______________________________________________
dbus mailing list
dbus@...
http://lists.freedesktop.org/mailman/listinfo/dbus

Shah, Nirav J2 | 9 Apr 19:04
Picon
Favicon

RE: dbus Digest, Vol 81, Issue 3

Hello, 

Thanks for your reply Thiago. Although you are right that a readable property has to be valid always. I am in
situation where it's not. Working with legacy code here with minimal redesign allowed. 

In my case it's an object-path type. On initialization it's not valid.  I am thinking of returning a specific
value (indicating invalid property) to make getall work. I have thought of 3 possible things. I just
wanted to know if any one of this can be appropriate "standard wise"?

1) Changing the type of the property to a container type like array of object-path (ao). I think from
observation this can be NULL. 

2) Using an invalid object path like "/"

3) Return an object initialized with an empty string. I think I tried this and it blew up because there is a
valid type check somewhere in dbus library

I would really appreciate your feedback. 

-----Original Message-----
From:
dbus-bounces+nirav.j2.shah=intel.com@...
[mailto:dbus-bounces+nirav.j2.shah=intel.com@...]
On Behalf Of dbus-request@...
Sent: Saturday, April 07, 2012 12:00 PM
To: dbus@...
Subject: dbus Digest, Vol 81, Issue 3

Send dbus mailing list submissions to
	dbus@...

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.freedesktop.org/mailman/listinfo/dbus
or, via email, send a message with subject or body 'help' to
	dbus-request@...

You can reach the person managing the list at
	dbus-owner@...

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dbus digest..."

Today's Topics:

   1. DBUS getall method (Shah, Nirav J2)
   2. Re: DBUS getall method (Thiago Macieira)

----------------------------------------------------------------------

Message: 1
Date: Fri, 6 Apr 2012 19:32:31 +0000
From: "Shah, Nirav J2" <nirav.j2.shah@...>
Subject: DBUS getall method
To: "dbus@..." <dbus@...>
Message-ID:
	<5A7EE8205ACF264A834A5C987038F7B81A178150@...>
	
Content-Type: text/plain; charset="us-ascii"

Hello,

I have a dbus implementation which is implementing multiple Interfaces inside a single object beside the
standard dbus interfaces.  I have 2 questions.

1) The get_all() function takes the interface_name as an input. But this input seems to be optional
(at-least according to the qdbusviewer).  According to the specification is it in fact true (for multiple
interface usecase).

2) If the input is infact optional and If some of the properties are not always valid. In the situation can the
get_all() just skip those properties? I tried this and maybe it's just my implementation but it crashed.
Has anyone done something similar? I couldn't find any examples of multiple interface in a single object
at all.

PS: By valid I mean it is not always relevant.

Example to clarify the doubt.
//standard Interface each needs to implement
Object 1-> Object1.Dbus.Introspectable
Object 1-> Object1.Dbus.Properties
//implementation specific interfaces.
Object 1 -> Object1.Interface.A
Object 1-> Object1.Interface.B
Object 1 -> Object1.Interface.C

During introspection I am passing a structure with all the properties belonging to all the interfaces.

Each interface has a set of properties which are not always valid for the object. So in the above example for a
particular run time scenario properties of Interface.B may not valid.  What is the get all supposed to do then.

Thanks,
Nirav.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20120406/d49d747b/attachment.htm>

------------------------------

Message: 2
Date: Fri, 06 Apr 2012 19:35:20 -0300
From: Thiago Macieira <thiago@...>
Subject: Re: DBUS getall method
To: dbus@...
Message-ID: <1515604.v0EWz8MDy5 <at> tjmaciei-mobl2>
Content-Type: text/plain; charset="us-ascii"

On sexta-feira, 6 de abril de 2012 19.32.31, Shah, Nirav J2 wrote:
> Hello,
> 
> I have a dbus implementation which is implementing multiple Interfaces
> inside a single object beside the standard dbus interfaces.  I have 2
> questions.
> 
> 1) The get_all() function takes the interface_name as an input. But this
> input seems to be optional (at-least according to the qdbusviewer). 
> According to the specification is it in fact true (for multiple interface
> usecase).
> 
> 2) If the input is infact optional and If some of the properties are not
> always valid. In the situation can the get_all() just skip those
> properties? I tried this and maybe it's just my implementation but it
> crashed. Has anyone done something similar? I couldn't find any examples of
> multiple interface in a single object at all.

I'd say this situation is not valid. All readable properties are readable all 
the time and produce a value. The interpretation of said value is something 
the interface decides, though.

> Example to clarify the doubt.
> //standard Interface each needs to implement
> Object 1-> Object1.Dbus.Introspectable
> Object 1-> Object1.Dbus.Properties
> //implementation specific interfaces.
> Object 1 -> Object1.Interface.A
> Object 1-> Object1.Interface.B
> Object 1 -> Object1.Interface.C
> 
> During introspection I am passing a structure with all the properties
> belonging to all the interfaces.
> 
> Each interface has a set of properties which are not always valid for the
> object. So in the above example for a particular run time scenario
> properties of Interface.B may not valid.  What is the get all supposed to
> do then.

Return them anyway, since they *are* valid.

Shah, Nirav J2 | 6 Apr 21:32
Picon
Favicon

DBUS getall method

Hello,

I have a dbus implementation which is implementing multiple Interfaces inside a single object beside the standard dbus interfaces.  I have 2 questions.

1) The get_all() function takes the interface_name as an input. But this input seems to be optional (at-least according to the qdbusviewer).  According to the specification is it in fact true (for multiple interface usecase).

2) If the input is infact optional and If some of the properties are not always valid. In the situation can the get_all() just skip those properties? I tried this and maybe it’s just my implementation but it crashed. Has anyone done something similar? I couldn’t find any examples of multiple interface in a single object at all.

PS: By valid I mean it is not always relevant.

Example to clarify the doubt.

//standard Interface each needs to implement
Object 1-> Object1.Dbus.Introspectable
Object 1-> Object1.Dbus.Properties

//implementation specific interfaces.
Object 1 -> Object1.Interface.A
Object 1-> Object1.Interface.B
Object 1 -> Object1.Interface.C

During introspection I am passing a structure with all the properties belonging to all the interfaces.

Each interface has a set of properties which are not always valid for the object. So in the above example for a particular run time scenario properties of Interface.B may not valid.  What is the get all supposed to do then.

 

Thanks,

Nirav.

 

_______________________________________________
dbus mailing list
dbus@...
http://lists.freedesktop.org/mailman/listinfo/dbus
Fabrice DELENTE | 1 Apr 15:10
Picon

Bluetooth headset not appearing in pavucontrol

Hello.

I have compiled and installed blueman and pulseaudio on a linux
slackware 13.37 system.

In blueman, I can pair my bluetooth headset with the computer, and
then connect to the AudioSink (A2DP) service.

However, in pavucontrol, I don't have the headset available to choose
in the "Configuration" tab, as is the case in Ubuntu for example.

I can't use the BT headset in mplayer either (with alsa as an output
layer), because I get an error (bt_audio_service_open: connect()
failed: Connection refused (111))

Is this a D-BUS error?

Any help/hint around?

Thanks!

László Monda | 1 Apr 00:12
Picon
Favicon
Gravatar

Mounting volumes through the command line

Hi List,

There's a second HDD in my laptop which is fully encrypted.  I saved
its password and I can easily mount it by simply clicking on its label
in Nautilus.  I'd like to automatically get this HDD mounted upon
logging into Gnome.

I'm sure that it's possible somehow, either through D-Bus or by
calling Nautilus with some arguments.  D-Bus may be more beneficial
because it wouldn't involve any windows popping up.

Please help or direct me to somewhere where somebody can answer my question.

Thanks in advance.

--

-- 
László Monda <http://monda.hu>
_______________________________________________
dbus mailing list
dbus <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus

Gmane