libreoffice: wrapper: fallback to /tmp if /run is not usable
This commit is contained in:
parent
239f5e8376
commit
b8ed97001e
1 changed files with 7 additions and 1 deletions
|
@ -5,7 +5,13 @@ export JAVA_HOME="${JAVA_HOME:-@jdk@}"
|
|||
if uname | grep Linux > /dev/null &&
|
||||
! ( test -n "$DBUS_SESSION_BUS_ADDRESS" ); then
|
||||
dbus_tmp_dir="/run/user/$(id -u)/libreoffice-dbus"
|
||||
mkdir "$dbus_tmp_dir"
|
||||
if ! test -d "$dbus_tmp_dir" && test -d "/run"; then
|
||||
mkdir -p "$dbus_tmp_dir"
|
||||
fi
|
||||
if ! test -d "$dbus_tmp_dir"; then
|
||||
dbus_tmp_dir="/tmp/libreoffice-$(id -u)/libreoffice-dbus"
|
||||
mkdir -p "$dbus_tmp_dir"
|
||||
fi
|
||||
dbus_socket_dir="$(mktemp -d -p "$dbus_tmp_dir")"
|
||||
"@dbus@"/bin/dbus-daemon --nopidfile --nofork --config-file "@dbus@"/share/dbus-1/session.conf --address "unix:path=$dbus_socket_dir/session" &> /dev/null &
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=$dbus_socket_dir/session"
|
||||
|
|
Loading…
Reference in a new issue