upgrade to debian 12

This commit is contained in:
Lina Renteria 2023-12-29 10:41:19 +01:00
commit 6050775477
29 changed files with 696 additions and 0 deletions

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# post-install
## REQUIREMENTS
- Operating system: Debian Bullseye
- System version : 64 bits
## Installation
```bash
./install.sh
```

130
files/bashrc Normal file
View File

@ -0,0 +1,130 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
#test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias py='python3'
alias code='codium'
alias balena='/home/max/workspace/app-images/balenaEtcher-1.7.8-x64.AppImage'
alias ls='ls --color=auto'
alias ll='ls -la'
alias doc='docker'
alias dc='docker-compose'
alias k='kubectl'
alias suspend='systemctl suspend'
alias shutdown='sudo shutdown now'
alias reboot='sudo reboot'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
## git
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]:\[\033[38;5;5m\]\$(git_branch)\[\033[00m\]\$ "

78
files/extensions.dump Normal file
View File

@ -0,0 +1,78 @@
[arcmenu]
alphabetize-all-programs=true
application-shortcuts-list=[['Software', 'system-software-install-symbolic', 'ArcMenu_Software'], ['Settings', 'preferences-system-symbolic', 'gnome-control-center.desktop'], ['Tweaks', 'org.gnome.tweaks-symbolic', 'org.gnome.tweaks.desktop']]
arc-menu-icon=23
arc-menu-placement='DTP'
available-placement=[false, true, false]
button-padding=-1
custom-menu-button-icon-size=36.0
default-menu-view='Frequent_Apps'
disable-category-arrows=false
disable-menu-button-active-indicator=false
disable-scrollview-fade-effect=false
disable-searchbox-border=false
disable-user-avatar=true
distro-icon=16
enable-custom-arc-menu=false
enable-horizontal-flip=true
enable-menu-button-arrow=false
gap-adjustment=0
indicator-color='rgb(41, 165, 249)'
indicator-text-color='rgba(196, 196, 196, 0.3)'
menu-button-hover-color='rgb(98,160,234)'
menu-button-icon='Arc_Menu_Icon'
menu-layout='Default'
multi-lined-labels=true
multi-monitor=false
override-menu-button-active-color=false
override-menu-button-color=false
override-menu-button-hover-color=false
pinned-app-list=['Firefox ESR', '', 'firefox-esr.desktop', 'LibreOffice', '', 'libreoffice-startcenter.desktop']
prefs-visible-page=0
recently-installed-apps=@as []
remove-menu-arrow=false
searchbar-default-bottom-location='Top'
show-activities-button=false
show-bookmarks=true
show-external-devices=false
show-search-result-details=false
[dash-to-panel]
animate-appicon-hover-animation-extent={'RIPPLE': 4, 'PLANK': 4, 'SIMPLE': 1}
appicon-margin=2
appicon-padding=6
available-monitors=[0]
dot-color-1='#5294e2'
dot-color-2='#5294e2'
dot-color-3='#5294e2'
dot-color-4='#5294e2'
dot-color-unfocused-1='#5294e2'
dot-color-unfocused-2='#5294e2'
dot-color-unfocused-3='#5294e2'
dot-color-unfocused-4='#5294e2'
dot-position='BOTTOM'
dot-style-focused='METRO'
dot-style-unfocused='DASHES'
focus-highlight-color='#eeeeee'
hotkeys-overlay-combo='TEMPORARILY'
leftbox-padding=2
leftbox-size=0
panel-anchors='{"0":"MIDDLE"}'
panel-element-positions='{"0":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":false,"position":"stackedBR"}]}'
panel-lengths='{"0":100}'
scroll-panel-action='NOTHING'
show-appmenu=false
show-apps-icon-file=''
show-apps-icon-side-padding=0
show-favorites=true
show-favorites-all-monitors=true
show-running-apps=true
status-icon-padding=-1
stockgs-keep-top-panel=false
tray-padding=-1
tray-size=0
[ding]
check-x11wayland=true
icon-size='standard'
show-network-volumes=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
files/nord.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

16
files/sources.list Normal file
View File

@ -0,0 +1,16 @@
# Base
deb http://deb.debian.org/debian bookworm main non-free-firmware contrib non-free
deb-src http://deb.debian.org/debian bookworm main non-free-firmware contrib non-free
# Security
deb http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware contrib non-free
deb-src http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware contrib non-free
# Updates
deb http://deb.debian.org/debian bookworm-updates main non-free-firmware contrib non-free
deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware contrib non-free
# Backports
deb http://deb.debian.org/debian bookworm-backports main non-free-firmware contrib non-free
deb-src http://deb.debian.org/debian bookworm-backports main non-free-firmware contrib non-free

View File

@ -0,0 +1,13 @@
[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -- %u
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
X-Desktop-File-Install-Version=0.23

Binary file not shown.

Binary file not shown.

131
gnome.sh Executable file
View File

@ -0,0 +1,131 @@
#!/bin/bash
###############
# Preparation #
###############
if [[ -z $PERSO ]]; then
PERSO=$USER
STANDALONE=1
fi
HOME="/home/$PERSO"
PICTURES_DIR=$(grep PICTURES ~/.config/user-dirs.dirs | cut -d'=' -f2 | sed 's/"//g; s/$HOME\///')
#############
# Questions #
#############
if [ $STANDALONE -eq 1 ]; then
THEMES=$(whiptail --title "Thème général" --radiolist "Choisissez votre thème parmi ces choix :" 15 60 5 \
"Theme 1 :" "Layan-gtk-theme" OFF \
"Theme 2 :" "Vimix-gtk-themes" OFF \
"Theme 3 :" "Fluent-gtk-theme" OFF \
"Theme 4 :" "Qogir-gtk-theme" ON \
"Theme 5 :" "WhiteSur-gtk-theme" OFF 3>&1 1>&2 2>&3)
fi
##############
# Copy files #
##############
cp -n files/nord.png files/macos-sierra-nevada-mountain.jpg $HOME/"$PICTURES_DIR"/
mkdir $HOME/.local/share/fonts
cp -rn files/ubuntu-mono $HOME/.local/share/fonts/
fc-cache
##################
# General config #
##################
gsettings set org.gnome.desktop.wm.preferences button-layout appmenu:minimize,maximize,close
gsettings set org.gnome.desktop.interface cursor-theme 'DMZ-White'
gsettings set org.gnome.desktop.background picture-uri "file://$(pwd)/files/nord.png"
gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
gsettings set org.gnome.desktop.interface clock-show-date true
gsettings set org.gnome.shell favorite-apps "['firefox-esr.desktop', 'org.gnome.Nautilus.desktop', 'libreoffice-startcenter.desktop', 'org.gnome.Software.desktop']"
gsettings set org.gnome.desktop.interface monospace-font-name "UbuntuMono Nerd Font Regular 15"
gsettings set org.gnome.shell enabled-extensions "[\
'user-theme@gnome-shell-extensions.gcampax.github.com',\
'drive-menu@gnome-shell-extensions.gcampax.github.com',\
'dash-to-panel@jderose9.github.com',\
'ding@rastersoft.com',\
'arcmenu@arcmenu.com'\
]"
##############
# Extensions #
##############
git clone https://gitlab.com/rastersoft/desktop-icons-ng
(cd desktop-icons-ng ; ./local_install.sh)
git clone https://github.com/home-sweet-gnome/dash-to-panel
(cd dash-to-panel ; git checkout gnome-40 ; make install)
git clone https://gitlab.com/arcmenu/ArcMenu.git
(cd ArcMenu ; git checkout gnome-42/43/44 ; make install)
dconf load /org/gnome/shell/extensions/ < files/extensions.dump
rm -rf desktop-icons-ng dash-to-panel ArcMenu
#################
# Theme install #
#################
mkdir ./icons ./themes $HOME/.icons
if [ -z "$THEMES" ]; then
echo -e "\e[91mAucun thème n'a été choisi"
else
echo -e "\e[93mVous avez choisi le theme : $THEMES"
case "$THEMES" in
"Theme 1 :")
git clone https://github.com/vinceliuice/Layan-gtk-theme.git themes/
git clone https://github.com/vinceliuice/Tela-icon-theme icons/
(cd themes/ ; ./install.sh)
(cd icons/ ; ./install.sh)
gsettings set org.gnome.desktop.interface gtk-theme "Layan-Dark"
gsettings set org.gnome.desktop.interface icon-theme "Tela"
gsettings set org.gnome.shell.extensions.user-theme name "Layan-Dark"
;;
"Theme 2 :")
git clone https://github.com/vinceliuice/vimix-gtk-themes.git themes/
git clone https://github.com/vinceliuice/vimix-icon-theme icons/
(cd themes/ ; ./install.sh)
(cd icons/ ; ./install.sh)
gsettings set org.gnome.desktop.interface gtk-theme "vimix-light-doder"
gsettings set org.gnome.desktop.interface icon-theme "Vimix"
gsettings set org.gnome.shell.extensions.user-theme name "vimix-dark-doder"
;;
"Theme 3 :")
git clone https://github.com/vinceliuice/Fluent-gtk-theme.git themes/
git clone https://github.com/vinceliuice/Fluent-icon-theme icons/
(cd themes/ ; ./install.sh)
(cd icons/ ; ./install.sh)
gsettings set org.gnome.desktop.interface gtk-theme "Fluent-Dark"
gsettings set org.gnome.desktop.interface icon-theme "Fluent"
gsettings set org.gnome.shell.extensions.user-theme name "Fluent-Dark"
;;
"Theme 4 :")
git clone https://github.com/vinceliuice/Qogir-theme themes/
git clone https://github.com/vinceliuice/Qogir-icon-theme icons/
(cd themes/ ; ./install.sh)
(cd icons/ ; ./install.sh)
gsettings set org.gnome.desktop.interface gtk-theme 'Qogir-Dark'
gsettings set org.gnome.desktop.interface icon-theme 'Qogir-dark'
gsettings set org.gnome.shell.extensions.user-theme name 'Qogir-Dark'
;;
"Theme 5 :")
git clone https://github.com/vinceliuice/WhiteSur-gtk-theme themes/
git clone https://github.com/keeferrourke/la-capitaine-icon-theme icons/la-capitaine-icon-theme
(cd themes/ ; ./install.sh)
mv icons/la-capitaine-icon-theme/ $HOME/.icons
gsettings set org.gnome.desktop.interface gtk-theme "WhiteSur-Dark"
gsettings set org.gnome.desktop.interface icon-theme "la-capitaine-icon-theme"
gsettings set org.gnome.shell.extensions.user-theme name "WhiteSur-Dark"
gsettings set org.gnome.desktop.background picture-uri "file://$(pwd)/files/macos-sierra-nevada-mountain.jpg"
;;
*)
echo -e "\e[91mUnsupported item $THEMES!" >&2
exit 1
;;
esac
fi
############
# Cleaning #
############
rm -rf ./themes
rm -rf ./icons
if [ $STANDALONE -eq 1 ]; then
busctl --user call "org.gnome.Shell" "/org/gnome/Shell" "org.gnome.Shell" "Eval" "s" 'Meta.restart("Restarting…")';
fi

