[jhbuild/wip/benzea/systemd-user-session] examples: Add code to enable systemd user units from jhbuild



commit c99ab867f25eb04567a7e9f5264147e02393097d
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Apr 23 11:48:58 2019 +0200

    examples: Add code to enable systemd user units from jhbuild
    
    When switching to start GNOME using systemd we need to pick up the user
    defined units from inside the jhbuild environment. Do so by copying them
    into the users runtime directory and updating the presets.

 examples/jhbuild-session | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/examples/jhbuild-session b/examples/jhbuild-session
index 11c0f27c..4ab3615d 100755
--- a/examples/jhbuild-session
+++ b/examples/jhbuild-session
@@ -11,6 +11,12 @@ XDG_CONFIG_DIRS=${GNOME}/etc/xdg
 
 export PATH LD_LIBRARY_PATH PYTHONPATH PKG_CONFIG_PATH GDK_USE_XFT XDG_DATA_DIRS XDG_CONFIG_DIRS
 
+# Pick up systemd units defined in jhbuild
+mkdir -p "$XDG_RUNTIME_DIR/systemd/user.control"
+/bin/cp ${GNOME}/lib/systemd/user/* "$XDG_RUNTIME_DIR/systemd/user.control"
+systemctl --user daemon-reload
+systemctl --user preset-all
+
 #exec valgrind --tool=memcheck --log-file=/tmp/session-grind.log ${GNOME}/bin/gnome-session
 exec ${GNOME}/bin/gnome-session --debug
 


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