-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-de
executable file
·83 lines (74 loc) · 2.81 KB
/
install-de
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# Debian Bookworm (ARM) (Pi5)
# This script may or may not work "use at own risk"
# Execute: install-de (Xfce4)
DOWNLOAD="aria2c -c --download-result=hide --console-log-level=error --disable-ipv6=true --summary-interval=0 --show-files=false"
DE="xfce4 xinit thunar mousepad gvfs-backends gvfs-fuse gnome-screensaver feh wget mpv \
xfce4-terminal avahi-utils pulseaudio blueman xfce4-goodies file-roller gimp \
fbi alacarte chromium lightdm-gtk-greeter lightdm x11-xserver-utils xserver-xorg"
MESADEV="llvm-dev ninja-build meson libvdpau-dev libxvmc-dev libva-dev libomxil-bellagio-dev python3-mako \
libdrm-nouveau2 libdrm-dev wayland-protocols libwayland-egl-backend-dev libunwind-dev libxdamage-dev \
libxcb-glx0-dev libxcb-shm0-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-present-dev \
libxshmfence-dev libxxf86vm-dev libxrandr-dev valgrind"
MESA_VERSION="23.3"
M_REV="6"
# internet check
if [[ `command -v curl` ]]; then
:;
else
echo -e "Missing dependency: curl"
exit 1
fi
if [[ `curl -I https://github.com 2>&1 | grep 'HTTP/2 200'` ]]; then
:;
else
echo -e "Script requires an internet connection."
exit 1
fi
# check for aria2
if [ `command -v aria2c` ]; then :; else sudo apt install -y aria2; fi
# mesa install function
mesa_install (){
echo ""
echo "Installing Mesa ${MESA_VERSION}"
sudo apt install -y ${MESADEV}
cd ~
mkdir -p mesa; cd mesa
${DOWNLOAD} https://gitlab.freedesktop.org/mesa/mesa/-/archive/${MESA_VERSION}/mesa-${MESA_VERSION}.${M_REV}.tar.gz
tar xf mesa-${MESA_VERSION}*.tar.gz
rm -f mesa-${MESA_VERSION}*.tar.gz
mv -f mesa-${MESA_VERSION}* mesa-${MESA_VERSION}.${M_REV}
mkdir -p mesa-${MESA_VERSION}.${M_REV}/build
cd mesa-${MESA_VERSION}.${M_REV}/build
export CFLAGS="-mcpu=cortex-a76"
export CXXFLAGS="-mcpu=cortex-a76"
sudo meson --prefix /usr -Dglx=disabled -Dplatforms=auto -Dllvm=disabled -Dvulkan-drivers=broadcom -Dgallium-drivers=kmsro,v3d,vc4 -Dbuildtype=release ..
sudo ninja install
cd ~
sudo rm -fdr mesa
sudo apt purge -y --autoremove ninja-build meson
sudo chown -R $USER:$USER /home/$USER
echo "Done."
}
# run script
sudo apt update
sudo apt upgrade -y
sudo apt install -y ${DE}
sudo apt purge -y light-locker
sudo mkdir -p /usr/local/bin
sudo wget -cq https://raw.githubusercontent.com/pyavitz/scripts/master/sleep-locker -P /usr/local/bin
if [[ -f "/usr/local/bin/sleep-locker" ]]; then
sudo chmod +x /usr/local/bin/sleep-locker
sudo chown root:root /usr/local/bin/sleep-locker
fi
sudo chown -R $USER:$USER /home/$USER
sudo adduser $USER lightdm
sudo usermod -a -G render $USER
if [[ -f "/etc/lightdm/lightdm.conf" ]]; then
sudo sed -i "s/#autologin-user=/autologin-user=$USER/g" /etc/lightdm/lightdm.conf
fi
mkdir -p ~/.local/share/applications
echo "NoDisplay=true" | tee ~/.local/share/applications/xfburn.desktop > /dev/null 2>&1
mesa_install
echo -e "You may now reboot ..."
exit 0