Guest User

Installation Debian 11 - Par Drthrax74 v1

a guest
Dec 12th, 2023
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 12.47 KB | None | 0 0
  1. # -----------------------------------------------------------------------------------------------------------------------------
  2. # Processus d'installation de Debian 11:
  3. # - Aucune Interface User
  4. # - Openssh
  5. # -----------------------------------------------------------------------------------------------------------------------------
  6. #
  7. ###############################################################################################################################
  8. # Depot Linux #
  9. ###############
  10. source /etc/os-release;
  11. echo "deb     http://deb.debian.org/debian/              $VERSION_CODENAME            main contrib non-free
  12. deb-src http://deb.debian.org/debian/              $VERSION_CODENAME            main
  13. deb     http://security.debian.org/debian-security $VERSION_CODENAME-security   main
  14. deb-src http://security.debian.org/debian-security $VERSION_CODENAME-security   main
  15. deb     http://deb.debian.org/debian/              $VERSION_CODENAME-updates    main
  16. deb-src http://deb.debian.org/debian/              $VERSION_CODENAME-updates    main" > /etc/apt/sources.list;
  17. #
  18. ###############################################################################################################################
  19. # Mettre à jour le système #
  20. ############################
  21. apt update;
  22. DEBIAN_FRONTEND=noninteractive apt upgrade -y;
  23. #
  24. ###############################################################################################################################
  25. # Verrouillage Majuscule #
  26. ##########################
  27. # Insérer à la ligne 5
  28. sed -i '5i include "mswindows-capslock"' /usr/share/X11/xkb/symbols/fr
  29. #
  30. # Génération du fichier
  31. echo "// Replicate a \"feature\" of MS Windows on AZERTY keyboards
  32. // where Caps Lock also acts as a Shift Lock on number keys.
  33. // Include keys <AE01> to <AE10> in the FOUR_LEVEL_ALPHABETIC key type.
  34. partial alphanumeric_keys
  35. xkb_symbols \"basic\" {
  36.     key <AE01>  { type= \"FOUR_LEVEL_ALPHABETIC\", [ ampersand,          1,          bar,   exclamdown ]    };
  37.     key <AE02>  { type= \"FOUR_LEVEL_ALPHABETIC\", [    eacute,          2,           at,    oneeighth ]    };
  38.     key <AE03>  { type= \"FOUR_LEVEL_ALPHABETIC\", [  quotedbl,          3,   numbersign,     sterling ]    };
  39.     key <AE04>  { type= \"FOUR_LEVEL_ALPHABETIC\", [apostrophe,          4,   onequarter,       dollar ]    };
  40.     key <AE05>  { type= \"FOUR_LEVEL_ALPHABETIC\", [ parenleft,          5,      onehalf, threeeighths ]    };
  41.     key <AE06>  { type= \"FOUR_LEVEL_ALPHABETIC\", [   section,          6,  asciicircum,  fiveeighths ]    };
  42.     key <AE07>  { type= \"FOUR_LEVEL_ALPHABETIC\", [    egrave,          7,    braceleft, seveneighths ]    };
  43.     key <AE08>  { type= \"FOUR_LEVEL_ALPHABETIC\", [    exclam,          8,  bracketleft,    trademark ]    };
  44.     key <AE09>  { type= \"FOUR_LEVEL_ALPHABETIC\", [  ccedilla,          9,    braceleft,    plusminus ]    };
  45.     key <AE10>  { type= \"FOUR_LEVEL_ALPHABETIC\", [    agrave,          0,   braceright,       degree ]    };
  46. };"  >  /usr/share/X11/xkb/symbols/mswindows-capslock;
  47. #
  48. ###############################################################################################################################
  49. # Configuration du Système #
  50. ############################
  51. apt install -y locales locales-all;
  52. dpkg-reconfigure keyboard-configuration;
  53. dpkg-reconfigure tzdata;
  54. dpkg-reconfigure locales;
  55. #
  56. ###############################################################################################################################
  57. # Xorg #
  58. ########
  59. apt install -y xserver-xorg;
  60. apt install -y xinit;
  61. #
  62. ###############################################################################################################################
  63. # Gestionnaire de connexion #
  64. #############################
  65. apt install -y lightdm;
  66. #
  67. ###############################################################################################################################
  68. # XFCE4 - MINIMUM #
  69. ###################
  70. clear;
  71. apt install -y libxfce4ui-utils;
  72. apt install -y xfce4-appfinder;
  73. apt install -y xfce4-panel;
  74. apt install -y xfce4-session;
  75. apt install -y xfce4-settings;
  76. apt install -y xfce4-terminal;
  77. apt install -y xfconf;
  78. apt install -y xfdesktop4;
  79. apt install -y xfwm4;
  80. apt install -y thunar;
  81. #
  82. ###############################################################################################################################
  83. # Suppléments #
  84. ###############
  85. apt install -y menulibre;
  86. apt install -y mugshot;
  87. apt install -y numlockx;
  88. #
  89. apt install -y xfce4-appmenu-plugin;
  90. apt install -y xfce4-dev-tools;
  91. apt install -y xfce4-pulseaudio-plugin;
  92. apt install -y xfce4-screenshooter;
  93. apt install -y xfce4-terminal;
  94. apt install -y xfce4-whiskermenu-plugin;
  95. #
  96. ###############################################################################################################################
  97. # Docklike #
  98. ############
  99. # Dependances
  100. apt install -y git;
  101. apt install -y build-essential;
  102. apt install -y libwnck-3-0 libwnck-3-dev;
  103. apt install -y libxfce4ui-2-dev;
  104. apt install -y libxfce4panel-2.0-4;
  105. apt install -y libxfce4panel-2.0-dev;
  106. #
  107. # Sources
  108. cd;
  109. rm -r /tmp/xfce4-docklike 2>/dev/null;
  110. git clone https://gitlab.xfce.org/panel-plugins/xfce4-docklike-plugin.git /tmp/xfce4-docklike;
  111. cd /tmp/xfce4-docklike;
  112. #
  113. # Correctif de langue Française
  114. sed -i '22  s/Épingler/Désépingler/'  /tmp/xfce4-docklike/po/fr.po;
  115. sed -i '177 s/Épingler/Désépingler/'  /tmp/xfce4-docklike/po/fr.po;
  116. sed -i '26  s/Désépingler/Épingler/'  /tmp/xfce4-docklike/po/fr.po;
  117. sed -i '190 s/Désépingler/Épingler/'  /tmp/xfce4-docklike/po/fr.po;
  118. #
  119. # Génération de la configuration
  120. ./autogen.sh --prefix=/usr;
  121. #
  122. # Compilation
  123. make -j$(nproc);
  124. #
  125. # Installation de DockLike TaskManager
  126. make install;
  127. #
  128. ###############################################################################################################################
  129. # Gestionnaire du Réseau #
  130. ##########################
  131. apt install -y network-manager;
  132. apt install -y network-manager-dev;
  133. apt install -y network-manager-gnome;
  134. apt install -y network-manager-config-connectivity-debian;
  135. #
  136. # Resolver est remis à zéro, donc je remet mon DNS
  137. echo "nameserver 192.168.0.1" > /etc/resolv.conf;
  138. #
  139. # Module
  140. apt install -y network-manager-openconnect;
  141. apt install -y network-manager-openconnect-gnome;
  142. apt install -y network-manager-openvpn;
  143. apt install -y network-manager-openvpn-gnome;
  144. apt install -y network-manager-pptp;
  145. apt install -y network-manager-pptp-gnome;
  146. apt install -y network-manager-ssh;
  147. apt install -y network-manager-ssh-gnome;
  148. apt install -y network-manager-sstp;
  149. apt install -y network-manager-sstp-gnome;
  150. #
  151. ###############################################################################################################################
  152. # PulseAudio #
  153. ##############
  154. # Paquet
  155. apt install -y pulseaudio;
  156. #
  157. # Fix Gresillement (materiel)
  158. sed -i -e "s/load\-module module\-udev\-detect/load\-module module\-udev\-detect tsched\=0/g" /etc/pulse/default.pa;
  159. #
  160. # Mise à jour des modules
  161. update-initramfs -u;
  162. #
  163. # Applet
  164. apt install -y pavucontrol;
  165. #
  166. ###############################################################################################################################
  167. # Pilotes #
  168. ###########
  169. #
  170. # CPU AMD
  171. apt install amd64-microcode;
  172. #
  173. # GPU AMD RX 6700
  174. apt install firmware-amd-graphics;
  175. #
  176. # Intel HD Audio
  177. apt install firmware-intel-sound;
  178. #
  179. ###############################################################################################################################
  180. # Utilitaires #
  181. ###############
  182. apt install -y apt-file;
  183. apt install -y apt-transport-https;
  184. apt install -y bash-completion;
  185. apt install -y ca-certificates;
  186. apt install -y cifs-utils;
  187. apt install -y curl;
  188. apt install -y lsb-release;
  189. apt install -y man;
  190. apt install -y neofetch;
  191. apt install -y net-tools
  192. apt install -y ntfs-3g;
  193. apt install -y openssh-server;
  194. apt install -y smbclient;
  195. apt install -y software-properties-common;
  196. apt install -y unzip;
  197. apt install -y wget;
  198. #
  199. ###############################################################################################################################
  200. # Complements #
  201. ###############
  202. #
  203. # Outil pour compilation
  204. apt install -y build-essential;
  205. apt install -y linux-headers-$(uname -r);
  206. #
  207. # Decouverte reseau
  208. apt install -y avahi-discover;
  209. apt install -y avahi-daemon;
  210. apt install -y avahi-utils;
  211. apt install -y avahi-ui-utils;
  212. #
  213.  
  214. #
  215. ###############################################################################################################################
  216. # Logiciels #
  217. #############
  218. #
  219. # Terminal
  220. apt install -y gnome-terminal;
  221. #
  222. # Anydesk
  223. VERSION=anydesk_6.3.0-1_amd64.deb
  224. wget https://download.anydesk.com/linux/${VERSION} -O /tmp/anydesk.deb; dpkg -i /tmp/anydesk.deb; apt install -y -f;
  225. #
  226. # Coffre-Fort
  227. apt install -y seahorse;
  228. #
  229. # Client Torrent
  230. apt install -y qbittorrent;
  231. #
  232. # Editeur de texte
  233. apt install -y gedit;
  234. #
  235. # Editeur / Visualisateur d'image
  236. apt install -y krita krita-l10n;
  237. apt install -y ristretto;
  238. #
  239. # Gestion Disque
  240. apt install -y gnome-disk-utility;
  241. apt install -y gparted;
  242. #
  243. # Gestions des partages
  244. apt install -y gnome-system-tools;
  245. #
  246. # Gestion d'archives
  247. apt install -y file-roller;
  248. #
  249. # Gnome
  250. apt install -y gnome-calculator;
  251. apt install -y gnome-calendar;
  252. #
  253. # Lecteur Video
  254. apt install -y mplayer;
  255. apt install -y smplayer;
  256. #
  257. # Lecteur Musique
  258. apt install -y rhythmbox;
  259. apt install -y rhythmbox-plugins;
  260. #
  261. # Magasin de logiciels
  262. apt install -y gnome-software;
  263. apt install -y synaptic;
  264. #
  265. # Navigateur
  266. curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor |  tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null;
  267. echo 'deb [signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' |  tee /etc/apt/sources.list.d/microsoft-edge.list; apt update; apt install -y microsoft-edge-stable;
  268. #
  269. # Sauvegarde / Restauration
  270. apt install -y timeshift;
  271. #
  272. # Suite bureautique
  273. apt install -y libreoffice libreoffice-l10n-fr;
  274. #
  275. ###############################################################################################################################
  276. # Personnalisation #
  277. ####################
  278. # Base
  279. apt install -y gtk2-engines;
  280. apt install -y gtk2-engines-murrine;
  281. #
  282. # Curseur de souris
  283. apt install -y breeze-cursor-theme;
  284. apt install -y chameleon-cursor-theme;
  285. apt install -y dmz-cursor-theme;
  286. apt install -y xcursor-themes;
  287. #
  288. # Fond D'écran
  289. rm -r /tmp/wallpaper 2>/dev/null;
  290. git clone https://github.com/dracula/wallpaper.git /tmp/wallpaper; mkdir -p /home/$(id -n -u 1000)/Images/Dracula; mv /tmp/wallpaper/*  /home/$(id -n -u 1000)/Images/Dracula; chown -R $(id -n -u 1000):$(id -n -g 1000) /home/$(id -n -u 1000)/Images;
  291. #
  292. # Icônes
  293. apt install -y papirus-icon-theme;
  294. wget https://github.com/dracula/gtk/files/5214870/Dracula.zip -O /tmp/Dracula_icon.zip; unzip /tmp/Dracula_icon.zip -d /usr/share/icons;
  295. #
  296. # Thèmes
  297. wget https://github.com/dracula/gtk/archive/master.zip -O /tmp/Dracula_theme.zip; unzip /tmp/Dracula_theme.zip -d /usr/share/themes; mv /usr/share/themes/gtk-master /usr/share/themes/Dracula;
  298. #
  299. # Thèmes - XFCE Terminal
  300. git clone https://github.com/dracula/xfce4-terminal /tmp/xfce-terminal; cd /tmp/xfce-terminal; mv *.theme /usr/share/xfce4/terminal/colorschemes;
  301. #
  302. ###############################################################################################################################
  303. # Monter partages - USER SCRIPT #
  304. #################################
  305.  
  306. echo "SERVEUR=XXXX.YYYYY
  307. UTILISATEUR=MONUSER
  308. PASS=MONPASSW
  309. PARTAGE1=Download
  310. PARTAGE2=Media_1
  311. PARTAGE3=Media_2
  312. PARTAGE4=Music
  313. PARTAGE5=Users
  314. PARTAGE6=Windows
  315.  
  316. (echo \"\$UTILISATEUR\"; echo "WORKGROUP"; echo \"\$PASS\" ) | gio mount smb://\$SERVEUR/\$PARTAGE1;
  317. (echo \"\$UTILISATEUR\"; echo "WORKGROUP"; echo \"\$PASS\" ) | gio mount smb://\$SERVEUR/\$PARTAGE2;
  318. (echo \"\$UTILISATEUR\"; echo "WORKGROUP"; echo \"\$PASS\" ) | gio mount smb://\$SERVEUR/\$PARTAGE3;
  319. (echo \"\$UTILISATEUR\"; echo "WORKGROUP"; echo \"\$PASS\" ) | gio mount smb://\$SERVEUR/\$PARTAGE4;
  320. (echo \"\$UTILISATEUR\"; echo "WORKGROUP"; echo \"\$PASS\" ) | gio mount smb://\$SERVEUR/\$PARTAGE5;
  321. (echo \"\$UTILISATEUR\"; echo "WORKGROUP"; echo \"\$PASS\" ) | gio mount smb://\$SERVEUR/\$PARTAGE6;" > $HOME/.gvfs.sh;
  322. chmod 770 $HOME/.gvfs.sh;
  323. #
  324. ###############################################################################################################################
  325. # Session #
  326. ###########
  327. # L'utilisateur XXXX démarre le script $HOME/.gvfs.sh; et permet l'accès au partage !
  328. # Il a tout les droits sur le partage (RWX)
Add Comment
Please, Sign In to add comment