main
sh 94 lines 2.3 KB
Raw
1 #!/bin/bash
2 set -e
3
4 # install playwright - moved to install A0
5 # bash /ins/install_playwright.sh "$@"
6
7 # searxng - moved to base image
8 # bash /ins/install_searxng.sh "$@"
9
10 if ! command -v apt-get >/dev/null 2>&1; then
11 echo "apt-get unavailable; skipping LibreOffice install"
12 exit 0
13 fi
14
15 KALI_SUITE="kali-last-snapshot"
16 LIBREOFFICE_VERSION="4:26.2.4.2-1"
17 XPRA_VERSION="6.5.2-r0-1"
18 arch="$(dpkg --print-architecture)"
19
20 XPRA_HTML5_VERSION="19-r1-1"
21 if [ "$arch" = "arm64" ]; then
22 XPRA_HTML5_VERSION="21-r1-1"
23 fi
24
25 LIBREOFFICE_PACKAGES=(
26 "libreoffice-core=$LIBREOFFICE_VERSION"
27 "libreoffice-writer=$LIBREOFFICE_VERSION"
28 "libreoffice-calc=$LIBREOFFICE_VERSION"
29 "libreoffice-impress=$LIBREOFFICE_VERSION"
30 "libreoffice-gtk3=$LIBREOFFICE_VERSION"
31 "python3-uno=$LIBREOFFICE_VERSION"
32 )
33 XPRA_PACKAGES=(
34 "xpra-common=$XPRA_VERSION"
35 "xpra-server=$XPRA_VERSION"
36 "xpra-client=$XPRA_VERSION"
37 "xpra-client-gtk3=$XPRA_VERSION"
38 "xpra-x11=$XPRA_VERSION"
39 "xpra-html5=$XPRA_HTML5_VERSION"
40 )
41
42 apt-get update
43 ATK_VERSION="$(dpkg-query -W -f='${Version}' libatk1.0-0t64)"
44 ATK_GIR_PACKAGE="/tmp/gir1.2-atk-1.0_${ATK_VERSION}_${arch}.deb"
45 (cd /tmp && apt-get download "gir1.2-atk-1.0=$ATK_VERSION")
46
47 for source in /etc/apt/sources.list /etc/apt/sources.list.d/kali.sources; do
48 [ ! -f "$source" ] || sed -i "s/kali-rolling/$KALI_SUITE/g" "$source"
49 done
50
51 apt-get update
52 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget
53 wget -O /usr/share/keyrings/xpra.asc https://xpra.org/xpra.asc
54 cat >/etc/apt/sources.list.d/xpra.sources <<EOF
55 Types: deb
56 URIs: https://xpra.org
57 Suites: trixie
58 Components: main
59 Signed-By: /usr/share/keyrings/xpra.asc
60 Architectures: $arch
61 EOF
62 apt-get update
63 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
64 "$ATK_GIR_PACKAGE" \
65 gir1.2-gtk-3.0 \
66 "${LIBREOFFICE_PACKAGES[@]}" \
67 "${XPRA_PACKAGES[@]}" \
68 xfce4-session \
69 xfwm4 \
70 xfce4-panel \
71 xfdesktop4 \
72 xfce4-settings \
73 thunar \
74 gvfs \
75 libglib2.0-bin \
76 xfce4-terminal \
77 x11-xserver-utils \
78 x11-utils \
79 x11-apps \
80 xdotool \
81 xclip \
82 xauth \
83 xvfb \
84 dbus-x11 \
85 fonts-dejavu \
86 fonts-liberation \
87 fonts-crosextra-caladea \
88 fonts-crosextra-carlito \
89 fonts-noto-core \
90 fonts-noto-cjk \
91 fonts-noto-color-emoji
92
93 rm -f "$ATK_GIR_PACKAGE"
94 rm -rf /var/lib/apt/lists/*