Difference between revisions of "Divers"
Line 1: | Line 1: | ||
− | + | =Pour capturer les données sur le réseau= |
|
<nowiki>tcpdump -X -n -t -s 0 src 192.168.0.45</nowiki> |
<nowiki>tcpdump -X -n -t -s 0 src 192.168.0.45</nowiki> |
||
− | + | =Pour afficher une image en arrière-plan (X-Windows)= |
|
<nowiki>wmsetbg --center --workspace 0 image.jpeg</nowiki> |
<nowiki>wmsetbg --center --workspace 0 image.jpeg</nowiki> |
||
=Email= |
=Email= |
||
+ | |||
+ | ==Sylpheed== |
||
===Configuration du naviguateur=== |
===Configuration du naviguateur=== |
||
Line 15: | Line 17: | ||
(&(mail=*)(cn=*%s*)) |
(&(mail=*)(cn=*%s*)) |
||
− | + | ==Configuration du client Email dans Opera== |
|
<nowiki> sylpheed --compose [mailto:%t][?subject=%s]</nowiki> |
<nowiki> sylpheed --compose [mailto:%t][?subject=%s]</nowiki> |
||
− | + | =Setup French Canadian (old ca_enhanced) layout= |
|
With Xorg7, "ca_enhanced" is no more. You have to do a little trick to get the same layout that you are used to: Switch the old: |
With Xorg7, "ca_enhanced" is no more. You have to do a little trick to get the same layout that you are used to: Switch the old: |
||
Line 27: | Line 29: | ||
Option "XkbVariant" "fr" |
Option "XkbVariant" "fr" |
||
− | + | =Démarrage Linux sans authentification= |
|
Dans le fichier /etc/inittab, remplacer cette ligne: |
Dans le fichier /etc/inittab, remplacer cette ligne: |
||
Line 49: | Line 51: | ||
exit $? |
exit $? |
||
− | + | =Affichage des fichiers avec majuscule en premier= |
|
set LC_COLLATE=C |
set LC_COLLATE=C |
||
− | + | =How to do a search and replace over multiple files?= |
|
You could use find and sed, but I find that this little line of perl works nicely: |
You could use find and sed, but I find that this little line of perl works nicely: |
||
Line 74: | Line 76: | ||
<nowiki>perl -pi -w -e 's/\.\.\/includes\/style\.css/admin\.css/g;' *.php</nowiki> |
<nowiki>perl -pi -w -e 's/\.\.\/includes\/style\.css/admin\.css/g;' *.php</nowiki> |
||
− | + | =Installation de style file latex= |
|
Éxécuter la commande: |
Éxécuter la commande: |
||
Line 83: | Line 85: | ||
=LFS: Comment sauver de l'espace disque= |
=LFS: Comment sauver de l'espace disque= |
||
− | + | ==/usr/share/zoneinfo== |
|
If you copy your timezone to /etc/localtime instead of making the |
If you copy your timezone to /etc/localtime instead of making the |
||
normal symbolic link, all of /usr/share/zoneinfo can be removed. |
normal symbolic link, all of /usr/share/zoneinfo can be removed. |
||
− | + | ==/usr/share/locale and /usr/lib/locale== |
|
If you don't use NLS, you can remove all the locale info in /usr/share/locale and /usr/lib/locale. |
If you don't use NLS, you can remove all the locale info in /usr/share/locale and /usr/lib/locale. |
||
− | + | ==/usr/share/man== |
|
Les répertoires /usr/share/man{cs,de,es,fi,fr,hu,id,it,ja,ko} etc peuvent être enlevés. |
Les répertoires /usr/share/man{cs,de,es,fi,fr,hu,id,it,ja,ko} etc peuvent être enlevés. |
Revision as of 13:18, 1 December 2008
Contents
- 1 Pour capturer les données sur le réseau
- 2 Pour afficher une image en arrière-plan (X-Windows)
- 3 Email
- 4 Setup French Canadian (old ca_enhanced) layout
- 5 Démarrage Linux sans authentification
- 6 Affichage des fichiers avec majuscule en premier
- 7 How to do a search and replace over multiple files?
- 8 Installation de style file latex
- 9 LFS: Comment sauver de l'espace disque
Pour capturer les données sur le réseau
tcpdump -X -n -t -s 0 src 192.168.0.45
Pour afficher une image en arrière-plan (X-Windows)
wmsetbg --center --workspace 0 image.jpeg
Sylpheed
opera -newpage %s
Configuration du serveur LDAP
LDAP search string:
(&(mail=*)(cn=*%s*))
Configuration du client Email dans Opera
sylpheed --compose [mailto:%t][?subject=%s]
Setup French Canadian (old ca_enhanced) layout
With Xorg7, "ca_enhanced" is no more. You have to do a little trick to get the same layout that you are used to: Switch the old:
Option "XkbLayout" "ca_enhanced"
To:
Option "XkbLayout" "ca" Option "XkbVariant" "fr"
Démarrage Linux sans authentification
Dans le fichier /etc/inittab, remplacer cette ligne:
1:12345:respawn:/sbin/agetty 38400 tty1
par celle-ci:
1:12345:respawn:/sbin/agetty -n -l /bin/bootdisk-login 38400 tty1
et créez le script /bin/bootdisk-login:
#! /bin/sh export HOME=/root export PS1='\u:\w\$ ' export PATH=/bin:/usr/bin:/sbin:/usr/sbin cd ${HOME} /bin/bash --login exit $?
Si vous voulez démarrer X sans authentification pour un usager en particulier, voici le script à utiliser:
#! /bin/sh su <usager> -c /usr/X11R6/bin/startx exit $?
Affichage des fichiers avec majuscule en premier
set LC_COLLATE=C
How to do a search and replace over multiple files?
You could use find and sed, but I find that this little line of perl works nicely:
perl -pi -w -e 's/search/replace/g;' *.php
-e means execute the following line of code. -i means edit in-place -w write warnings -p loop
Example I had the following style sheet in a section:
<link rel="stylesheet" type="text/css" href="../includes/style.css">
and I wanted the following instead:
<link rel="stylesheet" type="text/css" href="admin.css">
As each expression is a regular expression you've got to escape the special characters such as forward slash and .
\.\.\/includes\/style\.css
So the final line of code ends up as
perl -pi -w -e 's/\.\.\/includes\/style\.css/admin\.css/g;' *.php
Installation de style file latex
Éxécuter la commande:
mktexlsr
après avoir installé le fichier .sty
LFS: Comment sauver de l'espace disque
If you copy your timezone to /etc/localtime instead of making the normal symbolic link, all of /usr/share/zoneinfo can be removed.
If you don't use NLS, you can remove all the locale info in /usr/share/locale and /usr/lib/locale.
Les répertoires /usr/share/man{cs,de,es,fi,fr,hu,id,it,ja,ko} etc peuvent être enlevés.