Skip to content

Commit

Permalink
scripts: setup-X11: create Xwrapper.config if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuf committed May 23, 2023
1 parent 1f838ec commit c22aba2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/setup-X11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@ set -xe
USER=screen

## 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}

## Install Packages
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
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
cat <<EOF > /etc/systemd/system/xinit.service
Expand Down

0 comments on commit c22aba2

Please sign in to comment.