scripts: setup-X11: create Xwrapper.config if it does not exist

This commit is contained in:
Markus Küffner
2023-05-23 19:09:45 +02:00
parent 1f838ecb17
commit c22aba229d

View File

@@ -10,15 +10,22 @@ set -xe
USER=screen USER=screen
## Create User ## Create User
adduser --system --disabled-password --no-create-home --shell /bin/bash ${USER} adduser --system --disabled-password --shell /bin/bash ${USER}
usermod -a -G tty ${USER} usermod -a -G tty ${USER}
## Install Packages ## Install Packages
apt update apt update
apt install -y feh xterm xinit xinput xserver-xorg x11-xserver-utils xserver-xorg-video-fbdev apt install -y feh xterm xinit xinput xserver-xorg xserver-xorg-legacy x11-xserver-utils xserver-xorg-video-fbdev
## Allow any User to start X ## Allow any User to start X
sed -i 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config || true if [ -f /etc/X11/Xwrapper.config ]; then
sed -i 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config
else
cat <<EOF > /etc/X11/Xwrapper.config
needs_root_rights=yes
allowed_users=anybody
EOF
fi
## Create the xinit systemd service ## Create the xinit systemd service
cat <<EOF > /etc/systemd/system/xinit.service cat <<EOF > /etc/systemd/system/xinit.service