Outils pour utilisateurs

Outils du site


issue102:tutoriel_3

The best way to be secure on your computer is to control what is installed on it. For the most control, I would suggest starting off with an Ubuntu Minimal Install and build upon that. I chose Ubuntu because it (and its derivatives… like LinuxMint) is (in my opinion) the most user-friendly Linux distro out there. It is very easy to get support from the forums; the repositories contain most of the useful software; new repositories/PPA's are easy to add; you can install via .deb files (akin to M$ .exe/.msi files); you can easily create the flavor you want, AND they offer a Minimal Install disk containing a very base system you can build on. The Minimal Install does not put ANYTHING on the disk except what is required to boot and use the base system. There are no music players, office suites, picture viewers, etc… Heck, there isn't even a desktop or graphical login. It is command-line only. HOWEVER, this can EASILY be changed. You add what you want. I have spent a very long time compiling this information, testing it out, etc, and have decided to put it all together as a *buntu Minimal Install Guide. Why the “*” in front of “buntu”? Because you can turn the Minimal Install into any flavor of “buntu” you want. You can create a “homebrew”, Xubuntu, Lubuntu, Kubuntu, Openbox, etc.

La meilleure façon de sécuriser son ordinateur est de contrôler ce qu'on installe dedans. Pour une excellente maîtrise, je vous propose de démarrer avec « Ubuntu Minimal Install » (Installation minimale d'Ubuntu), puis de l'étoffer.

J'ai choisi Ubuntu parce qu'elle est (elle et ses dérivées… comme LinuxMint) la distribution actuelle la plus facile à utiliser (à mon avis). Il est aisé de trouver de l'aide sur les forums ; les dépôts contiennent la plupart des logiciels utiles ; l'ajout de nouveaux dépôts /PPA est simple ; vous pouvez installer via les fichiers .deb (équivalents des fichiers .exe/.msi de Microsoft) ; vous pouvez facilement créer la saveur que vous souhaitez, ET il existe un disque d'installation minimale contenant un système très basique que vous pouvez étendre.

L'installation minimale ne contient sur le disque que ce qui est nécessaire au démarrage et à l'utilisation du système de base. Il n'y a ni lecteur audio, ni suite bureautique, ni lecteur d'images, etc. Plus encore, il n'y a même pas de bureau ou de page d'accueil graphique. Elle est uniquement en ligne de commande. CEPENDANT, ceci peut être FACILEMENT modifié. Vous ajoutez ce que vous voulez.

J'ai passé vraiment beaucoup de temps à rassembler toute cette information, à la vérifier, etc., et j'ai décidé de la regrouper dans un Guide d'installation minimale d'*buntu (*buntu Minimal Install Guide). Pourquoi une « * » au début de « buntu » ? Parce que vous pouvez orienter l'installation minimale vers le parfum que vous voulez. Vous pouvez créer votre « propre jus », Xubuntu, Lubuntu, Kubuntu, Openbox, etc.

For this guide, I am going to show you how to do a Minimal Xubuntu Install. If you want something else, this guide will still be of use to you, and then you can alter what I have listed below in the customization section. You can download the Mini ISO from here: https://help.ubuntu.com/community/Installation/MinimalCD Get a list and description of the packages on Mini.iso (Ubuntu 15.04) here: http://packages.ubuntu.com/vivid/ubuntu-minimal To see what packages are included as the Depends for Xubuntu, you can use this command: apt-cache show xubuntu-desktop | grep “Depends” To see what packages are used as Recommends for Xubuntu, you can use this command: apt-cache show xubuntu-desktop | grep “Recommends”

Pour ce guide, je vais vous montrer comment faire une installation minimale de Xubuntu. Si vous voulez quelque chose d'autre, vous pourrez toujours utiliser le guide en remplaçant ce que j'ai listé plus loin dans le chapitre sur la personnalisation.

Vous pouvez télécharger la Mini Iso ici : https://help.ubuntu.com/community/Installation/MinimalCD

Vous trouverez une liste avec description des paquets de la Mini Iso (Ubuntu 15.04) ici : http://packages.ubuntu.com/vivid/ubuntu-minimal

Pour voir quels paquets sont inclus dans les dépendances (Depends) de Xubuntu, vous pouvez utiliser la commande :

apt-cache show xubuntu-desktop | grep “Depends”

Pour voir les paquets recommandés (Recommends) pour Xubuntu, vous pouvez utiliser cette commande :

apt-cache show xubuntu-desktop | grep “Recommends”

Creating the Base System Either burn the ISO to disk, or use Unetbootin to create a bootable USB thumbdrive. Make sure your computer is connected to the Internet via an Ethernet cable. Boot to the minimal install disk and choose “Install”. Note: the “Tab” key will cycle through answers, and “Enter” will select the answer you have highlighted. In some areas, you can use the left/right arrow keys to choose between “Yes”, “No”, and “Go Back”. Choose your language, territory, and keyboard layout at the prompts. Name your computer.

Créer le système de base

Soit vous gravez l'ISO sur un CD, soit vous utilisez Unetbootin pour créer une clé USB de démarrage.

Assurez-vous que votre ordinateur est relié à Internet par un câble Ethernet.

Démarrez le disque de l'installation minimale et choisissez « Install » (installer). Note : La touche « Tab » fait défiler les différentes possibilités et « Entrée » sélectionne la réponse que vous avez surlignée. Dans certains cas, vous pouvez utiliser les touches des flèches droite et gauche pour choisir « Oui », « Non » ou « Revenir en arrière ». Lorsqu'on vous le demande, choisissez votre langue, votre pays et l'agencement du clavier.

Donnez un nom à votre ordinateur.

