15562
Commentaire: Erreur logique + OTL
|
15577
URL gitlab du dépôt git
|
Texte supprimé. | Texte ajouté. |
Ligne 23: | Ligne 23: |
git clone http://git.crans.org/git/fichiers_configuration.git | git clone https://gitlab.crans.org/membres-actifs/fichiers_configuration.git |
Sur cette page vous trouverez des fichiers de configurations généreusement mis à votre disposition par les membres actifs du Cr@ns pour que vous puissiez les utiliser.
Membres actifs… ou pas :P -- WikiElvith 2013-10-24 12:15:53
Ils sont principalement destinés à des utilisateurs de Linux (Debian ou Ubuntu, potentiellement d'autres distrib) qui veulent une config un peu plus que ras des pâquerettes et qui veulent un peu comprendre ce qui se passe.
Ils sont commentés le plus possible et essayent de vous donner un aperçu des fonctionnalités intéressantes/utiles.
Ils sont tous sous licence WTFPL, ce qui signifie que vous avez le droit d'en faire ce que vous voulez. Bien entendu ils viennent sans aucune garantie.
Si vous avez des remarques, des corrections à apporter, des suggestions de modification/d'ajouts, <nounou AT SPAMFREE lists DOT crans DOT org>.
Sauf indication contraire, ces fichiers de configuration sont indépendants les uns des autres et sont à placer directement dans votre home.
Pour les récupérer, vous pouvez Enregistrer la cible sous. Si vous voulez les voir directement dans votre navigateur, comme ils sont encodés en UTF-8 et que l'ASCII c'est pour les faibles, vous aurez probablement besoin de configurer un petit peu votre navigateur pour qu'il les affiche correctement.
Sommaire
Dépôt git
Si vous voulez récupérer tous ces fichiers à la fois (et peut-être plus, si la page wiki n'est pas à jour) ou si vous voulez participer à leur élaboration de la meilleure manière qui soit, vous pouvez cloner leur dépôt git :
git clone https://gitlab.crans.org/membres-actifs/fichiers_configuration.git
Les fichiers
Un petite description de à quoi sert chaque fichier.
Disclaimer : Tous ces fichiers viennent sans aucune garantie et n'engagent absolument pas le Cr@ns. Ils sont sous licence libre.
En d'autres termes : vous en fait ce que vous voulez, mais si ça ne marche pas comme vous vouliez, leurs auteurs n'y sont pour rien.
Malgré toute leur bonne volonté, il est possible que ces fichiers contiennent des coquilles ou des erreurs monstrueuses. Vous êtes les bienvenus pour collaborer, adressez vos bonnes volontés à <nounou AT SPAMFREE lists DOT crans DOT org>.
.${SHELL}rc
De $SHELL, la variable qui contient le nom du shell que vous utilisez et rc, terminaison traditionnelle des fichiers de configuration linux
.bashrc
Fichier de configuration pour bash, shell très utilisé et par défaut sous Debian et Ubuntu.
http://perso.crans.org/respbats/config/.bashrc
Ce fichier fait appel, si vous le possédez également, au fichier .bash_aliases pour définir des alias de commandes :
http://perso.crans.org/respbats/config/.bash_aliases
Ces fichiers peuvent s'utiliser out-of-the-box
Si vous décidez d'utilisez la fonctionnalité à propos d'umask, vous aurez sans doute besoin de ce fichier :
http://perso.crans.org/respbats/config/.umaskrc
.zshrc
raise NotImplementedError
SSH
config
Marre d'avoir à préciser votre login et tout un tas d'options quand vous connectez en SSH ?
http://perso.crans.org/respbats/config/.ssh/config
Ce fichier est à placer dans le dossier .ssh de votre home.
Ce fichier ne s'utilise pas out-of-the-box, vous devez remplacer les occurrences de "loginCr@ns", "loginENS" et éventuellement "loginFedeRez" par vos logins.
Si vous voulez quelques détails sur les options qui y sont utilisées, tout est commenté. Vous pouvez aussi aller voir ici.
known_hosts
Astuce pour les membres actifs du Cr@ns : vous pouvez récupérer un fichier known_hosts qui contient déjà toutes les fingerprint des serveurs du Cr@ns et le placer dans ~/.ssh/known_hosts2. Il sera utilisé par ssh mais vous continuerez à enregistrez les serveurs que vous contactez dans ~/.ssh/known_hosts.
Il est dans /etc/ssh/ssh_known_hosts sur le serveur Cr@ns le plus proche de chez vous.
Bien entendu, si vous récupérer ce fichier en faisant confiance aveuglément à la fingerprint du serveur sur lequel vous allez le chercher, ça n'a aucun intérêt.
Il existe des moyens pour faire confiance à une première fingerprint :
- Demander à votre voisin qui a déjà utilisé une méthode sûre de vous confirmer le fingerprint (nécessite d'avoir un tel voisin, donc probablement d'être sur le campus).
- Demander à un membre actif de vous l'envoyer par mail GPG-signé (nécessite que la clé GPG de ce contact soit dans votre réseau de confiance).
Regarder le champ DNS SSHFP du serveur que vous chercher à contacter. En vérifiant bien entendu la signature DNSSec de la requête.
.gitconfig
Parce que git, c'est awesome, mais que c'est encore mieux avec un fichier de conf cool.
http://perso.crans.org/respbats/config/.gitconfig
Ce fichier n'est pas utilisable out-of-the-box, vous devez mettre vos nom, prénom et adresse mail aux emplacements idoines (et décommenter les lignes en question).
.screenrc
screen, très utilisé pour laisser des programmes tourner quand on n'est pas là. Notamment un client IRC ou une mise à jour.
Lui aussi, on peut le customiser.
http://perso.crans.org/respbats/config/.screenrc
Ce fichier peut s'utiliser out-of-the-box
Éditeurs de texte
.vimrc
http://perso.crans.org/respbats/config/.vimrc
Y'a plein de trucs cool qui ne sont pas activés par défaut. Pensez à décommenter les options qui vous plaisent.
Ce fichier peut s'utiliser out-of-the-box
Remapper la touche Escape
Parce que franchement, la touche Escape est bien trop loin et que ça demande un effort surhumain de l'atteindre et que la touche Caps_Lock n'est pas indispensable, on peut les remapper.
Pour cela, utiliser la commande xev et appuyer sur la touche Caps_Lock et lire la ligne qui ressemble à ça :
state 0x12, keycode 66 (keysym 0xffe5, Caps_Lock), same_screeen YES,
Puis éditer son ~/.Xmodmap en conséquence :
!! Adieu Caps_Lock clear lock !! Remplacer Caps_Lock par Escape keycode 66 = Escape
Il faut ensuite exécuter :
xmodmap ~/.Xmodmap
Alternativement, pour ceux qui configurent directement le serveur X, il existe une variante toute faite, nommée capslock(swapescape), pour l’option XkbLayout. Exemple d’utilisation (ligne à insérer dans une section dédiée au clavier) :
Option "XkbLayout" "fr(bepo)+capslock(swapescape), fr(oss)"
Le changement prendra effet au prochain démarrage de l’X.
.nanorc
http://perso.crans.org/respbats/config/.nanorc
Pas grand chose de folichon pour l'instant, juste sourcing de quelques fichiers de coloration syntaxique. Attention, il faut que ces fichiers existent dans /usr/share/nano/ sinon nano émet plein de messages de Warning au lancement.
Ce fichier peut s'utiliser out-of-the-box
IRC
.irssi/config
http://perso.crans.org/respbats/config/.irssi/config
Pour rejoindre automatiquement des serveurs IRC et des channels au lancement de irssi.
- Pour avoir des alias de commandes plus ou moins cool et inutiles
- Pour enregistrer automatiquement ses conversations dans des dossiers triés par date
Ce fichier est à placer dans le dossier .irssi de votre home.
Ce fichier ne s'utilise pas out-of-the-box, vous devez remplacer les occurrences de "Prénom", "Nom", "loginCr@ns" et "Pseudo" par les valeurs idoines.
Mails
procmail
procmail permet de trier ses mails à leur arrivée dans la boîte mail. Si vous ne savez pas de quoi on parle, jetez un oeil à ceci.
Comme c'est long et compliqué de faire un .procmailrc cool, les cranseux vous en offrent un tout fait.
Ce fichier n'est pas utilisable tel quel, il faut aussi avoir le répertoire ~/.procmail/rc avec les bons fichiers dedans pour qu'il soit fonctionnel.
Le plus simple est donc de cloner le répertoire de tous les fichiers de config :
git clone ssh://git.crans.org/git/fichiers_configuration.git .myconfig
Puis de créer le dossier .procmail et d'y mettre un lien vers les fichiers de conf. Attention, pour fonctionner correctement, il faut aussi que vous possédiez le dossier .procmail/logs.
mkdir -p .procmail/logs cd .procmail ln -s ~/.myconfig/.procmail/rc cd ~ ln -s ~/.myconfig/.procmailrc
À ce stade, le fichier est prêt à être utilisé, mais vous avez probablement envie de le configurer.
Attention : procmail est assez capricieux, le moindre problème peut lui faire trier vos mails un peu bizarrement. Allez-y doucement, et réfléchissez 7 fois avant de vous lancer. Si vous avez un doute, vous pouvez demander à quelqu'un qui s'y connait mieux que vous.
Sachez tout de même que (à moins que vous ne rajoutiez des règles foireuses impliquant /dev/null) vos mails ne seront normalement pas perdus, quel que soit le bug rencontré par procmail. Ils peuvent néanmoins atterrir dans le dossier /var/mail/$USER.
Nous allons nous attarder un peu sur les différents fichiers concernés.
.procmailrc
C'est le fichier principal, il contient toute l'intelligence de tri. Il fait appel à tous les autres.
Par défaut, beaucoup de fichiers inclus sont commentés (cf #~#).
Au début, après une longue zone de commentaires, il définit beaucoup de variables. Vous pouvez les modifier si vous désirez trier vos mails autrement. Normalement aucun dossier n'est hardcodé dans les règles, vous pouvez tout customiser dans cette partie.
(Sauf si vous voulez rajouter des règles, mais dans ce cas, regardez les fichiers custom.*.rules)
rc/main
C'est un bête lien symbolique vers le .procmailrc logiquement deux dossiers au-dessus.
Il est bien pratique à avoir sous la main mais il n'est pas nécessaire au bon fonctionnement de l'ensemble. Vous pouvez le supprimer si ça vous chante.
rc/ML_*
Tous les fichiers du dossier rc dont le nom commence par ML_ sont des listes d'identifiants de ML que le .procmailrc va trier de la même manière.
Un petit mot sur ${ML_} : on appellera ainsi l'identifiant de la ML, dans lequel les éventuels points ou espaces sont remplacés par un underscore.
Les mailing-lists listées dans ML_MA_crans.administratif.prive sont rangées (par défaut, c'est-à-dire, si vous n'avez pas changé les variables) dans .Cr@ns.Administratif.prive.${ML_} .
Celles dans ML_MA_crans.administratif.public, dans .Cr@ns.Administratif.public.${ML_} .
Celles dans ML_MA_federez, dans .FedeRez.${ML_} .
Celles dans ML_campus, dans .ML.Campus.${ML_} . Il y a dedans par défaut toutes les ML d'assoces et deux-trois autres concernant le campus.
Celles dans ML_clubs, dans .ML.Campus.Clubs.${ML_} . Il y a dedans par défaut toutes les ML de clubs BDE. (Seront aussi rangées de cette manière les mailing-lists du domaine crans.org dont l'identifiant commence par club-).
Celles dans ML_sono, dans .ML.Campus.SoNo.${ML_} . Il y a dedans par défaut toutes les ML des projets SoNo
Celles dans ML_bda, dans .ML.Campus.BDA.${ML_} . Il y a dedans par défaut des ML de communication du BDA.
rc/custom.*.rules
Ces fichiers sont destinés à contenir vos propres règles de tris.
Par défaut, il ne sont pas utilisés, vous devez décommenter les INCLUDERC correspondants si vous voulez les prendre en compte.
Il y en a plusieurs parce que l'ordre d'exécution des règles est important avec procmail.
custom.high.rules est exécuté en tout premier, avant toutes les autres règles. Vous pouvez mettre dedans des règles que vous voulez voir prendre la priorité sur les règles du fichiers principal. Par exemple, si vous souhaitez trier d'une certaines façon un mail qui aurait été trié autrement pas le système assez exhaustif déjà en place.
custom.normal.rules est exécuté avant le tri automatique des ML. Le tri automatique des ML étant un bulldozer ne laissant pas grand chose au hasard, et surtout, avalant tout ce qui a un List-Id, vous avez peut-être envie de trier certaines ML autrement.
- Par ailleurs, il est exécuté après les règles qu'il est judicieux de mettre en premier parce qu'elles trient beaucoup de mails fréquents (cette remarque concerne surtout les membres actifs).
- La plupart de vos règles personnelles devraient être dans ce fichier.
custom.final.rules est exécuté après toutes les autres règles. Il sert typiquement à définir une boîte par défaut que vous désirez différente de celle par défaut du système.
rc/cron.*
Si vous décommentez le INCLUDERC=${CONFIGDIR}/cron.rules dans le .procmailrc, les deux fichiers suivants seront utilisés.
Ils servent à trier les mails envoyés par un cronjob sur un serveur Cr@ns. Comme il y en a beaucoup, le fichier cron.rules contient des règles pour expliquer comment trier ces mails. Il repose sur le contenu du fichier cron.folders dont le format est :
folder<un nombre quelconque de TAB>chaîne
Si le Subject du mail contient chaîne, il sera placé dans .Cr@ns.Problems.2-Wild.cron.folder.
retrocompatibility_patch.rules
Ce fichier est très utile pour les gens qui étaient déjà membre actif Cr@ns avant le 30/06/13 (les autres n'en ont rien à carrer).
Il faut savoir que certaines règles de tri du .procmailrc proposé ici se basent sur des champs X-Mailer qui ont été ajoutés aux envois des mails correspondant. Mais avant cette date où on a envisagé de faire les choses proprement, ces champs n'étaient pas présent. Ce fichier, si son INCLUDERC correspondant est décommenté, va trier les anciens mails selon des critères, certes plus sales, mais qui permettront de les rattraper quand même.
C'est très pratique si on veut retrier tous ses anciens mails pour avoir un classement conforme à ce fichier awesome \o/.
scripting
Certaines règles nécessitent des scripts extérieurs pour fonctionner correctement.
Voir ici pour récupérer les scripts en question.
Si vous ne les clonez pas dans leur path canonique, il vous faudra adapter la variable de configuration SCRIPTSFOLDER (et éventuellement les suivantes).
Prochainement
À venir :
- .zshrc
- /etc/apt/sources.list ?
- .awesomerc
- «wmfs config»
- Des templates latex et inkscape
- mplayerrc
N'hésitez pas à en proposer d'autres/à participer !
Allez voir WikiElvith/MesFichiersConfig