diff --git a/SOFTWARE/A64-TERES/scripts/platform-scripts/install_desktop.sh b/SOFTWARE/A64-TERES/scripts/platform-scripts/install_desktop.sh index 19175b1e..5ef57c7a 100755 --- a/SOFTWARE/A64-TERES/scripts/platform-scripts/install_desktop.sh +++ b/SOFTWARE/A64-TERES/scripts/platform-scripts/install_desktop.sh @@ -1,17 +1,19 @@ #!/bin/bash - +# by @ayufan-pine64/linux-build +# https://github.com/ayufan-pine64/linux-build/blob/master/LICENSE.txt +# adopted hehopmajieh@debian.bg set -e DESKTOP="$1" if [ -z "$DESKTOP" ]; then - echo "Usage: $0 " + echo "Usage: $0 " exit 1 fi DISTRO="" if hash apt-get 2>/dev/null; then - DISTRO=debian + DISTRO=$(lsb_release -i -s) fi if [ -z "$DISTRO" ]; then @@ -27,36 +29,105 @@ fi # Default packages. PACKAGES=( xserver-xorg-video-fbturbo +# we are not ready for drm yet :) +# xserver-xorg-video-armsoc-sunxi +# libmali-sunxi-utgard0-r6p0 +# mesa-utils-extra +# glmark2-es2 libvdpau-sunxi1 vdpauinfo + mplayer + smplayer + smplayer-themes + smtube + chromium-browser ) +# Additional packages +PACKAGES+=( + xserver-xorg-input-all + xfonts-base + rxvt-unicode-lite + suckless-tools + network-manager + pulseaudio +) + +case $DISTRO in + Ubuntu) + PACKAGES+=( + chromium-browser + firefox + ) + ;; + + Debian) + PACKAGES+=( + chromium + chromium-widevine + ) + ;; + + *) + echo "Error: unsupported desktop environment $DESKTOP-$DISTRO" + exit 2 + ;; +esac + # Add packages based on desktop selection. -case $DESKTOP in - mate) +case $DESKTOP-$DISTRO in + mate-Ubuntu) PACKAGES+=( ubuntu-mate-core - ubuntu-mate-desktop - ubuntu-mate-lightdm-theme - ubuntu-mate-wallpapers-xenial - smplayer - mplayer lightdm ) ;; - i3|i3wm) + mate-Debian) + PACKAGES+=( + mate-desktop-environment + mate-desktop-environment-extras + desktop-base + lightdm + ) + ;; + + gnome-Ubuntu) + PACKAGES+=( + ubuntu-gnome-desktop + ubuntu-gnome-wallpapers-xenial + ) + ;; + + gnome-Debian) + PACKAGES+=( + gnome + desktop-base + ) + ;; + + i3-Ubuntu|i3-Debian) PACKAGES+=( - xserver-xorg-input-all - xfonts-base - slim - rxvt-unicode-lite i3 i3status i3lock - suckless-tools - network-manager - pulseaudio + slim + ) + ;; + + xfce4-Ubuntu|xfce4-Debian) + PACKAGES+=( + xfce4 + xfce4-goodies + lightdm + lightdm-gtk-greeter + ) + ;; + + lxde-Ubuntu|lxde-Debian) + PACKAGES+=( + lxde + lxdm ) ;; @@ -68,36 +139,7 @@ esac # Install. apt -y update -apt -y --no-install-recommends install ${PACKAGES[@]} - -# Configuration. - -mkdir -p /etc/X11/xorg.conf.d - -# Make X11 use fbturbo driver. -cat > "/etc/X11/xorg.conf.d/40-pine64-fbturbo.conf" < "/etc/X11/xorg.conf.d/50-pine64-pinebook-touchpad.conf" < "/etc/X11/Xsession.d/30pine64-vdpau-sunxi" < "/etc/chromium-browser/default" < "/etc/X11/xorg.conf.d/99-teres-disp.conf" < "/etc/X11/xorg.conf.d/20-teres-lcd.conf" < "/etc/X11/xorg.conf.d/30-teres-hdmi.conf" < "/etc/X11/Xsession.d/30teres-vdpau-sunxi" <