yavdr-ansible/roles/yavdr-desktop/templates/openbox/autostart.j2
Alexander Grothe de699b12b1 Add udiskie to yavdr-desktop role
this is used to mount external data devices automatically

Add yavdr-i18n to the default packages,
so translations using the transale filter will work properly
2019-05-15 16:33:36 +02:00

32 lines
1.1 KiB
Django/Jinja
Executable File

#!/bin/bash
# forward environment variables to an environment file and the systemd user session
env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR" > ~/.session-env
systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
feh --bg-center "/usr/share/yavdr/images/yavdr_logo.png"
enabled_services=(
"tmux.service" "detect-second-display.service"
"openbox-second.service" "osd2web.service"
"yavdr-frontend.service" "pulseaudio.socket"
"pulseaudio.service" "wm-exit.service" "irexec.service")
disabled_services=()
# enable configured services for the user session
for service in "${enabled_services[@]}"; do
systemctl --user enable "$service"
done
# disable unwanted services for the user session
for service in "${disabled_services[@]}"; do
systemctl --user disable "$service"
done
if which dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR
fi
# start systemd units for the yavdr user session
systemctl --user isolate yavdr-desktop.target
udiskie &