Last active
June 9, 2024 11:53
-
-
Save GamePlayer-8/eef3509f14272299488228ba55ca6661 to your computer and use it in GitHub Desktop.
Electron setup environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories | |
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.20/main' >> /etc/apk/repositories | |
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.20/community' >> /etc/apk/repositories | |
apk update | |
apk upgrade | |
apk add shadow alpine-conf sudo | |
useradd electron | |
echo "electron:electron" | chpasswd | |
usermod -aG video electron | |
usermod -aG audio electron | |
usermod -aG tty electron | |
groupadd privileged | |
usermod -aG privileged electron | |
echo '%privileged ALL=(ALL:ALL) ALL' >> /etc/sudoers | |
mkdir /home/electron | |
chown -R electron:electron /home/electron | |
setup-wayland-base | |
setup-xorg-base | |
apk add linux-headers | |
apk add code-oss plasma sddm elogind plasma-wayland-protocols | |
echo 'ELECTRON_OZONE_PLATFORM_HINT="wayland"' >> /etc/environment | |
rc-update add sddm default | |
rc-update add elogind default | |
rc-service elogind restart | |
rc-service sddm restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment