[PATCH] startkde and dbus-launch

Jos van den Oever jvdoever at gmail.com
Sun Dec 27 21:16:33 GMT 2009


2009/12/27 Allen Winter <winter at kde.org>:
> Here's a patch worked up by Thiago and myself for doing DBus autolaunch if
> the DBUS_SESSION_BUS_ADDRESS environment variable is unset.
>
> Seems to be working fine for me.
>
> Please review so we can get this into 4.4.
> -Allen
>
> Index: startkde.cmake
> ===================================================================
> --- startkde.cmake      (revision 1065636)
> +++ startkde.cmake      (working copy)
> @@ -337,7 +337,8 @@ if test -z "$XDG_DATA_DIRS"; then
>  fi
>  # D-Bus autolaunch is broken
>  if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
> -    eval `dbus-launch --sh-syntax --exit-with-session`
> +    uuid="`dbus-uuidgen --get`"
> +    eval `dbus-launch --sh-syntax --exit-with-session --autolaunch $uuid`
>  fi
>  if qdbus >/dev/null 2>/dev/null; then
>     : # ok

You can at least remove the comment about autolaunch being broken,
since it is not broken. The problem is that when the dbus daemon is
not yet running (DBUS_SESSION_BUS_ADDRESS not set), each app trying to
talk to the daemon will start a new daemon. The current startkde.cmake
aready handles this. I do not see how this patch improves this
behavior. 'man dbus-launch' says about --autolaunch "This option is
for the exclusive use of libdbus, you do not want to  use  it
manually. It may change in the future." Also, what is the role of the
MACHINEID? The man page does not explain it and since you set it, you
might know. Shouldn't the line be:
  eval `dbus-launch --sh-syntax --exit-with-session --autolaunch=$uuid`
(note the =).

Cheers,
Jos


The old version of the script fixed this and the new version prettifies this




More information about the kde-core-devel mailing list