Merge remote-tracking branch 'origin/brice'
This commit is contained in:
commit
1a54f548f6
BIN
.install_apps.sh.kate-swp
Normal file
BIN
.install_apps.sh.kate-swp
Normal file
Binary file not shown.
@ -2,10 +2,10 @@
|
||||
// Contexte : user=visiteur / Nom du périphérique tel que configuré dans Configuration > Shared folders : GN-post_install-Trixie
|
||||
|
||||
mkdir /home/visiteur/share
|
||||
sudo mount -t vboxsf -o uid=0000,gid=1000 GN-post_install-Trixie /home/visiteur/share
|
||||
sudo mount -t vboxsf -o uid=0000,gid=1000 trixie-gn-postinstall /home/visiteur/share
|
||||
|
||||
# Montage automatique du dossier partagé au boot
|
||||
sudo su -c "echo 'GN-post_install-Trixie /home/visiteur/share vboxsf defaults 0 0' >> /etc/fstab"
|
||||
sudo su -c "echo 'trixie-gn-postinstall /home/visiteur/share vboxsf defaults 0 0' >> /etc/fstab"
|
||||
>> passer par un cron tab @reboot
|
||||
|
||||
|
||||
|
||||
@ -8,3 +8,5 @@ enabled_policies:
|
||||
- main
|
||||
- contrib
|
||||
- non-free
|
||||
google_chrome:
|
||||
license: true
|
||||
|
||||
10
files/keyboard
Normal file
10
files/keyboard
Normal file
@ -0,0 +1,10 @@
|
||||
# KEYBOARD CONFIGURATION FILE
|
||||
|
||||
# Consult the keyboard(5) manual page.
|
||||
|
||||
XKBMODEL="pc105"
|
||||
XKBLAYOUT="fr"
|
||||
XKBVARIANT="latin9"
|
||||
XKBOPTIONS=""
|
||||
|
||||
BACKSPACE="guess"
|
||||
105
firefox.sh
105
firefox.sh
@ -1,14 +1,113 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Vérifier la présence de firefox-esr, le désinstaler.
|
||||
## Installer firefox via les dépôts Mozilla.
|
||||
## Modifier en conséquence ci-dessous le chemin dans /usr/lib/
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
# ================================
|
||||
# Fonctions utilitaires
|
||||
# ================================
|
||||
echo_info() { echo -e "\e[1;34m[INFO]\e[0m $*"; }
|
||||
echo_warn() { echo -e "\e[1;33m[WARN]\e[0m $*"; }
|
||||
echo_err() { echo -e "\e[1;31m[ERROR]\e[0m $*"; }
|
||||
|
||||
# ================================
|
||||
# Étape 1 : Détection de Firefox ESR
|
||||
# ================================
|
||||
if dpkg -l | grep -qw firefox-esr; then
|
||||
echo_info "Firefox ESR est détecté."
|
||||
|
||||
# ================================
|
||||
# Étape 2 : Sauvegarde du profil utilisateur
|
||||
# ================================
|
||||
FIREFOX_DIR="${HOME}/.mozilla/firefox"
|
||||
BACKUP_DIR="${HOME}/firefox_esr_backup_$(date +%Y%m%d_%H%M%S)"
|
||||
|
||||
if [[ -d "$FIREFOX_DIR" ]]; then
|
||||
echo_info "Sauvegarde du profil Firefox ESR depuis : $FIREFOX_DIR"
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
cp -a "$FIREFOX_DIR" "$BACKUP_DIR/"
|
||||
echo_info "Profil sauvegardé dans : $BACKUP_DIR"
|
||||
else
|
||||
echo_warn "Aucun répertoire de profil Firefox trouvé dans $FIREFOX_DIR."
|
||||
fi
|
||||
|
||||
# ================================
|
||||
# Étape 3 : Suppression de Firefox ESR
|
||||
# ================================
|
||||
echo_info "Suppression de Firefox ESR..."
|
||||
sudo apt remove --purge -y firefox-esr
|
||||
#sudo apt autoremove -y
|
||||
else
|
||||
echo_info "Firefox ESR n’est pas installé — aucune sauvegarde ni suppression nécessaire."
|
||||
fi
|
||||
|
||||
# ================================
|
||||
# Étape 4 : Ajout du dépôt officiel Mozilla
|
||||
# ================================
|
||||
echo_info "Ajout du dépôt officiel Mozilla pour Firefox."
|
||||
|
||||
sudo install -d -m 0755 /etc/apt/keyrings
|
||||
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | \
|
||||
sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
|
||||
|
||||
DEB_CODENAME=$(lsb_release -cs)
|
||||
echo_info "Code-nom Debian détecté : ${DEB_CODENAME}"
|
||||
|
||||
if [[ "${DEB_CODENAME}" == "trixie" || "${DEB_CODENAME}" == "bookworm" ]]; then
|
||||
sudo tee /etc/apt/sources.list.d/mozilla.sources > /dev/null <<EOF
|
||||
Types: deb
|
||||
URIs: https://packages.mozilla.org/apt
|
||||
Suites: mozilla
|
||||
Components: main
|
||||
Signed-By: /etc/apt/keyrings/packages.mozilla.org.asc
|
||||
EOF
|
||||
else
|
||||
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | \
|
||||
sudo tee /etc/apt/sources.list.d/mozilla.list > /dev/null
|
||||
fi
|
||||
|
||||
sudo tee /etc/apt/preferences.d/mozilla > /dev/null <<EOF
|
||||
Package: *
|
||||
Pin: origin packages.mozilla.org
|
||||
Pin-Priority: 1000
|
||||
EOF
|
||||
|
||||
# ================================
|
||||
# Étape 5 : Installation de Firefox standard
|
||||
# ================================
|
||||
echo_info "Mise à jour des dépôts et installation de Firefox."
|
||||
sudo apt update
|
||||
sudo apt install -y firefox
|
||||
|
||||
echo_info "Installation terminée. Version installée :"
|
||||
firefox --version
|
||||
|
||||
echo_info "✅ Script terminé avec succès."
|
||||
|
||||
|
||||
|
||||
### Installation de ublock Origin
|
||||
|
||||
mkdir tmp
|
||||
|
||||
# On télécharge l'extension depuis addons.mozilla.org
|
||||
wget https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi -O tmp/latest.xpi
|
||||
|
||||
# On renomme le fichier avec l'uid de l'extension
|
||||
mv tmp/latest.xpi tmp/uBlock0@raymondhill.net.xpi
|
||||
|
||||
sudo mkdir -p /usr/lib/firefox-esr/distribution/extensions/
|
||||
# On crée
|
||||
sudo mkdir -p /usr/lib/firefox/distribution/extensions/
|
||||
sudo cp tmp/uBlock0@raymondhill.net.xpi /usr/lib/firefox/distribution/extensions/
|
||||
|
||||
sudo cp tmp/uBlock0@raymondhill.net.xpi /usr/lib/firefox-esr/distribution/extensions/
|
||||
# On force les droits en lecture du fichier.
|
||||
# A vérifier si c'est vraiment utile...
|
||||
sudo chmod 644 /usr/lib/firefox/distribution/extensions/uBlock0@raymondhill.net.xpi
|
||||
|
||||
sudo chmod 644 /usr/lib/firefox-esr/distribution/extensions/uBlock0@raymondhill.net.xpi
|
||||
## TO BE CONTINUED
|
||||
# Homepage custom avec liens vers service publics + + google search + background
|
||||
#
|
||||
|
||||
2
gnome.sh
2
gnome.sh
@ -172,4 +172,4 @@ NoDisplay=true
|
||||
EOF
|
||||
|
||||
# Modification du pack d'icônes
|
||||
bash change-icons.sh
|
||||
#bash change-icons.sh
|
||||
|
||||
@ -1,36 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Vérifie si une commande est disponible
|
||||
|
||||
sudo cp files/extrepo.config.yaml /etc/extrepo/config.yaml
|
||||
|
||||
# Vérifie si une commande ou un Flatpak est installé
|
||||
is_installed() {
|
||||
command -v "$1" &> /dev/null
|
||||
local app_name="$1"
|
||||
local flatpak_ref="${2:-}" # valeur vide si non fournie
|
||||
|
||||
if command -v "$app_name" &> /dev/null; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -n "$flatpak_ref" ]] && flatpak info --show-ref "$flatpak_ref" &> /dev/null; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# 📺 FreeTube (AppImage)
|
||||
# 📺 FreeTube (Flatpak)
|
||||
install_freetube() {
|
||||
if is_installed freetube; then
|
||||
echo "📺 FreeTube est déjà installé."
|
||||
local flatpak_ref="io.freetubeapp.FreeTube"
|
||||
local runtime="org.freedesktop.Platform//25.08"
|
||||
|
||||
# Vérifie si FreeTube est déjà installé
|
||||
if is_installed freetube "$flatpak_ref"; then
|
||||
echo "📺 FreeTube est déjà installé (Flatpak ou système)."
|
||||
return
|
||||
fi
|
||||
|
||||
run_step "📺 Installation de FreeTube (AppImage)" "
|
||||
mkdir -p \$HOME/.local/bin &&
|
||||
wget -q https://github.com/FreeTubeApp/FreeTube/releases/latest/download/freetube.AppImage -O \$HOME/.local/bin/freetube &&
|
||||
chmod +x \$HOME/.local/bin/freetube
|
||||
"
|
||||
echo "🔄 Mise à jour des métadonnées Flathub..."
|
||||
flatpak update --appstream -y
|
||||
|
||||
run_step "📺 Création du raccourci FreeTube" "
|
||||
mkdir -p ~/.local/share/applications &&
|
||||
cat <<EOF > ~/.local/share/applications/freetube.desktop
|
||||
[Desktop Entry]
|
||||
Name=FreeTube
|
||||
Exec=/home/$USER/.local/bin/freetube
|
||||
Icon=video
|
||||
Type=Application
|
||||
Categories=AudioVideo;Player;Video;
|
||||
EOF
|
||||
"
|
||||
echo "📦 Installation du runtime nécessaire..."
|
||||
if ! flatpak list --runtime | grep -qw "org.freedesktop.Platform.*25.08"; then
|
||||
flatpak install -y flathub "$runtime"
|
||||
else
|
||||
echo "✅ Runtime déjà installé."
|
||||
fi
|
||||
|
||||
echo "📦 Installation de FreeTube..."
|
||||
flatpak install -y flathub "$flatpak_ref"
|
||||
|
||||
# Vérifie que l'installation a réussi
|
||||
if is_installed freetube "$flatpak_ref"; then
|
||||
echo "🎉 FreeTube a été installé avec succès !"
|
||||
else
|
||||
echo "❌ Échec de l'installation de FreeTube."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# 🎥 Zoom (via .deb)
|
||||
install_zoom() {
|
||||
if is_installed zoom; then
|
||||
|
||||
@ -10,14 +10,14 @@ run_step() {
|
||||
local command="$2"
|
||||
|
||||
echo -n "$description... "
|
||||
eval "$command" > /dev/null 2>>"$LOGFILE"
|
||||
if [ $? -eq 0 ]; then
|
||||
if eval "$command" >>"$LOGFILE" 2>&1; then
|
||||
echo "✅"
|
||||
else
|
||||
echo "❌ (voir $LOGFILE)"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#################################
|
||||
# 🎯 POST-INSTALL DEBIAN 13 #
|
||||
#################################
|
||||
@ -41,8 +41,16 @@ run_step "🔧 Installation des outils de base" "
|
||||
sudo apt install -y libgettextpo-dev gettext git wget curl build-essential linux-image-amd64 make ttf-mscorefonts-installer rsyslog unzip bash-completion flatpak libxdo3 extrepo
|
||||
"
|
||||
|
||||
# FRENCH LANGUAGE & KEYBOARD
|
||||
run_step "Passage du système en français et clavier AZERTY" "
|
||||
sudo cp files/keyboard /etc/default/
|
||||
export LANG=fr_FR.UTF-8
|
||||
echo "LANG=fr_FR.UTF-8" | sudo tee -a /etc/default/locale > /dev/null
|
||||
"
|
||||
|
||||
run_step "🛒 Ajout du dépôt Flathub" "
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak update -y
|
||||
"
|
||||
|
||||
# 🌐 DNS
|
||||
@ -77,6 +85,12 @@ else
|
||||
echo "⏭️ Configuration GNOME ignorée."
|
||||
fi
|
||||
|
||||
##################################
|
||||
# ACITVATION DU BUREAU A DISTANCE
|
||||
##################################
|
||||
|
||||
## A FAIRE
|
||||
|
||||
|
||||
##############################
|
||||
## SELECTION DES LOGICIELS ##
|
||||
|
||||
4
postinstall.log
Normal file
4
postinstall.log
Normal file
@ -0,0 +1,4 @@
|
||||
Looking for matches…
|
||||
Required runtime for io.freetubeapp.FreeTube/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/25.08) found in remote flathub
|
||||
Do you want to install it? [Y/n]: n
|
||||
error: The application io.freetubeapp.FreeTube/x86_64/stable requires the runtime org.freedesktop.Platform/x86_64/25.08 which is not installed
|
||||
145
trixie-toolbox.sh
Normal file
145
trixie-toolbox.sh
Normal file
@ -0,0 +1,145 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# ==========================================================
|
||||
# Debian 13 Toolbox — Menu principal de post-installation
|
||||
# ==========================================================
|
||||
|
||||
|
||||
LOGFILE="$HOME/postinstall.log"
|
||||
> "$LOGFILE"
|
||||
|
||||
# --- Fonction d’exécution avec log
|
||||
run_step() {
|
||||
local description="$1"
|
||||
local command="$2"
|
||||
|
||||
echo -n "$description... "
|
||||
if eval "$command" >>"$LOGFILE" 2>&1; then
|
||||
echo "✅"
|
||||
else
|
||||
echo "❌ (voir $LOGFILE)"
|
||||
fi
|
||||
}
|
||||
|
||||
# --- Vérification dépendances minimales
|
||||
for cmd in whiptail flatpak extrepo wget curl git; do
|
||||
if ! command -v "$cmd" &>/dev/null; then
|
||||
echo "📦 Installation de la dépendance manquante : $cmd"
|
||||
sudo apt update && sudo apt install -y "$cmd"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# ==========================================================
|
||||
# FONCTIONS DE CHAQUE ACTION
|
||||
# ==========================================================
|
||||
|
||||
post_install_base() {
|
||||
echo "🚀 Post-installation de base..."
|
||||
|
||||
run_step "📦 Configuration des sources APT" "
|
||||
sudo cp files/debian.sources /etc/apt/sources.list.d/ &&
|
||||
if [ -f /etc/apt/sources.list ]; then
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
|
||||
sudo rm /etc/apt/sources.list
|
||||
fi
|
||||
"
|
||||
|
||||
run_step "🆙 Mise à jour du système" "
|
||||
sudo apt update &&
|
||||
sudo apt upgrade -y
|
||||
"
|
||||
|
||||
run_step "🔧 Installation des outils de base" "
|
||||
sudo apt install -y libgettextpo-dev gettext git wget curl build-essential linux-image-amd64 make ttf-mscorefonts-installer rsyslog unzip bash-completion flatpak libxdo3 extrepo
|
||||
"
|
||||
|
||||
run_step "🇫🇷 Langue et clavier français" "
|
||||
sudo cp files/keyboard /etc/default/
|
||||
echo 'LANG=fr_FR.UTF-8' | sudo tee -a /etc/default/locale > /dev/null
|
||||
"
|
||||
|
||||
run_step "🛒 Ajout du dépôt Flathub" "
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
"
|
||||
|
||||
run_step "🌐 DNS Cloudflare" "
|
||||
echo -e '[main]\ndns=none' | sudo tee /etc/NetworkManager/conf.d/90-dns-none.conf &&
|
||||
sudo systemctl reload NetworkManager &&
|
||||
sudo sed -i '1,4 s/^/#/' /etc/resolv.conf &&
|
||||
sudo sed -i -e '\$anameserver 1.1.1.2\nameserver 2606:4700:4700::1112' /etc/resolv.conf &&
|
||||
sudo systemctl reload NetworkManager
|
||||
"
|
||||
|
||||
run_step "🎨 Icônes LibreOffice (Colibre)" "
|
||||
sudo chown $USER:$USER files/registrymodifications.xcu &&
|
||||
mkdir -p \$HOME/.config/libreoffice/4/user/ &&
|
||||
cp files/registrymodifications.xcu \$HOME/.config/libreoffice/4/user/ &&
|
||||
sudo mkdir -p /etc/skel/.config/libreoffice/4/user/ &&
|
||||
sudo cp files/registrymodifications.xcu /etc/skel/.config/libreoffice/4/user/
|
||||
"
|
||||
|
||||
run_step "🦊 Installation de Firefox" "
|
||||
bash firefox.sh
|
||||
"
|
||||
}
|
||||
|
||||
|
||||
configure_gnome() {
|
||||
echo "🖥️ Configuration de GNOME..."
|
||||
run_step "Configuration de GNOME (script externe)" "
|
||||
bash gnome.sh
|
||||
"
|
||||
}
|
||||
|
||||
# --- Fichiers annexes
|
||||
source ./install_apps.sh
|
||||
|
||||
|
||||
install_apps_menu() {
|
||||
CHOIX=$(whiptail --title "Installation de logiciels" --checklist \
|
||||
"Choisissez les logiciels à installer :" 20 78 10 \
|
||||
"freetube" "FreeTube (YouTube sans pub)" ON \
|
||||
"zoom" "Zoom (visioconférence)" OFF \
|
||||
"element" "Element (messagerie Matrix)" OFF \
|
||||
"chrome" "Google Chrome (navigateur)" OFF \
|
||||
"vscodium" "VSCodium (éditeur de code)" ON \
|
||||
3>&1 1>&2 2>&3)
|
||||
|
||||
CHOIX=$(echo $CHOIX | tr -d '"')
|
||||
|
||||
for APP in $CHOIX; do
|
||||
case $APP in
|
||||
freetube) install_freetube ;;
|
||||
zoom) install_zoom ;;
|
||||
element) install_element ;;
|
||||
chrome) install_chrome ;;
|
||||
vscodium) install_vscodium ;;
|
||||
*) echo "❓ Logiciel inconnu : $APP" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# ==========================================================
|
||||
# MENU PRINCIPAL (BOUCLE)
|
||||
# ==========================================================
|
||||
while true; do
|
||||
CHOIX=$(whiptail --title "🧰 GN-Debian 13 Toolbox" --menu \
|
||||
"Sélectionnez une action :" 20 70 10 \
|
||||
1 "Post-installation de base" \
|
||||
2 "Personnalisation de GNOME" \
|
||||
3 "Installer des applications" \
|
||||
4 "Quitter" \
|
||||
3>&1 1>&2 2>&3)
|
||||
|
||||
case $CHOIX in
|
||||
1) post_install_base ;;
|
||||
2) configure_gnome ;;
|
||||
3) install_apps_menu ;;
|
||||
4) echo "👋 Au revoir !"; exit 0 ;;
|
||||
*) echo "❓ Choix invalide." ;;
|
||||
esac
|
||||
|
||||
whiptail --title "Retour au menu principal" --msgbox "✅ Action terminée.\nAppuyez sur OK pour revenir au menu principal." 8 60
|
||||
done
|
||||
Loading…
x
Reference in New Issue
Block a user