unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* dbus: "(setenv ...)" not the same as "export ...=..."
@ 2011-10-29 23:44 Peter Münster
  2011-10-30  8:51 ` Michael Albinus
  2011-11-02  4:56 ` Kevin Rodgers
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Münster @ 2011-10-29 23:44 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-07 10:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 23:44 dbus: "(setenv ...)" not the same as "export ...=..." Peter Münster
2011-10-30  8:51 ` Michael Albinus
2011-10-30 15:08   ` Peter Münster
2011-11-07 10:07     ` Michael Albinus
2011-11-02  4:56 ` Kevin Rodgers
2011-11-02 21:54   ` Peter Münster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).