[systemd-devel] [PATCH v2] units: user at .service: fix user bus path
Lennart Poettering
lennart at poettering.net
Fri Dec 27 09:02:37 PST 2013
On Fri, 27.12.13 17:10, Mantas Mikulėnas (grawity at gmail.com) wrote:
The service file needs to be turned into an m4 template first I
figure. i.e. replaced by user at .service.m4.in...
Note that this in a way is a bit of an anachronism... In the long run
everybody should just connect to the right address without needing an
environment variable (except maybe XDG_RUNTIME_DIR as single entry
point). However, I figure for the time being we will have to set this
variable unconditionally, since libdbus won't find the bus
otherwise. (And thinking about it I figure we might want to set it from
pam_systemd, too, so that normal sessions get it too).
> ---
> units/user at .service.in | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/units/user at .service.in b/units/user at .service.in
> index 3f8b59d..7b7d52b 100644
> --- a/units/user at .service.in
> +++ b/units/user at .service.in
> @@ -14,5 +14,9 @@ User=%I
> PAMName=systemd-user
> Type=notify
> ExecStart=- at rootlibexecdir@/systemd --user
> -Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket
> +m4_ifdef(`ENABLE_KDBUS',
> +Environment=DBUS_SESSION_BUS_ADDRESS=kernel:path=/dev/kdbus/%I-user/bus;unix:path=/run/user/%I/bus
> +,m4_dnl
> +Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/bus
> +)m4_dnl
> Slice=user-%i.slice
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list