shell-host/session/dm.inst

29 lines
765 B
Bash
Executable File

#!/bin/bash
sdir="$(dirname $(realpath "${BASH_SOURCE:-$0}"))"
_dm=$(basename $(grep 'ExecStart=' /etc/systemd/system/display-manager.service))
echo Current Display Manager on this system is: $_dm
case $_dm in
lightdm)
if [[ -d /etc/lightdm ]]; then
echo adding startup/cleanup configuration
if sudo mkdir /etc/lightdm/lightdm.conf.d &> /dev/null; then
sudo cp $sdir/lightdm/lightdm.conf.d/* /etc/lightdm/lightdm.conf.d/
ls -la /etc/lightdm/lightdm.conf.d
else
echo could not make directory $sdir/lightdm/lightdm.conf.d
fi
else
echo lightdm configuration directory /etc/lightdm does not exist
echo unable to install user setup/cleanup scripts
fi
;;
*)
echo unknown display manager $_dm
;;
esac