summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-11 15:47:53 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-24 11:15:52 +0000
commit2a6cefbc3bd3ed9392603da6a76b49c0dcba7e0d (patch)
treedf99c280c45338a93752ba68c8cf90d3126e823a /cmake
parent263aca37ecf5f977f68d87b54f2fb30584725781 (diff)
downloaddbus-2a6cefbc3bd3ed9392603da6a76b49c0dcba7e0d.tar.gz
Add dbus-update-activation-environment tool
If OS builders (distributions) have chosen to use the per-user bus, this provides two possible modes of operation for compatibility with existing X session startup hooks. A legacy-free system can just upload DISPLAY, XAUTHORITY and possibly DBUS_SESSION_BUS_ADDRESS into dbus-daemon's and systemd's activation environments, similar to http://cgit.freedesktop.org/systemd/systemd/tree/xorg/50-systemd-user.sh installed by systemd (but unlike systemctl, dbus-update-activation-environment works for traditional D-Bus-activated services, not just for systemd services). A system where compatibility is required for environment variables exported by snippets in /etc/X11/xinit/xinitrc.d (in Red Hat derivatives, Gentoo, etc.) or /etc/X11/Xsession.d (Debian derivatives) can upload the entire environment of the X session, minus some selected environment variables which are specific to a login session (notably XDG_SESSION_ID). In Debian, I plan to put the former in a new dbus-user-session package that enables a user-session-centric mode of operation for D-Bus, and the latter in the existing dbus-x11 package, with the intention that dbus-x11 eventually becomes a tool for change-averse setups or goes away entirely. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/doc/CMakeLists.txt3
-rw-r--r--cmake/tools/CMakeLists.txt10
2 files changed, 13 insertions, 0 deletions
diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt
index 2bb720bd..f21e84e7 100644
--- a/cmake/doc/CMakeLists.txt
+++ b/cmake/doc/CMakeLists.txt
@@ -138,6 +138,7 @@ configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-launch.1.xml.in ${CMAKE_BINARY_DI
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-monitor.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-send.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-test-tool.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-test-tool.1.xml)
+configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-update-activation-environment.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-update-activation-environment.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-uuidgen.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml html-nochunks)
@@ -146,6 +147,7 @@ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-test-tool.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml html-nochunks)
+DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-update-activation-environment.1.xml html-nochunks)
if (UNIX)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml man)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml man)
@@ -154,6 +156,7 @@ if (UNIX)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml man)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml man)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml man)
+ DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-update-activation-environment.1.xml man)
endif()
#
# handle html index file
diff --git a/cmake/tools/CMakeLists.txt b/cmake/tools/CMakeLists.txt
index 525dc057..fd0617d1 100644
--- a/cmake/tools/CMakeLists.txt
+++ b/cmake/tools/CMakeLists.txt
@@ -25,6 +25,12 @@ set (dbus_test_tool_SOURCES
../../tools/test-tool.h
)
+set (dbus_update_activation_environment_SOURCES
+ ../../tools/dbus-update-activation-environment.c
+ ../../tools/tool-common.c
+ ../../tools/tool-common.h
+)
+
if (WIN32)
set (dbus_launch_SOURCES
../../tools/dbus-launch-win.c
@@ -54,6 +60,10 @@ add_executable(dbus-test-tool ${dbus_test_tool_SOURCES})
target_link_libraries(dbus-test-tool ${DBUS_LIBRARIES})
install_targets(/bin dbus-test-tool )
+add_executable(dbus-update-activation-environment ${dbus_update_activation_environment_SOURCES})
+target_link_libraries(dbus-update-activation-environment ${DBUS_LIBRARIES})
+install_targets(/bin dbus-update-activation-environment )
+
add_executable(dbus-launch ${dbus_launch_SOURCES})
target_link_libraries(dbus-launch )
if (DBUS_BUILD_X11)