Choose the Mirror (simply select your country if possible). Set proxy (or leave blank if none are needed). This is a net install, so it will then begin downloading components to install. Fill in the name you want to use. Choose your username. For security purposes, you can choose a username other than your first name. Think about it, half of logging into your computer is knowing the username. The other half, of course, is knowing the password. Choose your password. I like to make my passwords something I can remember, but are not easy to guess or emulate. For example, I might pick a phrase like: “I hate Mondays”, but will change it so that, even if someone knows you hate Mondays, they will have a hard time figuring out how you did your password. “I hate Mondays” can turn into “Ih@3m0nd&z”. This way you are using (no repeat) numbers, letters, symbols, and capitalization for your password. You are then given a choice to encrypt your Home directory. I would say yes… this way, if anyone boots to a live CD on your system; takes your drive; etc. they will not be able to access your files in your Home Folder without finding a way to decrypt it.

Choisissez le miroir (si possible, sélectionnez votre propre pays).

Sélectionnez le proxy (ou laissez vide si vous n'en avez pas besoin).

Comme c'est une installation par le réseau, ça commence par un téléchargement des composants à installer.

Saisissez le nom que vous voulez utiliser.

Choisissez votre nom d'utilisateur. Pour des raisons de sécurité, vous pouvez choisir un nom d'utilisateur différent de votre prénom. Pensez que votre nom d'utilisateur représente la moitié de l'information d'accès à votre ordinateur. L'autre moitié, bien sûr, c'est le mot de passe.

Choisissez votre mot de passe. J'aime créer des mots de passe dont je peux me souvenir, mais qui ne sont pas faciles à deviner ou à imiter. Je pourrais prendre une phrase comme « Je hais les lundis », mais en la transformant de sorte que, même si quelqu'un sait que vous détestez les lundis, il passera un sacré bout de temps pour trouver comment vous avez défini votre mot de passe. « Je hais les lundis » peut être transformé en « je-@isL&10dis » [Ndt : Attention ; la création du mot de passe se fera avec une disposition « Qwerty » du clavier !]. De cette façon, vous utilisez (sans répétition) des nombres, des lettres, des symboles et une majuscule.

Ensuite, la possibilité de crypter votre répertoire personnel vous est proposée. Moi, je répondrais oui… De cette façon, si quelqu'un démarre votre système à partir d'un CD, prend votre disque dur, etc., il ne sera pas capable d'accéder aux fichiers dans votre dossier personnel sans trouver comment le décrypter.

Confirm or change your timezone. NOTE: At this point, prior to moving on, you may remove your USB thumbdrive. The reason you may wish to do this, is because there are occasions in which Grub gets written to the thumbdrive instead of the hard drive. If you hit enter and moved on to “Partition Disks”, you can “Go Back” to the timezone, remove your USB thumbdrive, and proceed. If you continued the installation with the USB thumbdrive still connected, and Grub was written to the USB thumbdrive… don't worry, it is an easy fix that will be listed in “Troubleshooting” at the end of this Guide. Partition Disks: Unless you have other plans, I would choose “Guided – use entire disk and set up encrypted LVM”. This will encrypt the installation and require a passphrase in order to boot the computer. It will then ask you to select the disk (usually there is only one choice… unless you left in your USB thumbstick). You will then need to confirm the changes to be made. If you chose encrypted LVM, you will now need to provide a passphrase. I would do this in a similar fashion as I suggested above with the password. You will then be asked to change or confirm the amount to use for the guided partition. I would just select continue (unless you have other plans). You will then be asked to confirm the changes to be made.

Confirmez ou changez votre fuseau horaire.

NOTE : À ce stade, avant de poursuivre, vous pouvez retirer votre clé USB. La raison pour laquelle vous pouvez souhaiter le faire tient à ce que parfois Grub est écrit sur la clé au lieu du disque dur. Si vous avez apppuyé sur Entrée pour passer à la partition des disques, vous pouvez revenir en arrière au choix du fuseau horaire, enlever votre clé et continuer. Si vous continuez l'installation avec la clé USB toujours connectée, et que Grub est écrit sur votre clé USB, .. pas de panique, une solution simple est décrite dans la section « Résolution de problèmes » à la fin de ce guide.

Partition des disques : Sauf si vous avez d'autres idées, je choisirais « Assisté - utiliser tout un disque avec LVM chiffré ». Ceci cryptera l'installation et une phrase de passe sera nécessaire pour démarrer l'ordinateur.

Il vous sera demandé ensuite de choisir le disque (en général il n'y a qu'un choix… sauf si vous avez laissé votre clé USB branchée). Puis vous confirmerez les changements à réaliser.

Si vous avez choisi le LVM encrypté, vous devrez alors fournir une phrase de passe. Je le ferais de la même façon que pour le mot de passe.

Il vous sera demandé ensuite de changer ou de confirmer la quantité à utiliser dans le partitionnement guidé. Je sélectionnerais simplement Continuer, sauf si vous avez d'autres projets.

Vous devrez ensuite confirmer les changements à faire.

You will now need to choose how you want to manage upgrades to the system. I would NOT choose Landscape. Landscape is a proprietary web service. I generally choose “Install security updates automatically”, but you don't have to. Next, you will be asked to make a software selection. Here you can choose to install a full system, server, etc. The idea here is to do an install that you fully control, so DO NOT SELECT ANYTHING. Just skip it (choose “Continue”), and move on. You will then be asked to install the Grub Boot Loader to the MBR. Make sure it does not write to the USB thumbdrive (if you did not remove it), and choose “yes”. If it accidentally writes to the USB thumbdrive, we can fix it in the troubleshooting section. You will then be asked to confirm the UTC clock settings. You will then be prompted to remove any installation media and reboot.

Maintenant, choisissez la manière dont vous souhaitez faire les mises à niveau du système. Je NE choisirais PAS Landscape. Landscape est un service Web propriétaire. Je choisis en général « Installer les mises à jour de sécurité automatiquement » mais vous n'êtes pas obligé de le faire.

Ensuite, il vous est demandé de choisir des logiciels. Vous pouvez choisir ici d'installer un système complet, un serveur, etc. Comme notre idée de départ est d'installer un système que nous maîtrisons complètement, NE SELECTIONNEZ RIEN. Cliquez sur Continuer pour passer à la suite.

La question suivante concerne l'installation du programme de démarrage Grub sur le MBR. Assurez-vous qu'il ne sera pas écrit sur la clé USB (si vous ne l'avez pas retirée) et choisissez « Oui ». S'il est accidentellement écrit sur la clé USB, nous pourrons l'arranger dans la section de résolution des problèmes.

Ensuite, confirmez le réglage de l'horloge par rapport à l'heure universelle UTC.

À la suite de quoi, vous serez averti qu'il faudra retirer tout media d'installation avant de redémarrer.

Customizing the Installation Here is where we are going to make your system shine the way you want it. Here you can create the desktop you want with the programs you want. As stated earlier, I will be setting up a Minimal Xubuntu system. You can alter this as you get to the appropriate parts of this customization. After rebooting, You will be brought to the command-line login prompt. Put in your credentials and log in. At this point you have a couple of options on how you wish to proceed. You can: • Hand-type in all of the commands. • Run a script. (I will provide a way for you to get a script in the script section). • Copy and paste the commands. NOTE: your best bet is to use a pre-made script (discussed in the Script section).

Personnaliser l'installation

A partir d'ici, nous allons donner à votre système le brillant qui vous est propre. Ici, vous pouvez créer le bureau que vous voulez avec les programmes que vous voulez. Comme indiqué précédemment, je vais préparer une installation minimale Xubuntu. Vous pouvez apporter des modifications selon vos souhaits dans les parties idoines de cette personnalisation.

Après avoir redémarré, vous atteindrez la demande d'accès en ligne de commande. Saisissez vos références et connectez-vous. Arrivé à ce stade, vous avez plusieurs options sur la manière de procéder.

Vous pouvez : • taper manuellement toutes les commandes ; • lancer un script (je vous indique la façon de créer un script dans la section des scripts) ; • copier/coller les commandes.

NOTE : Votre meilleur choix est d'utiliser un script préfabriqué (présenté dans la section des scripts).

The problem with options “2” and “3” above, is that you have no ability at this point to access a text file or script. In order to do this, you are going to have to mount a USB thumbdrive. The trick at this point though is… it will not auto-mount. No worries. If you want to mount a USB thumbdrive, do the following: Plug in the USB thumbdrive. Type in the command: sudo fdisk -l NOTE: You are looking for a partition like “/dev/sdb1”, remember what it is called (most likely “/dev/sdb1”). Create a mount point: sudo mkdir /media/usb Mount the USB thumbdirve: sudo mount /dev/sdb1 /media/usb

Le problème avec les options « 2 » et « 3 », c'est que vous n'avez pas encore la possibilité d'accéder à un fichier texte ou à un script. Pour le faire, vous allez brancher une clé USB. Le piège, c'est qu'ici… elle ne montera pas automatiquement. Pas d'inquiétude. Si vous voulez monter une clé USB, faites comme suit :

Branchez votre clé USB.

Tapez la commande :

sudo fdisk -l

NOTE : Vous cherchez une partition comme « /dev/sdb1 » ; mémorisez son nom (la plupart du temps « /dev/sdb1 »).

Créez un point de montage :

sudo mkdir /media/usb

Montez la clé USB :

sudo mount /dev/sdb1 /media/usb

Change to the USB directory: cd /media/usb You can now list the files contained there by typing in: ls You can now run any “sh” script with the command: sh filename.sh (replacing “filename” with the name of your .sh file. If you choose the copy/paste method, you may run into some issues… however, “nano” is installed by default. To edit a text file, you would use the command “nano filename” (without the quotes, replacing “filename” with the name of the file).

Changez pour le répertoire USB :

cd /media/usb

Vous pouvez lister les fichiers qu'il contient en tapant : ls

Vous pouvez maintenant lancer n'importe quel script « sh » avec la commande : sh nomdefichier.sh (en remplaçant « nomdefichier » par le nom de votre fichier .sh).

Si vous choisissez la solution du copier/coller, vous pouvez avoir quelques problèmes… cependant, « nano » est installé par défaut. Pour éditer un fichier texte, vous pouvez utiliser la commande « nano nomdefichier » (sans les guillemets, en remplaçant « nomdefichier » par le nom de votre fichier).

When you are done with the USB thumbstick, you can unmount it with the command: sudo umount /media/usb Here is the step-by-step commands we are going to use (refer to the Script section for automating this process): NOTE: There are a couple of ways you can install from the command-line. Each one has its lovers and haters. Each one has its perks and disadvantages. They are as follows: sudo apt-get install –install-recommends packagename This installs a package and all of its recommends. This may install a large amount of files, some of which you may not need.

Quand vous n'avez plus besoin de la clé USB, vous pouvez la démonter avec la commande :

sudo umount /media/usb

Voici les commandes pas à pas que nous allons utiliser (référez-vous à la section des scripts pour automatiser le processus) :

NOTE : Il y a plusieurs façons possibles pour une installation en ligne de commande. Chacune a ses amateurs et ses détracteurs. Chacune a ses avantages et ses inconvénients.

Voici quelques possibilités :

sudo apt-get install –install-recommends packagename

Ceci installe un paquet et toutes ses dépendances. Il se peut qu'un grand nombre de fichiers soient installés, y compris certains dont vous n'avez pas besoin.

sudo apt-get install –no-install-recommends packagename This installs the bare essentials of a package. It is a lighter install, but the program may not have the functionality you expect. You can see what requirements or recommends a package may be missing by using the command: apt-cache show packagename sudo apt-get install packagename This is the standard method of installing packages, suggested packages will be listed, but not installed. For this guide, I am going to simply use this command (for most things): sudo apt-get install packagename If you wish to do otherwise, you are free to do so.

sudo apt-get install –no-install-recommends packagename

Ici, seul le squelette du paquet sera installé. L'installation est plus légère, mais le programme peut ne pas fonctionner comme prévu. Vous pouvez voir quelles sont les exigences ou les recommandations manquantes pour un paquet en utilisant la commande : apt-cache show packagename :

sudo apt-get install packagename

C'est la méthode standard pour installer des paquets ; les paquets suggérés seront listés mais non installés.

Pour ce guide, je vais utiliser simplement cette commande (pour la plupart des choses) : sudo apt-get install packagename

Si vous souhaitez faire autrement, libre à vous.

Customizing the System (Part 1) The packages you decide to use can be based upon your desire for security, minimal footprint (uses less computer resources), etc. I am choosing these packages due to functionality, small footprint, customization abilities, and security. The Beginning: The first thing we need to do is update the Repositories with the command: sudo apt-get -y –force-yes update && sudo apt-get -y –force-yes upgrade The second thing we need to do is install the Depends. Warning (1): I ran into a few issues during test installs. I believe I narrowed down the problems. One of the problems was that the package “ubuntu-extras-keyring” could not be found. Watch for this while running a script, as it will cause an error where the Depends will not install. I read a few posts saying that “ubuntu-extras-keyring” has been removed from the core install. It is listed in the Depends below, but it might be advisable to remove it from the install (I removed it in the Scripts section below).

Personnaliser le système (partie 1)

Les paquets que vous décidez d'utiliser peuvent être basés, selon vos désirs, sur la sécurité, l'empreinte minimum (pour utiliser moins de ressources système), etc. Je choisis les paquets ci-après pour leur fonctionnalité, une petite empreinte, des possibilités de personnalisation et la sécurité.

Le début : La première chose à faire est de mettre à jour les dépôts avec la commande :

sudo apt-get -y –force-yes update && sudo apt-get -y –force-yes upgrade

La deuxième est d'installer les dépendances :

Avertissement (1) : Je suis tombé sur quelques os pendant les tests d'installation. Je crois que j'en ai limité les effets. Un des problèmes était que le paquet « ubuntu-extras-keyring » était introuvable. Soyez à l'affut de cela pendant le déroulement d'un script, car il cause une erreur qui empêche l'installation des dépendances. J'ai lu quelques avis disant que « ubuntu-extras-keyring » avait été retiré de l'installation de base. Il est listé dans les dépendances ci-dessous, mais il peut être judicieux de le retirer de l'installation (je l'ai enlevé dans la section des scripts).

Warning (2): Another issue I had was related to policykit-1 and dpkg. I believe I resolved it by adding “policykit-1” to the Depends install (which was not listed in the official, original list of Depends). It is my understanding that you can install the Depends a couple of ways, but I have not tested Method 1: Method 1: (not tested, but should work) Type in the command: sudo apt-get install –no-install-recommends xubuntu-desktop This supposedly installs only the Xubuntu Desktop (you can substitute “ubuntu-desktop” or “lubuntu-desktop” for “xubuntu-desktop”)

Avertissement (2) : Un autre problème rencontré concernait policykit-1 et dpkg. Je crois l'avoir résolu en ajoutant policykit-1 dans l'installation des dépendances (alors qu'il n'est pas listé dans la liste officielle et originale des dépendances).

Suivant ce que j'ai compris, vous pouvez installer les dépendances de plusieurs manières, mais je n'ai pas testé la méthode 1 :

Méthode 1 (non testée, mais devrait fonctionner) :

Tapez la commande :

sudo apt-get install –no-install-recommends xubuntu-desktop

Cela est censé n'installer que le bureau Xubuntu (vous pouvez remplacer « xubuntu-desktop » par « ubuntu-desktop » ou « lubuntu-desktop »).

Method 2: (the one I tested and know works) First, let's install Policykit 1 to make everything else work more smoothly: sudo apt-get install policykit-1 To install the Depends, Type the Command: sudo apt-get install alsa-base alsa-utils anacron bc ca-certificates dmz-cursor-theme doc-base foomatic-db-compressed-ppds genisoimage ghostscript-x gtk2-engines-pixbuf inputattach language-selector-gnome libasound2-plugins libpam-systemd libsasl2-modules libxp6 memtest86+ openprinting-ppds pm-utils printer-driver-pnm2ppa rfkill software-properties-gtk ubuntu-drivers-common ubuntu-extras-keyring update-manager wireless-tools wpasupplicant xdg-user-dirs xdg-user-dirs-gtk xkb-data xorg zenity My suggestion is that you actually use all of the Depends (except “ubuntu-extras-keyring”)… but if you feel you can leave some out, so be it.

Méthode 2 (je l'ai testée et je sais qu'elle fonctionne) :

D'abord, installez Policykit-1 pour être sûr que tout se passe en douceur.

sudo apt-get install policykit-1

Pour installer les dépendances, tapez la commande :

sudo apt-get install alsa-base alsa-utils anacron bc ca-certificates dmz-cursor-theme doc-base foomatic-db-compressed-ppds genisoimage ghostscript-x gtk2-engines-pixbuf inputattach language-selector-gnome libasound2-plugins libpam-systemd libsasl2-modules libxp6 memtest86+ openprinting-ppds pm-utils printer-driver-pnm2ppa rfkill software-properties-gtk ubuntu-drivers-common ubuntu-extras-keyring update-manager wireless-tools wpasupplicant xdg-user-dirs xdg-user-dirs-gtk xkb-data xorg zenity

Je vous suggère d'utiliser toutes les dépendances (sauf « ubuntu-extras-keyring »)… mais si vous voulez en enlever, faites-le.

The Recommends How you want to handle the Recommends is up to you, but I think there is quite a bit of room to trim the fat here (which I already have done to a degree). In the list below, I removed Recommended Packages (like “abiword”, “gnumeric”, etc), and moved others (like “catfish”, and “blueman”, etc) to another section, to make it easier for you to have a system that is 100% bare-bones if you want it, or full of every bell and whistle you desire. I have divided the Recommends into what I believe are your Basic Recommends and your Other Recommends. The Basic Recommends will provide the functionality you may be used to, and the Other Recommends can probably be left out without much grief (if you decide you want them, that's cool too).

Les recommandés

La façon de gérer les recommandés vous est propre, mais je pense qu'il y a un peu de place pour enlever du « gras » (ce que j'ai déjà fait en partie). Dans la liste ci-dessous, j'ai enlevé les paquets recommandés (comme « abiword », « gnumeric », etc.), et déplacé d'autres (comme « catfish », « blueman », etc.) dans une section différente, pour vous rendre plus facile la réalisation d'un système squelettique si vous le voulez, ou avec tout le bazar que vous puissiez désirer.

J'ai divisé les recommandés entre ce que je pense être les recommandés de base et les autres recommandés. Les recommandés de base apporteront la fonctionnalité dont vous avez l'habitude, et les autres recommandés peuvent probablement être laissés de côté sans trop de soucis (si vous décidez que vous les voulez, c'est bien aussi).

Basic Recommends Note: I added gdebi, aptitude, and synaptic to this list for better package support. sudo apt-get install acpi-support app-install-data-partner apport-gtk apt-offline avahi-autoipd avahi-daemon desktop-file-utils gdebi gvfs-backends gvfs-fuse im-config kerneloops-daemon laptop-detect libnotify-bin libnss-mdns libpam-gnome-keyring libxfce4ui-utils policykit-desktop-privileges pcmciautils aptitude synaptic software-center update-notifier whoopsie xcursor-themes xdg-utils Other Recommends sudo apt-get install espeak fonts-droid fonts-liberation fonts-opensymbol gcc speech-dispatcher ttf-ubuntu-font-family light-locker light-locker-settings make mugshot xubuntu-community-wallpapers xubuntu-docs xubuntu-icon-theme Note: You can use “xscreensaver xscreensaver-gl-extra xscreensaver-data-extra xscreensaver-screensaver-bsod” instead of “light-locker light-locker-settings” which is lightdm dependent.

Les recommandés de base

Note : J'ai ajouté dgebi, aptitude et synaptic à la liste pour un meilleur support des paquets.

sudo apt-get install acpi-support app-install-data-partner apport-gtk apt-offline avahi-autoipd avahi-daemon desktop-file-utils gdebi gvfs-backends gvfs-fuse im-config kerneloops-daemon laptop-detect libnotify-bin libnss-mdns libpam-gnome-keyring libxfce4ui-utils policykit-desktop-privileges pcmciautils aptitude synaptic software-center update-notifier whoopsie xcursor-themes xdg-utils

Autres recommandés

sudo apt-get install espeak fonts-droid fonts-liberation fonts-opensymbol gcc speech-dispatcher ttf-ubuntu-font-family light-locker light-locker-settings make mugshot xubuntu-community-wallpapers xubuntu-docs xubuntu-icon-theme

Note : vous pouvez utiliser « xscreensaver xscreensaver-gl-extra xscreensaver-data-extra xscreensaver-screensaver-bsod » à la place de « light-locker light-locker-settings » qui sont dépendants de lightdm.

Summary so far At this point, you will have a command-line OS installed on your system. There are no programs to speak of… no browser, no PDF viewer, no text program (aside from Nano), etc. Improving the System This is the point in which we will turn a very, very basic system into our workhorse. Keep in mind that you can alter most of the program options I list below. For example, instead of using xfce4-terminal for your terminal, you can use xterm, and so on. Most of the items below are optional, install only what you believe you want and will use. I am simply providing enough information so that people can build a fully functional system that they are generally accustomed to, without the bloat of a lot of programs they won't use.

En résumé, jusqu'ici

À ce stade, vous aurez installé sur votre système un OS en ligne de commande. Il n'y a presque pas de programmes, pas de navigateur Web, pas de visionneuse de PDF, pas de traitement de texte (à part nano), etc.

Améliorer le système

C'est maintenant que nous allons transformer un système très, très basique en cheval de trait. Gardez à l'esprit que vous pouvez modifier la plupart des options de programmes listées plus bas. Par exemple, à la place d'utiliser xfce4-terminal pour votre terminal, vous pouvez utiliser xterm, et ainsi de suite.

La plupart des éléments ci-dessous sont optionnels ; installez seulement ceux que vous pensez vouloir utiliser. J'ai simplement fourni assez d'informations pour que chacun construise un système complètement fonctionnel auquel il est déjà accoutumé, sans le surpoids de nombreux programmes non utilisés.

To Compile and Install from Source: sudo apt-get install build-essential checkinstall cvs subversion git-core mercurial automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev gcc Install Archive Management: sudo apt-get install unace rar unrar p7zip p7zip-full p7zip-rar sharutils uudeview mpack arj cabextract file-roller unzip zip Install a Terminal: sudo apt-get install xfce4-terminal pastebinit Install a Desktop Environment: sudo apt-get install fonts-dejavu-core fonts-freefont-ttf xfce4-appfinder xfce4-notifyd xfce4-panel xfce4-session xfce4-settings xfdesktop4 xfwm4 xubuntu-artwork xubuntu-default-settings xfce4-power-manager

Compiler et installer à partir des sources :

sudo apt-get install build-essential checkinstall cvs subversion git-core mercurial automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev gcc

Installer le gestionnaire d'archives :

sudo apt-get install unace rar unrar p7zip p7zip-full p7zip-rar sharutils uudeview mpack arj cabextract file-roller unzip zip

Installer un terminal

sudo apt-get install xfce4-terminal pastebinit

Installer un environnement de bureau :

sudo apt-get install fonts-dejavu-core fonts-freefont-ttf xfce4-appfinder xfce4-notifyd xfce4-panel xfce4-session xfce4-settings xfdesktop4 xfwm4 xubuntu-artwork xubuntu-default-settings xfce4-power-manager

Install Desktop Environment Plug-ins: sudo apt-get install xfce4-cpugraph-plugin xfce4-dict xfce4-indicator-plugin xfce4-mailwatch-plugin xfce4-netload-plugin xfce4-notes-plugin xfce4-places-plugin xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-systemload-plugin xfce4-taskmanager xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin indicator-application indicator-messages indicator-power indicator-sound Install File Management: sudo apt-get install catfish gigolo thunar thunar-volman tumbler thunar-archive-plugin thunar-media-tags-plugin menulibre Install a Desktop Manager (for a Graphical Logon): sudo apt-get install lightdm lightdm-gtk-greeter Install Print Capabilities: sudo apt-get install cups cups-bsd cups-client cups-filters printer-driver-c2esp printer-driver-foo2zjs printer-driver-min12xxw printer-driver-ptouch printer-driver-pxljr printer-driver-sag-gdi printer-driver-splix simple-scan system-config-printer-gnome hplip

Installer les greffons de l'environnement de bureau :

sudo apt-get install xfce4-cpugraph-plugin xfce4-dict xfce4-indicator-plugin xfce4-mailwatch-plugin xfce4-netload-plugin xfce4-notes-plugin xfce4-places-plugin xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-systemload-plugin xfce4-taskmanager xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin indicator-application indicator-messages indicator-power indicator-sound

Installer un gestionnaire de fichiers :

sudo apt-get install catfish gigolo thunar thunar-volman tumbler thunar-archive-plugin thunar-media-tags-plugin menulibre

Installer un gestionnaire du bureau (pour un accès graphique) :

sudo apt-get install lightdm lightdm-gtk-greeter

Installer les capacités d'impression :

sudo apt-get install cups cups-bsd cups-client cups-filters printer-driver-c2esp printer-driver-foo2zjs printer-driver-min12xxw printer-driver-ptouch printer-driver-pxljr printer-driver-sag-gdi printer-driver-splix simple-scan system-config-printer-gnome hplip

Install Bluetooth: sudo apt-get install blueman bluez bluez-alsa bluez-cups Install Networking Tools: sudo apt-get install network-manager-gnome network-manager-pptp network-manager-pptp-gnome Enhance Sound Capabilities: sudo apt-get install gstreamer0.10-plugins-base-apps gstreamer0.10-pulseaudio pavucontrol Install Basic Utilities: sudo apt-get install gnome-system-tools gtk-theme-config gucharmap

Installer Bluetooth :

sudo apt-get install blueman bluez bluez-alsa bluez-cups

Installer les outils de réseau :

sudo apt-get install network-manager-gnome network-manager-pptp network-manager-pptp-gnome

Améliorer les capacités sonores :

sudo apt-get install gstreamer0.10-plugins-base-apps gstreamer0.10-pulseaudio pavucontrol

Installer les utilitaires de base :

sudo apt-get install gnome-system-tools gtk-theme-config gucharmap

Install a Browser: sudo apt-get install firefox firefox-locale-en xul-ext-ubufox NOTE: If you want to watch Netflix, you will need to install Chromium (or Google Chrome) sudo apt-get install chromium-browser Install Conky: sudo apt-get install conky-all curl lm-sensors hddtemp

Installer un navigateur Web :

sudo apt-get install firefox firefox-locale-en xul-ext-ubufox

Note : Si vous voulez regarder Netflix, vous aurez besoin d'installer Chromium (ou Google Chrome).

sudo apt-get install chromium-browser

Installer Conky :

sudo apt-get install conky-all curl lm-sensors hddtemp

If you have a laptop, you may be interested in enhanced power management via TLP. You may also be interested in a great encryption program called VeraCrypt that was forked from TrueCrypt. There is also a nice password vault called Keypass2. If you are interested in these programs, you will want to add the following PPA's: sudo apt-add-repository -y ppa:linrunner/tlp sudo add-apt-repository ppa:unit193/encryption sudo apt-add-repository ppa:jtaylor/keepass You will then want to update the repositories: sudo apt-get -y –force-yes update && sudo apt-get -y –force-yes upgrade

Si vous avez un portable, vous pourrez être intéressé par une gestion d'alimentation améliorée via TLP. Vous pourriez aussi être intéressé par un programme de chiffrage appelé Veracrypt qui est un fork de Truecrypt. Il y a aussi un bon petit coffre-fort de mots de passe appelé Keepass2. Si ces programmes vous intéressent, vous devez ajouter les PPA suivants :

sudo apt-add-repository -y ppa:linrunner/tlp

sudo add-apt-repository ppa:unit193/encryption

sudo apt-add-repository ppa:jtaylor/keepass

Vous voudrez ensuite mettre à jour les dépôts :

sudo apt-get -y –force-yes update && sudo apt-get -y –force-yes upgrade

Install Basic Applications: NOTE: The following applications cover security, encryption, passwords, basic functionality, etc. sudo apt-get install gnome-calculator rsync grsync seahorse gufw parcellite unetbootin extlinux filezilla veracrypt leafpad xfburn gparted gmountiso keepass2 deluge tlp tlp-rdw Install Other Applications: sudo apt-get install mousepad libreoffice-calc libreoffice-pdfimport libreoffice-writer libreoffice-gtk pinta vlc evince ristretto orage thunderbird Install Media Codecs, DVD Playback, and (if you desire) Java and Flash: sudo apt-get install flashplugin-installer openjdk-8-jdk ffmpeg gstreamer0.10-plugins-bad lame libdvdread4 libavcodec-extra gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-ugly gstreamer1.0-fluendo-mp3 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libavcodec-ffmpeg-extra56 gstreamer0.10-plugins-bad-multiverse libav-tools chromium-codecs-ffmpeg-extra oxideqt-codecs-extra NOTE: A lot of this can be done via installing “ubuntu-restricted-extras”, but I wanted to give you more control.

Installer les applications de base :

NOTE : Les applications suivantes couvrent la sécurité, le chiffrage, les mots de passe, les fonctionnalités de base, etc.

sudo apt-get install gnome-calculator rsync grsync seahorse gufw parcellite unetbootin extlinux filezilla veracrypt leafpad xfburn gparted gmountiso keepass2 deluge tlp tlp-rdw

Installer d'autres applications :

sudo apt-get install mousepad libreoffice-calc libreoffice-pdfimport libreoffice-writer libreoffice-gtk pinta vlc evince ristretto orage thunderbird

Installer des codecs pour les médias, un lecteur de DVD, et (si vous le désirez) Java et Flash :

sudo apt-get install flashplugin-installer openjdk-8-jdk ffmpeg gstreamer0.10-plugins-bad lame libdvdread4 libavcodec-extra gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-ugly gstreamer1.0-fluendo-mp3 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libavcodec-ffmpeg-extra56 gstreamer0.10-plugins-bad-multiverse libav-tools chromium-codecs-ffmpeg-extra oxideqt-codecs-extra

NOTE : vous pouvez faire la même chose, ou presque, en installant « ubuntu-restricted-extras », mais je voulais vous donner plus de contrôle.

Note: as an option you can also install M$ Core Fonts via: sudo apt-get install ttf-mscorefonts-installer Clean Up the System: sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove Reboot the System After Reboot, you can then make some final configurations and enjoy your system.

Note : en option, vous pouvez aussi installer les polices principales de M$ via :

sudo apt-get install ttf-mscorefonts-installer

Nettoyer le système :

sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove

Redémarrez le système.

Après le redémarrage, vous pouvez faire quelques réglages supplémentaire et profiter de votre système.

Summary so far You now have a full-fledged, working system. We can now move on to some last minute tweaks and customization. Once you are booted up to your nice, new desktop, you will need to open the terminal and then we can finish up. Enable DVD Playback: sudo /usr/share/doc/libdvdread4/install-css.sh Start TLP for Laptops: sudo tlp start Make a Directory for Adding Fonts: (Just place new fonts in this folder and they will be available to you) mkdir ~/.fonts

En résumé jusqu'ici

Vous avez maintenant un véritable système opérationnel. Nous pouvons passer à des réglages de dernière minute et à la personnalisation. Une fois que vous aurez redémarré sur votre nouveau et superbe bureau, vous devez ouvrir un terminal pour parfaire votre installation.

Activer la lecture des DVD :

sudo /usr/share/doc/libdvdread4/install-css.sh

Démarrer TLP pour les portables :

sudo tlp start

Créer un répertoire pour les polices additionnelles (placez simplement les nouvelles polices dans ce dossier et elles seront à votre disposition) :

mkdir ~/.fonts

Create a Directory for Source Compiling: sudo chown $USER /usr/local/src sudo chmod u+rwx /usr/local/src Copy Files: NOTE: You will want to edit the copied .conkyrc file, not the original. cp /etc/conky/conky.conf ~/.conkyrc Activate Sensors for Conky: sudo sensors-detect sudo service kmod start sudo chmod u+s /usr/sbin/hddtemp

Créer un répertoire pour la compilation des sources :

sudo chown $USER /usr/local/src

sudo chmod u+rwx /usr/local/src

Copier des fichiers :

NOTE : Vous éditerez la copie du fichier .conkyrc, pas l'original.

cp /etc/conky/conky.conf ~/.conkyrc

Activer les détecteurs pour Conky :

sudo sensors-detect

sudo service kmod start

sudo chmod u+s /usr/sbin/hddtemp

You can get a list of all installed packages by using: dpkg –get-selections > ~/Downloads/list.txt Edit Conky: NOTE: There are a lot of interesting scripts you can find on the Internet. Find information at the following links: http://conky.sourceforge.net/config_settings.html http://conky.sourceforge.net/variables.html leafpad ~/.conkyrc That's it, we're done. Enjoy!

Vous pouvez obtenir une liste de tous les paquets installés en utilisant :

dpkg –get-selections > ~/Downloads/list.txt

Éditer Conky :

NOTE : Il y a beaucoup de scripts intéressants que vous pouvez trouver sur Internet. Renseignez-vous sur les liens suivants :

http://conky.sourceforge.net/config_settings.html

http://conky.sourceforge.net/variables.html

leafpad ~/.conkyrc

Ça y est, nous avons fini. Amusez-vous bien !

Troubleshooting Things rarely go 100% smooth and easy. If you run into a few problems that may occur during installation, hopefully these tips can help you out. Problem: You accidently installed Grub on the USB thumbdrive and now you cannot boot into Linux. Solution: Plug your USB thumbdrive back in, boot the computer, and then remove the USB thumbdrive. Open a Terminal: sudo grub-install /dev/sda Reboot the computer and all should be well. Problem: You are booting to a black screen. Solution: Boot to Grub (hold “Shift” while booting), press “e” for Edit. Add “nomodeset” (no quotation marks) before “quiet splash” and then press F10. It should then boot to the initial command prompt. If it is still doing it after you have completed installing your system, you will need to correct drivers or permanently edit Grub.

Résolution des problèmes

Les choses ne se passent jamais parfaitement à 100 %. Si vous tombez sur quelques problèmes durant l'installation, ces conseils peuvent vous aider.

Problème : Vous avez installé accidentellement Grub sur la clé USB et maintenant vous ne pouvez pas démarrer Linux.

Solution : rebranchez votre clé USB, démarrez votre ordinateur et ensuite enlevez votre clé USB.

Ouvrez un terminal :

sudo grub-install /dev/sda

Redémarrez l'ordinateur et tout devrait bien se passer.

Problème : Vous démarrez sur un écran noir.

Solution : Démarrez Grub (appuyez sur « Maj » pendant le démarrage), appuyez sur « e » pour Éditer. Ajoutez « nomodeset » (sans les guillemets) avant « quiet splash » puis appuyez sur F10. Il devrait démarrer sur l'invite de commande initiale. S'il continue à le faire après l'installation complète de votre système, vous aurez besoin de corriger des pilotes ou d'éditer Grub de façon permanente.

Problem: When you unplug your wired Ethernet cable, the computer takes a long time to boot due to a “locating network” issue and/or you have no Internet (after removing the Ethernet cable) even though the wireless seems to be connected. Solution: This can be fixed by doing the following: sudo leafpad /etc/network/interfaces Comment out (#) all of the items except “auto lo” and “iface lo inet loopback” Reboot… This should resolve the issue.

Problème : Quand vous débranchez votre câble Ethernet, l'ordinateur met longtemps à démarrer du fait d'un problème de « détection de réseau » et/ou vous n'avez plus Internet (après avoir enlevé le câble Ethernet) même si le WiFi semble connecté.

Solution : Ceci peut être résolu en faisant ceci :

sudo leafpad /etc/network/interfaces

Mettez en commentaire (#) tous les éléments sauf « auto lo » et « iface lo inet loopback ».

Redémarrez. Le problème devrait être réglé.

Scripts Even though I have an IT background, I am an extreme noob when it comes to writing Linux scripts. Bash/SH Scripts are akin to M$ Batch Files. The pound sign/hashtag (#) is used for comments. Below I will show you how to create an Installation Script to make your life easier when installing your system. You can create a file called [whatever you want].sh and copy the text into the file and save it. Be careful to insure that the format of your .sh file resembles my text. NOTE: I would choose a name that is a single word or hyphenated text. For example: If you want to name it “Lame Script This Guy Wrote.sh”, it would be better to name it “lamescriptthisguywrote.sh”… as for me, I would pick something simple like, “basicinstall.sh”. NOTE: There are (I'm guessing) millions of people better at writing scripts than me, and if you are one of them, PLEASE write a better one. The only issues I have had with mine are: • Sometimes, not everything installs (probably due to me putting in an errant “return”, etc). One solution I have found is to break the script down into several batches of installations instead of a huge installation segment. Breaking the scripts into many pieces also comes in handy when troubleshooting during an Install. • Sometimes I put the cart before the horse, and some things cannot occur because the prerequisites were not met. I solved this by breaking my scripts down into multiple scripts, so that you can launch each script after the prerequisites are done (like needing to reboot). • I cannot automate everything (like inserting text into a specific place in a populated file), and so there are things that (at least for me) have to be done manually.

Scripts

Même avec mes connaissances en informatique, je suis un vrai débutant quand il faut écrire des scripts Linux. Les scripts Bash/SH sont identiques au fichiers batch de M$. Le symbole dièse (#) est utilisé pour les commentaires.

Ci-dessous, je vous montre comment créer un script d'installation pour vous rendre la vie plus facile lors de l'installation de votre système. Vous pouvez créer un fichier nommé [cequevousvoulez].sh, copier le texte dans le fichier et le sauvegarder. Assurez-vous que le format de votre fichier .sh ressemble à mon texte.

NOTE : Je choisirais un nom fait d'un seul mot ou d'un texte avec un tiret. Par exemple, si vous voulez l'appeler « Script boiteux que ce gars a écrit.sh », il vaudra mieux l'écrire « Scriptboiteuxquecegarsaecrit.sh »… Pour ma part, je choisirais quelque chose de simple « installdebase.sh ».

NOTE : Il y a (je suppose) des millions de gens qui écrivent des scripts mieux que moi et, si vous êtes l'un d'eux, MERCI de m'en écrire un meilleur. Les seuls problèmes que j'ai eu avec le mien sont : • Parfois, tout ne s'installe pas (peut-être parce que j'ai mis un « Entrée » baladeur…). J'ai trouvé une solution en coupant le script en plusieurs lots d'installation plutôt que d'avoir un seul grand tronçon. En coupant le script en plusieurs morceaux, j'ai également facilité la résolution des problèmes pendant l'installation. • Parfois, je mets la charrue avant les bœufs et certaines choses ne peuvent pas se produire parce que les pré-requis ne sont pas en place. J'ai résolu ceci en coupant mes scripts en plusieurs morceaux, de façon à pouvoir lancer chaque script après que les pré-requis ont été faits (comme devoir redémarrer). • Je ne peux pas tout automatiser (comme l'insertion d'un texte à un endroit particulier d'un fichier existant) ; il y a donc des choses à faire manuellement (au moins pour moi).

NOTE: If necessary, you can make the script executable by running the command: chmod +x [filename].sh (though I haven't run into the need so far). NOTE: Run the script with the command: sh filename.sh Do NOT run the script as sudo. The various commands will use sudo when needed. Below is an example of how to make a Script File. • Create a blank document, and name it whatever you want, with a .sh at the end (example: filename.sh). • Open the empty document with a text editor (leafpad, etc) and the very first line should be: #!/bin/bash • Hit “Enter” to go to the next line. From here, you can fill in the commands you want to run in the script. Examples of Script Files If you want to change any of the programs listed, feel free to do so. Basic Installation Copy the entire segment of text from “#!/bin/bash” through to “#End of Script”. Shown top right on this page is an example of an After Installation (and After Reboot) Script. Again, copy the entire segment of text from “#!/bin/bash” through to “#End of Script”) Well, that's it for now. Hopefully you will have a lot of fun creating your own Homebrew System. It is my intention to write another article expanding on this one, perhaps getting into tweaking/customizing the install, including things you can do with Firefox, writing a Conky script, etc.

NOTE : Si nécessaire, vous pouvez rendre le script exécutable en lançant la commande : chmod +x [nomdefichier].sh (bien je n'en aie encore jamais eu besoin).

NOTE : Lancez le script avec la commande sh nomdefichier.sh

NE lancez PAS le script avec sudo. Les différentes commandes utiliseront sudo quand c'est nécessaire.

Ci-dessous, voici un exemple de réalisation d'un fichier de script : • Créez un document vierge et nommez-le comme vous voulez, avec un .sh à la fin (exemple : nomdefichier.sh). • Ouvrez le document vide dans un éditeur de texte (leafpad, etc.) ; la toute première ligne doit être #!/bin/bash • Appuyer sur « Entrée » pour passer à la ligne suivante. À partir de là, vous pouvez le remplir des commandes que vous voulez lancer avec ce script.

Exemples de fichiers de script

Ne vous gênez pas si vous voulez modifier les programmes listés.

Installation de base

Copiez tout le texte de « #!/bin/bash » à « #End of Script ».

En haut à droite de la page, un exemple de script après une installation (et après le redémarrage) est visible. Ici aussi, copiez tout le texte de « #!/bin/bash » à « #End of Script ».

Bon, c'est tout pour le moment. J'espère que vous vous amuserez bien en créant votre propre système « maison ». J'ai l'intention d'écrire un autre article après celui-ci, peut-être sur les réglages/personnalisations de l'installation, en incluant des choses que vous pouvez faire avec Firefox, en écrivant un script pour Conky, etc.

issue102/tutoriel_3.txt · Dernière modification : 2015/11/09 22:13 de erlevo