pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/creatifcoding/mega/commit/1383efe01d0ee8ba3ea8da5ab41b07f5672191bf

rossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has started · creatifcoding/mega@1383efe · GitHub
Skip to content

Commit 1383efe

Browse files
committed
Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has started
* doc/misc/dbus.texi (Alternative Buses): Explain using $DBUS_SESSION_BUS_ADDRESS after Emacs has started. * src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Use egetenv.
1 parent bdb0bc2 commit 1383efe

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

doc/misc/dbus.texi

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,8 +1847,24 @@ This function establishes the connection to D-Bus @var{bus}.
18471847
corresponding bus. For the system and session buses, this function is
18481848
called when loading @file{dbus.el}, there is no need to call it again.
18491849

1850-
The function returns the number of connections this Emacs session has
1851-
established to the @var{bus} under the same unique name
1850+
If Emacs was invoked when there was no D-Bus session bus available
1851+
yet, you can set the environment variable
1852+
@env{DBUS_SESSION_BUS_ADDRESS} once the session bus daemon is running
1853+
and offering the address. Calling @code{dbus-init-bus} initializes
1854+
the connection to the session bus.
1855+
1856+
@lisp
1857+
(setenv "DBUS_SESSION_BUS_ADDRESS" "unix:path=/run/user/1000/bus")
1858+
1859+
@result{} "unix:path=/run/user/1000/bus"
1860+
1861+
(dbus-init-bus :session)
1862+
1863+
@result{} 2
1864+
@end lisp
1865+
1866+
@code{dbus-init-bus} returns the number of connections this Emacs
1867+
session has established to the @var{bus} under the same unique name
18521868
(@pxref{dbus-get-unique-name}). It depends on the libraries Emacs is
18531869
linked with, and on the environment Emacs is running. For example, if
18541870
Emacs is linked with the GTK+ toolkit, and it runs in a GTK+-aware

src/dbusbind.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ XD_OBJECT_TO_STRING (Lisp_Object object)
276276

277277
#define XD_DBUS_VALIDATE_BUS_ADDRESS(bus) \
278278
do { \
279-
char const *session_bus_address = getenv ("DBUS_SESSION_BUS_ADDRESS"); \
279+
char const *session_bus_address = egetenv ("DBUS_SESSION_BUS_ADDRESS"); \
280280
if (STRINGP (bus)) \
281281
{ \
282282
DBusAddressEntry **entries; \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy