help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dbus: "(setenv ...)" not the same as "export ...=..."


From: Peter Münster
Subject: dbus: "(setenv ...)" not the same as "export ...=..."
Date: Sun, 30 Oct 2011 01:44:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]