From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: dbus: "(setenv ...)" not the same as "export ...=..." Date: Sun, 30 Oct 2011 09:51:55 +0100 Message-ID: <87d3deq2tw.fsf@gmx.de> References: <87wrbnz7le.fsf@micropit.couberia.bzh> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1319964733 13236 80.91.229.12 (30 Oct 2011 08:52:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 30 Oct 2011 08:52:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 30 09:52:09 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RKR7g-0004Jn-HH for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Oct 2011 09:52:08 +0100 Original-Received: from localhost ([::1]:45532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKR7f-0000Zc-Re for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Oct 2011 04:52:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKR7b-0000ZX-Hj for help-gnu-emacs@gnu.org; Sun, 30 Oct 2011 04:52:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKR7a-0002RX-Bp for help-gnu-emacs@gnu.org; Sun, 30 Oct 2011 04:52:03 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:32918) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RKR7a-0002R3-0a for help-gnu-emacs@gnu.org; Sun, 30 Oct 2011 04:52:02 -0400 Original-Received: (qmail invoked by alias); 30 Oct 2011 08:51:58 -0000 Original-Received: from p57BB846F.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.132.111] by mail.gmx.net (mp023) with SMTP; 30 Oct 2011 09:51:58 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+4vSZDZWC4Rc2zZBqWc01te/6PdxPd9dtviA1bID zIqNHASlAnHK4j In-Reply-To: <87wrbnz7le.fsf@micropit.couberia.bzh> ("Peter \=\?utf-8\?Q\?M\?\= \=\?utf-8\?Q\?\=C3\=BCnster\=22's\?\= message of "Sun, 30 Oct 2011 01:44:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82718 Archived-At: pmlists@free.fr (Peter M=C3=BCnster) writes: > Hello, Hi, > Emacs is the only program, that requires the DBUS_SESSION_BUS_ADDRESS > environment variable, Nope. $DBUS_SESSION_BUS_ADDRESS is used to identify the respective D-Bus session bus, for any application connecting to D-Bus. Other applications might start the session bus if they don't find it. In Emacs we have discarded this feature, see =20 for the reasoning. > so instead of setting it in the global environment, > I prefer to set it in my .emacs file: > > (when window-system > (unless (getenv "DBUS_SESSION_BUS_ADDRESS") > (setenv "DBUS_SESSION_BUS_ADDRESS" "autolaunch:")) > (require 'notifications)) > > But it does not work: D-Bus error: "No connection to bus", :session > > The workaround is to start emacs like this: > DBUS_SESSION_BUS_ADDRESS=3Dautolaunch: emacs > > Could anybody explain, why emacs needs the DBUS_SESSION_BUS_ADDRESS (or > why other programs don't need it), and why setting it with (setenv ...) > does not work? I do not see the use case for starting the D-Bus session bus from inside Emacs. In this case, you could only communicate with D-Bus-aware applications which have been started from inside Emacs as well, other applications won't see your session bus. > TIA for any hints! > P.S.: I don't know, where the dbus is started on my system, the parent > PID is 1. Perhaps from xinit or fvwm, how can I know? Best regards, Michael. PS: I'm not able to respond for the next days, we're just starting to go to the Baltic sea for some relaxed days. Being back next Sunday.