You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ublinux-init/ublinux/rc.xorg/00-envvars

21 lines
589 B

#!/usr/bin/env bash
#
# Author: Dmitry Razumov <asmeron@ublinux.com>
# Copyright (c) 2021-2025 UBLinux <support@ublinux.com>
#
# Used as a source
ENABLED=yes
[[ ${ENABLED} == "yes" ]] || { return 0 2>/dev/null && return 0 || exit 0; }
if [[ $(readlink -fq /usr/bin/init 2>/dev/null) =~ "lib/systemd/systemd"$ ]]; then
set -a
eval "$(systemctl --user show-environment)"
set +a
systemctl --user import-environment DISPLAY XAUTHORITY
fi
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi