From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Newsgroups: gmane.emacs.help Subject: dbus: "(setenv ...)" not the same as "export ...=..." Date: Sun, 30 Oct 2011 01:44:13 +0200 Message-ID: <87wrbnz7le.fsf@micropit.couberia.bzh> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319931881 21224 80.91.229.12 (29 Oct 2011 23:44:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2011 23:44:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 30 01:44:35 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 1RKIZm-0004wn-Mj for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Oct 2011 01:44:34 +0200 Original-Received: from localhost ([::1]:54732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKIZm-00042y-3K for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Oct 2011 19:44:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKIZh-00042t-II for help-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:44:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKIZg-00070k-CQ for help-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:44:29 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:42543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKIZg-00070g-2i for help-gnu-emacs@gnu.org; Sat, 29 Oct 2011 19:44:28 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RKIZd-0004ve-ST for help-gnu-emacs@gnu.org; Sun, 30 Oct 2011 01:44:25 +0200 Original-Received: from arennes-359-1-206-2.w2-2.abo.wanadoo.fr ([2.2.69.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Oct 2011 01:44:25 +0200 Original-Received: from pmlists by arennes-359-1-206-2.w2-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Oct 2011 01:44:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: arennes-359-1-206-2.w2-2.abo.wanadoo.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:bM8ya4pV4xy9l8by+/LiyjBlb1g= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:82717 Archived-At: Hello, Emacs is the only program, that requires the DBUS_SESSION_BUS_ADDRESS environment variable, so instead of setting it in the global environment, I prefer to set it in my .emacs file: --8<---------------cut here---------------start------------->8--- (when window-system (unless (getenv "DBUS_SESSION_BUS_ADDRESS") (setenv "DBUS_SESSION_BUS_ADDRESS" "autolaunch:")) (require 'notifications)) --8<---------------cut here---------------end--------------->8--- 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=autolaunch: 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? 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? -- Peter