r6452 - in trunk/BOOK: general/sysutils gnome/add introduction/welcome

Dan Nicholson dbn.lists at gmail.com
Mon Jan 22 07:03:23 PST 2007

On 1/21/07, Randy McMurchy <randy at linuxfromscratch.org> wrote:
> What about
> if test -f /etc/dbus-1/session-local.conf; then only add the line
> else create a new file with the right stuff
> fi

It's still kind of tricky because you're dealing with XML markup, so
it's not like the already existing case you just append one line.
Here's the best I could come up with. Gmail is going to screw this up
inlining, but hopefully you'll get the jist of it.


Index: gnome/add/epiphany.xml
--- gnome/add/epiphany.xml	(revision 6454)
+++ gnome/add/epiphany.xml	(working copy)
@@ -108,8 +108,26 @@
     <systemitem class="username">root</systemitem> user you should add the
     <filename class='directory'>$GNOME_PREFIX/share/dbus-1/services</filename>
     directory to the local session configuration as described in the
-    <xref linkend="dbus"/> configuration section.</para>
+    <xref linkend="dbus"/> configuration section:</para>

+<screen role="root"><userinput>if [ -f /etc/dbus-1/session-local.conf ]; then
+    sed -i "\%</busconfig>%{
+        i\    <servicedir>$GNOME_PREFIX/share/dbus-1/services</servicedir>
+    }" /etc/dbus-1/session-local.conf
+    cat > /etc/dbus-1/session-local.conf << EOF
+<literal><!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+  <!-- Search for .service files in $GNOME_PREFIX -->
+  <servicedir>$GNOME_PREFIX/share/dbus-1/services</servicedir>
     <para>If you have <application>GNOME-Python</application> installed, the
     <application>Epiphany</application> <application>Python</application>
     extension is automatically built. If your $GNOME_PREFIX is anything but

More information about the blfs-book mailing list