320
install.sh Executable file
View File

@ -0,0 +1,320 @@
#!/bin/bash
# authors : https://gitlab.com/Mxaxax - https://gitlab.com/edricus
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
###################
## USER CREATION ##
###################
printf "\033[32;5m== Creation des utilisateurs...\033[0m\n"
## BELLINUXIEN
if id "bellinuxien" >/dev/null 2>&1; then
echo -e "\e[93ml'utilisateur bellinuxien existe déjà"
else
if (whiptail --yesno "Voulez-vous créer l'utilisateur bellinuxien ?" 8 78 --title "Creation de l'utilisateur bellinuxien" 3>&1 1>&2 2>&3); then
adduser bellinuxien --gecos "" --disabled-password --quiet
PASSWORD=1
while [[ $PASSWORD != $VERIF ]]; do
PASSWORD=$(whiptail --passwordbox "Entrez le mot de passe de bellinuxien" 8 78 --title "Creation de l'utilisateur bellinuxien" 3>&1 1>&2 2>&3)
VERIF=$(whiptail --passwordbox "Entrez une nouvelle fois le mot de passe" 8 78 --title "Creation de l'utilisateur bellinuxien" 3>&1 1>&2 2>&3)
if [[ $PASSWORD != $VERIF ]]; then
whiptail --msgbox "Les mots de passe ne correspondent pas !" --title "Creation de l'utilisateur bellinuxien" 8 78
fi
done
echo "bellinuxien:"$PASSWORD"" | chpasswd
usermod -aG sudo bellinuxien
cat << EOF > /var/lib/AccountsService/users/bellinuxien
[User]
SystemAccount=true
EOF
fi
fi
## PERSO / VISITEUR
PERSO='1 1' # ugly workaround to start the space-in-string verfication loop
PASSWORD=1
if (whiptail --yesno "Voulez-vous créer un utilisateur ?" 8 78 --title "Creation d'un utilisateur perso" 3>&1 1>&2 2>&3); then
while [[ ! -z $(echo $PERSO | grep "[[:space:]]") ]]; do
PERSO="$(whiptail --inputbox --separate-output --title "Creation d'un utilistateur perso" 3>&1 1>&2 2>&3 \
"Entrez le nom d'utilisateur à créer" 8 40 visiteur)"
if [[ ! -z $(echo $PERSO | grep "[[:space:]]") ]]; then
whiptail --msgbox "Le nom d'utilisateur ne doit pas contenir d'espaces !" --title "Creation d'un utilisateur perso" 8 78
fi
done
if [[ $PERSO == visiteur ]]; then
if id "visiteur" >/dev/null 2>&1; then
echo -e "\e[93mL'utilisateur visiteur existe déjà"
else
adduser visiteur --gecos "visiteur" --disabled-password --quiet
usermod -a -G cdrom,floppy,audio,bluetooth,dip,video,plugdev,scanner,netdev,lp,lpadmin visiteur
echo 'visiteur:visiteur' | chpasswd
fi
else
while [[ $PASSWORD != $VERIF ]]; do
PASSWORD=$(whiptail --passwordbox "Entrez le mot de passe" 8 78 --title "Creation d'un utilisateur perso" 3>&1 1>&2 2>&3)
VERIF=$(whiptail --passwordbox "Entrez une nouvelle fois le mot de passe" 8 78 --title "Creation d'un utilisateur perso" 3>&1 1>&2 2>&3)
if [[ $PASSWORD != $VERIF ]]; then
whiptail --msgbox "Les mots de passe ne correspondent pas !" --title "Creation d'un utilisateur perso" 8 78
else
adduser $PERSO --gecos "${PERSO^}" --disabled-password --quiet
echo "$PERSO:"$PASSWORD"" | chpasswd
if (whiptail --yesno "Voulez-vous ajouter cet utilisateur au groupe sudo ?" --title "Creation d'un utilisateur perso" 8 78 3>&1 1>&2 2>&3) then
usermod -aG sudo $PERSO
fi
fi
done
fi
else PERSO=$(id -nu 1000)
fi
if [[ -z $PERSO ]]; then
PERSO=$(id -nu 1000)
fi
##################
## QUESTIONS DE ##
##################
printf "\033[0;32m== Choix de l'environnement de bureau... \033[0m\n"
DE=$(whiptail --separate-output --title "Environnements de bureau" --radiolist \
"Quel environnement de bureau utiliser ?" 10 60 3 \
"MATE" "Leger, convient aux PC anciens" OFF \
"KDE" "Complexe, adapté au multi-tâche" OFF \
"GNOME" "Moderne, ergonomie et visuel soigné " ON 3>&1 1>&2 2>&3)
printf "\033[0;32m== Choix du profil... \033[0m\n"
PROFIL=$(whiptail --separate-output --title "Profils" --checklist \
"Quels profils d'utilisateurs sur cet ordinateur?" 15 90 10 \
"Team-Working" "Des logiciels pour le travail collaboratif" ON \
"Enfants" "Des jeux et des outils éducatifs" OFF \
"Seniors" "Des outils d'accessibilité" OFF \
"Gamer" "Des jeux, des jeux ,des jeux" OFF \
"MAO" "Des logiciels pour la création musicale" OFF \
"DevOps" "Des logiciels pour s'initier à l'approche DevOps" OFF \
"Toshiba_toughbook" "Correction de bug pour le son" OFF 3>&1 1>&2 2>&3)
#####################
## PACKAGE MANAGER ##
#####################
printf "\033[0;32m== Configuration de APT... \033[0m\n"
cp files/sources.list /etc/apt/sources.list
dpkg --add-architecture i386
apt-get update -y
apt-get upgrade -y
#############################
## INTERNET ACCESS CONTROL ##
#############################
echo $'[main]\ndns=none' | tee /etc/NetworkManager/conf.d/90-dns-none.conf &>/dev/null
systemctl reload NetworkManager
sed -i '1,4 s/^/#/' /etc/resolv.conf && sed -i -e '$anameserver 1.1.1.2\nnameserver 2606:4700:4700::1112' /etc/resolv.conf
systemctl reload NetworkManager
###################
## BASE PACKAGES ##
###################
printf "\033[0;32m== Installation des programmes de base... \033[0m\n"
apt-get install -yqq git curl wget zip unzip bash-completion gnome-tweaks snapd flatpak gnome-software-plugin-flatpak libxdo3
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
##################
## CONFIG FILES ##
##################
ACCOUNTSSERVICE="/var/lib/AccountsService/users/"$PERSO""
# SOURCES.LIST
printf "\033[0;32m== Ajout des backports dans sources.list... \033[0m\n"
if [ -z "$(grep 'bookworm-backports' /etc/apt/sources.list)" ]; then
echo "deb http://deb.debian.org/debian bookworm-backports main non-free-firmware contrib non-free" >> /etc/apt/sources.list
apt-get update
fi
# BASHRC
printf "\033[0;32m== Modification de bashrc... \033[0m\n"
mv /home/"$PERSO"/.bashrc /home/"$PERSO"/.bashrc.BACK
cp -r files/bashrc /home/"$PERSO"/.bashrc
################
## INSTALL DE ##
################
if [ -z "$DE" ]; then
echo -e "\e[91mAucun profil n'a été choisi"
else
for i in $DE; do
echo -e "\e[93mVous avez choisis le bureau : $DE"
case "$i" in
"MATE")
if [[ ! -z $(ps -aux | grep mate-panel$) ]]; then
echo "MATE est déjà installé"
else
apt-get purge --autoremove *gnome* *kde* -y
apt-get install -yqq gnome-system-tools blueman gnome-software ttf-mscorefonts-installer -y
tasksel install mate-desktop
sed -i '/XSession/d' $ACCOUNTSSERVICE
sed -i '/Session/a XSession=mate' $ACCOUNTSSERVICE
whiptail --msgbox "Les changements seronts appliqués au prochain redémarrage" 8 78
fi
;;
"KDE")
if [[ ! -z $(ps -aux | grep kded4$) ]]; then
echo "KDE est déjà installé"
else
apt-get purge --autoremove *gnome* *mate* -y
tasksel install kde-desktop
apt-get install -yqq ttf-mscorefonts-installer -y
sed -i '/XSession/d' $ACCOUNTSSERVICE
sed -i '/Session/a XSession=kde' $ACCOUNTSSERVICE
whiptail --msgbox "Les changements seronts appliqués au prochain redémarrage" 8 78
fi
;;
"GNOME")
if [[ ! -z $(ps -aux | grep gnome-session$) ]]; then
echo "GNOME est déjà installé"
else
apt-get purge --autoremove *mate* *kde* -y
tasksel install gnome-desktop
apt-get install -yqq gnome-tweak-tool gnome-screensaver arc-theme dmz-cursor-theme -y
sed -i '/XSession/d' $ACCOUNTSSERVICE
sed -i '/Session/a XSession=gnome' $ACCOUNTSSERVICE
whiptail --msgbox "Les changements seronts appliqués au prochain redémarrage" 8 78
fi
;;
*)
echo -e "\e[91mUnsupported item $DE !" >&2
exit 1
;;
esac
done
fi
#####################
## INSTALL PROFILE ##
#####################
for i in $PROFIL; do
echo -e "\e[93mVous avez choisi le profil : $PROFIL"
case "$i" in
"Enfants")
echo $'[main]\ndns=none' | tee /etc/NetworkManager/conf.d/90-dns-none.conf
sed -i '1,6 s/^/#/' /etc/resolv.conf
sed -i -e '$anameserver 1.1.1.3\nnameserver 2606:4700:4700::1113' /etc/resolv.conf
apt-get install -yqq veyon-service tuxpaint pingus numptyphysics warmux xmoto slimevolley arduino -y
apt-get install -yqq -t bookworm-backports gcompris-qt -y
;;
"Seniors")
# Skype
wget --timeout 5 --tries 3 https://go.skype.com/skypeforlinux-64.deb
dpkg -i skypeforlinux-64.deb
apt-get install -yqq -f
rm -rf skypeforlinux-64.deb
# Outlook
cp files/desktopfiles/outlook.desktop /usr/share/applications/outlook.desktop
## Outlook unofficial client
#curl -s https://api.github.com/repos/julian-alarcon/prospect-mail/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget --timeout 5 --tries 3 --show-progress -qi -
#dpkg -i prospect-mail_*_amd64.deb
#apt-get install -yqq -f
#rm -rf prospect-mail_*_amd64.deb
# Rustdesk install
cd /tmp && wget https://github.com/rustdesk/rustdesk/releases/download/1.1.9/rustdesk-1.1.9.deb && dpkg -i rustdesk-1.1.9.deb && rm -rf rustdesk-1.1.9.deb
;;
"Gamer")
yes | apt-get install -yqq veyon-service steam -y
# Discord
wget --timeout 5 --tries 3 -O discord.tar.gz "https://discordapp.com/api/download?platform=linux&format=tar.gz"
tar -xf discord.tar.gz
desktop-file-validate Discord/discord.desktop
mv Discord/discord.desktop /usr/share/applications/
mv Discord /usr/share/
ln -s /usr/share/Discord/Discord /usr/bin/discord
# Autres
snap install urban-terror warzone2100 flightgear stuntrally extreme-tux-racer tmnationsforever mc-installer mari0-ce liveforspeed opensurge crrcsim-simulator love
snap install {savagexr,pixels-game} --beta
;;
"MAO")
apt-get install -yqq playonlinux lmms audacity mixxx ardour rosegarden soundconverter qtractor -y
wget --timeout 5 --tries 3 https://dl.4kdownload.com/app/4kyoutubetomp3_4.6.2-1_amd64.deb
dpkg -i ./4kyoutubetomp3_4.6.2-1_amd64.deb
apt-get install -yqq -f
rm -rf ./4kyoutubetomp3_4.6.2-1_amd64.deb
;;
"Team-Working")
apt-get install -yqq gimp gitso soundcgimp onverter scribus chromium chromium-l10n vlc brasero pdfarranger -y
# Signal
echo 'deb [signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg arch=amd64] https://updates.signal.org/desktop/apt xenial main' > /etc/apt/sources.list.d/signal.list
wget --timeout 5 --tries 3 -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg > /usr/share/keyrings/signal-desktop-keyring.gpg
rm -rf signal-desktop-keyring.gpg
# Zoom
wget --timeout 5 --tries 3 https://zoom.us/client/5.13.7.683/zoom_amd64.deb
dpkg -i zoom_amd64.deb
apt-get install -yqq -f
rm -rf zoom_amd64.deb
# Telegram
wget --timeout 5 --tries 3 "https://telegram.org/dl/desktop/linux" -O telegram.tar.xz
tar -xf telegram.tar.xz
mv Telegram/Telegram /usr/local/bin/telegram
cp files/telegram-desktop.desktop /usr/share/applications/
# Autres
snap install messenger-collabee yakyak whatsdesk && \
snap install slack --classic
snap install cawbird --edge
;;
"DevOps")
mkdir devops && git clone https://gitlab.com/Mxaxax/installations.git devops/ && bash devops/devops.sh && rm -rf ./devops/
;;
"Toshiba_toughbook")
mkdir ./toshiba && git clone https://gitlab.com/garagenum/tools/linux/debian-customizer.git toshiba/ && mv /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf.BACK && cp -r ./toshiba/custom-debian-conf/system-conf/analog-output-speaker.conf /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf
rm -rf ./toshiba/
;;
*)
echo -e "\e[91mUnsupported item $PROFIL!" >&2
exit 1
;;
esac
done
###############
## APPARENCE ##
###############
## Desktop environment
echo "DE is $DE"
echo "User is $PERSO"
if [ "$(echo $DE)" == 'GNOME' ]; then
apt-get install gettext meson ninja-build dmz-cursor-theme -y
printf '\n'
echo "Pour la configuration de gnome, basculer sur $PERSO et executez le script \'gnome.sh\' sans sudo. Si aucun utilisateur n'a été créé, juste executez gnome.sh tout de suite"
printf '\n'
fi
###########
# Firefox #
###########
## ne fonctionne plus : https://blog.mozilla.org/addons/2019/10/31/firefox-to-discontinue-sideloaded-extensions/
# printf "\033[0;32m== Téléchargement des extensions firefox depuis addons.mozilla.org... \033[0m\n"
# mkdir ./addons
# # Ublock
# curl -s https://api.github.com/repos/gorhill/uBlock/releases/latest \
# | grep "browser_download_url.*firefox.xpi" \
# | cut -d : -f 2,3 \
# | tr -d \" \
# | wget -qi - -P addons/ublock-origin.xpi
# SOFTWARES INSTALLATION
# printf "\033[0;32m== Installation des logiciels : Element, VScodium...\033[0m\n"
## ELEMENT (logiciel libre de messagerie instantanée)
# apt-get install -yqq software-properties-common apt-get-transport-https wget --timeout 5 --tries 3 -y
# wget --timeout 5 --tries 3 -O- https://packages.riot.im/debian/riot-im-archive-keyring.gpg | gpg --dearmor | tee /usr/share/keyrings/riot-im-archive-keyring.gpg
# echo "deb [signed-by=/usr/share/keyrings/riot-im-archive-keyring.gpg] https://packages.riot.im/debian/ default main" | tee /etc/apt-get/sources.list.d/riot-im.list
# apt-get update -y
# apt-get install -yqq riot-desktop -y
## VSCODIUM (éditeur de code | fork de Visual Studio Code)
# wget --timeout 5 --tries 3 -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg |
# gpg --dearmor |
# dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
# echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' |
# tee /etc/apt-get/sources.list.d/vscodium.list
# apt-get update -y && apt-get install -yqq codium -y
# Restart GNOME
# su -c "busctl --user call "org.gnome.Shell" "/org/gnome/Shell" "org.gnome.Shell" "Eval" "s" 'Meta.restart("Restarting…")';" $PERSO