2018-03-27 18:18:49 +01:00
|
|
|
#!@bash@/bin/bash
|
|
|
|
export JAVA_HOME="${JAVA_HOME:-@jdk@}"
|
2018-05-02 21:46:01 +01:00
|
|
|
#export SAL_USE_VCLPLUGIN="${SAL_USE_VCLPLUGIN:-gen}"
|
2018-03-27 18:18:49 +01:00
|
|
|
|
|
|
|
if uname | grep Linux > /dev/null &&
|
2018-04-15 07:33:10 +01:00
|
|
|
! ( test -n "$DBUS_SESSION_BUS_ADDRESS" ); then
|
2018-03-27 18:18:49 +01:00
|
|
|
dbus_tmp_dir="/run/user/$(id -u)/libreoffice-dbus"
|
|
|
|
mkdir "$dbus_tmp_dir"
|
|
|
|
dbus_socket_dir="$(mktemp -d -p "$dbus_tmp_dir")"
|
2018-05-02 21:46:01 +01:00
|
|
|
"@dbus@"/bin/dbus-daemon --nopidfile --nofork --config-file "@dbus@"/share/dbus-1/session.conf --address "unix:path=$dbus_socket_dir/session" &> /dev/null &
|
2018-04-15 07:33:10 +01:00
|
|
|
export DBUS_SESSION_BUS_ADDRESS="unix:path=$dbus_socket_dir/session"
|
2018-03-27 18:18:49 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
"@libreoffice@/bin/$(basename "$0")" "$@"
|
|
|
|
code="$?"
|
|
|
|
|
|
|
|
test -n "$dbus_socket_dir" && rm -rf "$dbus_socket_dir"
|
|
|
|
exit "$code"
|