delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/27/03:41:26

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
From: Michael Albinus <michael DOT albinus AT gmx DOT de>
To: cygwin AT cygwin DOT com
Subject: Re: Emacs and DBUS
References: <847hjvdyr9 DOT fsf AT aol DOT com> <4C667099 DOT 2020103 AT cornell DOT edu> <87mxsj69st DOT fsf AT gmx DOT de> <4C6C2D11 DOT 8020003 AT cornell DOT edu> <87d3tf685q DOT fsf AT gmx DOT de> <4C6C4BC8 DOT 9010400 AT cornell DOT edu> <87lj7vokyt DOT fsf AT gmx DOT de> <4C74648F DOT 2030203 AT cornell DOT edu> <87d3t7nzez DOT fsf AT gmx DOT de> <4C75226F DOT 9030005 AT cornell DOT edu> <4C752AAB DOT 9000304 AT cornell DOT edu> <4C752F4F DOT 60203 AT cornell DOT edu> <8762yyovon DOT fsf AT gmx DOT de> <4C76C254 DOT 4040802 AT cornell DOT edu> <87occpyvsl DOT fsf AT gmx DOT de> <4C77233A DOT 1090504 AT cornell DOT edu>
Date: Fri, 27 Aug 2010 09:41:01 +0200
In-Reply-To: <4C77233A.1090504@cornell.edu> (Ken Brown's message of "Thu, 26 Aug 2010 22:30:18 -0400")
Message-ID: <871v9kbj02.fsf@gmx.de>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Ken Brown <kbrown AT cornell DOT edu> writes:

>> This is also a D-Bus client, which connects to the *same* session bus as
>> Emacs did due to $DBUS_SESSION_BUS_ADDRESS. Now you should see the
>> signal sent by dbus-monitor in Emacs.
>
> OK, I started the session bus the right way this time, but I still
> didn't see any signal from dbus-monitor in Emacs.  I assume I should
> have seen something in the echo area?

Yes. You could test whether both Emacs and dbus-monitor use the same bus
by reordering the calls:

- apply dbus-launch as described
- echo $DBUS_SESSION_BUS_ADDRESS
- in *another* shell, set $DBUS_SESSION_BUS_ADDRESS to this value, and
  start dbus-monitor
- start Emacs in the first shell, and load dbus.el. You shall see in
  the other shell output from  dbus-monitor, telling that an application
  has started. It will also tell you the name of that application, like
  ":1.2".
- apply (dbus-get-unique-name :session) in Emacs. The result shall be
  the same name.
- start dbus-monitor in the same shell as Emacs. In the other
  dbus-monitor, you should be notified, that an application has been started.

>> Maybe you can compile dbusbind.c with the compiler flag DBUS_DEBUG,
>> something like this in the Emacs source tree:
>>
>> # MYCPPFLAGS='-DDBUS_DEBUG' make
>>
>> This enables test traces sent to Emacs' stdout (the shell where you have
>> started it). I've introduced this flag while testing dbusbind.c, when it
>> has blocked Emacs, and I didn't want to start gdb ...
>>
>> Maybe I can see something suspicious in the traces.
>
> There's very little there.  It prints the two lines
>
>   xd_add_watch: fd 8
>   xd_add_watch: fd 9
>
> and no more.  Does this tell you anything?

It's the initialization phase. Two watch functions are installed on file
descriptors 8 and 9 (connected to the system and session buses), polling
for incoming messages in Emacs' mainloop.

When you call dbus-get-unique-name, there shall be more output. But this
works, as you have confirmed, so this is not the interesting case.

I've hoped to see more :-( Did you play with the running/non-running
system bus?

Anyway, I need to debug when I'm back.

> Ken

Best regards, Michael.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019