-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
52 lines (43 loc) · 1.5 KB
/
Copy pathsetup.sh
File metadata and controls
52 lines (43 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# GamerX Internal Setup Script (Runs inside Chroot)
# 1. Initialize Pacman & Keys
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Sy --noconfirm
# 2. Install Packages
echo "[*] Installing Packages..."
PACKAGES=(
base-devel git wget curl nano sudo
net-tools dnsutils iproute2
xfce4 xfce4-terminal tigervnc xorg-xauth xorg-xhost
python python-numpy ttf-dejavu
xorg-server-xvfb xorg-xinit
)
pacman -S --noconfirm "${PACKAGES[@]}"
# 3. Setup Helper: noVNC
echo "[*] Setting up noVNC..."
git clone https://github.com/novnc/noVNC.git /usr/share/novnc
git clone https://github.com/novnc/websockify /usr/share/novnc/utils/websockify
ln -sf /usr/share/novnc/utils/novnc_proxy /usr/bin/novnc_server
# 4. Setup Helper: Cloudflared
echo "[*] Installing Cloudflared..."
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64 -O /usr/bin/cloudflared
chmod +x /usr/bin/cloudflared
# 5. User Configuration
echo "[*] Configuring Users..."
# Add 'gamerx' user if not exists
if ! id "gamerx" &>/dev/null; then
useradd -m -G wheel,users,video,storage,network -s /bin/bash gamerx
fi
# Set Passwords
echo "gamerx:gamerx" | chpasswd
echo "root:toor" | chpasswd
# Sudo rights
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
# 6. Permissions (Fix up copied overlay files)
chown -R gamerx:gamerx /home/gamerx
chmod +x /home/gamerx/.vnc/xstartup
# 7. Cleanup
rm /usr/bin/qemu-aarch64-static 2>/dev/null
pcman -Sc --noconfirm
echo "[*] GamerX Internal Setup Complete!"