[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dbus: "(setenv ...)" not the same as "export ...=..."
From: |
Michael Albinus |
Subject: |
Re: dbus: "(setenv ...)" not the same as "export ...=..." |
Date: |
Sun, 30 Oct 2011 09:51:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
pmlists@free.fr (Peter Münster) 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 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6579>
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=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?
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.