Difference between revisions of "Divers"

From Hugo Villeneuve
Jump to: navigation, search
(Installation instructions for scanner EPSON Perfection V100 Photo)
Line 212: Line 212:
   
 
==Installation instructions for scanner EPSON Perfection V100 Photo==
 
==Installation instructions for scanner EPSON Perfection V100 Photo==
 
# Start each line
 
# with a [[Wikipedia:Number_sign|number sign]] (#).
 
## More number signs gives deeper
 
### and deeper
 
### levels.
 
# Line breaks<br>don't break levels.
 
### But jumping levels creates empty space.
 
# Blank lines
 
 
# end the list and start another.
 
Any other start also
 
ends the list.
 
 
   
 
The scanner can be controlled either by iscan or by xsane, but in both cases
 
The scanner can be controlled either by iscan or by xsane, but in both cases
Line 239: Line 225:
 
Note 3: The epkowa back-end comes from iscan (not from sane).
 
Note 3: The epkowa back-end comes from iscan (not from sane).
   
1. Download:
+
#1. Download:
 
"iscan-plugin-gt-s600-2.0.0-1.c2.i386.rpm" OR
 
"iscan-plugin-gt-s600-2.0.0-1.c2.i386.rpm" OR
 
"iscan-plugin-gt-s600-2.1.2-1.x86_64.rpm"
 
"iscan-plugin-gt-s600-2.1.2-1.x86_64.rpm"
   
2. Extract content of RPM:
+
#2. Extract content of RPM:
 
rpm2cpio iscan-plugin-gt-s600-...rpm > iscan-plugin.cpio
 
rpm2cpio iscan-plugin-gt-s600-...rpm > iscan-plugin.cpio
   
3. Extract files from CPIO archive:
+
#3. Extract files from CPIO archive:
 
mkdir iscan-plugin
 
mkdir iscan-plugin
 
cd iscan-plugin
 
cd iscan-plugin
 
cpio -ivd < ../iscan-plugin.cpio
 
cpio -ivd < ../iscan-plugin.cpio
   
4. Copy firmware files and plugin:
+
#4. Copy firmware files and plugin:
 
cp -a usr/share/iscan /usr/share
 
cp -a usr/share/iscan /usr/share
 
cp -a usr/lib/iscan /usr/lib
 
cp -a usr/lib/iscan /usr/lib
   
5. Download and install " iscan-data_1.9.0-1.tar.gz"
+
#5. Download and install " iscan-data_1.9.0-1.tar.gz"
 
./configure --prefix=/usr &&
 
./configure --prefix=/usr &&
 
make &&
 
make &&
 
make install
 
make install
   
6. Download and install "iscan_2.26.4-2.tar.gz"
+
#6. Download and install "iscan_2.26.4-2.tar.gz"
 
./configure --prefix=/usr --localstatedir=/var &&
 
./configure --prefix=/usr --localstatedir=/var &&
 
make &&
 
make &&
 
make install
 
make install
   
8. Create entry for scanner:
+
#8. Create entry for scanner:
 
iscan-registry --add interpreter usb 0x04b8 0x012d \
 
iscan-registry --add interpreter usb 0x04b8 0x012d \
 
/usr/lib/iscan/libesint66 \
 
/usr/lib/iscan/libesint66 \
Line 272: Line 258:
 
This will create the file /var/lib/iscan/interpreter
 
This will create the file /var/lib/iscan/interpreter
   
9. In "/etc/sane.d/dll.conf":
+
#9. In "/etc/sane.d/dll.conf":
 
epkowa
 
epkowa
   
10. Create file "/etc/sane.d/epkowa.conf":
+
#10. Create file "/etc/sane.d/epkowa.conf":
 
usb
 
usb
  +
 
Note importante: si on met cette ligne dans epkowa.conf:
 
Note importante: si on met cette ligne dans epkowa.conf:
 
usb 0x04b8 0x012d
 
usb 0x04b8 0x012d
Line 282: Line 269:
 
apparaître la fenêtre de scan.
 
apparaître la fenêtre de scan.
 
 
3. Activate either xsane or iscan plugin (or both) for Gimp:
+
#11. Activate either xsane or iscan plugin (or both) for Gimp:
 
ln -s /usr/bin/xsane /usr/lib/gimp/2.0/plug-ins
 
ln -s /usr/bin/xsane /usr/lib/gimp/2.0/plug-ins
 
ln -s /usr/bin/iscan /usr/lib/gimp/2.0/plug-ins
 
ln -s /usr/bin/iscan /usr/lib/gimp/2.0/plug-ins

Revision as of 19:15, 7 September 2011

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

Email

Sylpheed

Configuration du naviguateur

 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

Supprimer un "/" à la fin

DIR="/usr/local/bin/"
echo ${DIR%/}

Effacer plusieurs fichiers avec find

find . -name .svn -exec rm -rf {} \;

LFS: Comment sauver de l'espace disque

/usr/share/zoneinfo

If you copy your timezone to /etc/localtime instead of making the 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.

/usr/share/man

Les répertoires /usr/share/man{cs,de,es,fi,fr,sauver de l'espace disquehu,id,it,ja,ko} etc peuvent être enlevés.

Comment synchroniser deux répertoires

Le répertoire dest va devenir un miroir de src:

 $> rsync -av --delete src/* dest

Installation CUPS-PDF

 Sur le serveur (web admin interface, port 631), cliquer sur "Find New Printer"
 Sélectionner "Generic Make"

 Model: Sélectionner "Generic CUPS-PDF Printer (en)"

tar avec SSH

 tar jcvf - directory | ssh user@host "cat > directory.tar.bz2"

Navigateur par défaut pour les applications Gnome

Éxécuter:

 $> gnome-default-applications-properties


Syntax highlighting MediaWiki

Replace in skins/monobook/main.css:

pre {
	padding: 1em;
	border: 1px dashed #2f6fab;
	color: black;
	background-color: #f9f9f9;
	line-height: 1.1em;

With:

pre {
	padding: 1em !important;
	border: 1px dashed #2f6fab !important;
	color: black;
	background-color: #f9f9f9 !important;
	line-height: 1.1em !important;

Lecture température disque dur

 $> hddtemp /dev/sda

SMART Disk Monitoring Daemon

 $> apt-get install smartmontools
 $> smartctl -t long /dev/sda [wait until test completes, then]
 $> smartctl -l selftest /dev/sda

Changement du mot de passe usager

Si vous avez ce message d'erreur:

 password for ' null ' gnome keyring

Il faut éxécuter:

 $> rm ~/.gnome2/keyrings/login.keyring

Combiner plusieurs documents PDF en un seul

 $> gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf

Si les sources sont des images, on peut utiliser ImageMagick:

 $> convert *.gif foo.pdf


Désactiver mode large files

si vous avez ce message quand vous essayez de monter un disque:

 EXT4-fs (sda1): Filesystem with huge files cannot be mounted read-write without CONFIG_LBDAF

Selon la doc du kernel de Linux:

The ext4 filesystem requires that this feature be enabled in
order to support filesystems that have the huge_file feature
enabled.  Otherwise, it will refuse to mount in the read-write
mode any filesystems that use the huge_file feature, which is
enabled by default by mke2fs.ext4.

The feature can be removed from an existing filesystem by running the following commands:

 $> tune2fs -O ^huge_file /dev/whatever
 $> fsck /dev/whatever

This should allow you to mount the drive without CONFIG_LBDAF in the kernel.


RTC

Pour que Linux ajuste automatiquement son horloge selon le RTC au démarrage, il faut:

 Ne pas sélectionner "Enhanced Real-time clock Support" dans "Device Drivers  ---> Character devices  --->"
 Sélectionner (built-in ,pas modulaire) "Device Drivers  ---> Real Time Clock  ---> Set system time from RTC on startup and resume"

Avec ça, plus besoin du script /etc/rc.d/init.d/setclock

Scanner Epson Perfection V100 Photo

Installation instructions for scanner EPSON Perfection V100 Photo

The scanner can be controlled either by iscan or by xsane, but in both cases the firmware files, the iscan plugin library, iscan-data, iscan and the sane configuration files (dll.conf and epkowa.conf) must be installed.

Note 1: The usbfs (/proc/bus/usb) filesystem is not necessary even if using

       libusb.

Note 2: It seems that the iscan-registry command must be executed even if

       using sane.

Note 3: The epkowa back-end comes from iscan (not from sane).

  1. 1. Download:
    "iscan-plugin-gt-s600-2.0.0-1.c2.i386.rpm" OR
    "iscan-plugin-gt-s600-2.1.2-1.x86_64.rpm"
  1. 2. Extract content of RPM:
    rpm2cpio iscan-plugin-gt-s600-...rpm > iscan-plugin.cpio
  1. 3. Extract files from CPIO archive:
    mkdir iscan-plugin
    cd iscan-plugin
    cpio -ivd < ../iscan-plugin.cpio
  1. 4. Copy firmware files and plugin:
    cp -a usr/share/iscan /usr/share
    cp -a usr/lib/iscan   /usr/lib
  1. 5. Download and install " iscan-data_1.9.0-1.tar.gz"
    ./configure --prefix=/usr &&
    make &&
    make install
  1. 6. Download and install "iscan_2.26.4-2.tar.gz"
    ./configure --prefix=/usr --localstatedir=/var &&
    make &&
    make install
  1. 8. Create entry for scanner:
    iscan-registry --add interpreter usb 0x04b8 0x012d \
      /usr/lib/iscan/libesint66 \
      /usr/share/iscan/esfw66.bin
  This will create the file /var/lib/iscan/interpreter
  1. 9. In "/etc/sane.d/dll.conf":
    epkowa
  1. 10. Create file "/etc/sane.d/epkowa.conf":
    usb

Note importante: si on met cette ligne dans epkowa.conf:

 usb 0x04b8 0x012d

ça prend une éternité (environ 1 à 2 minutes) avant de voir apparaître la fenêtre de scan.

  1. 11. Activate either xsane or iscan plugin (or both) for Gimp:
    ln -s /usr/bin/xsane /usr/lib/gimp/2.0/plug-ins
    ln -s /usr/bin/iscan /usr/lib/gimp/2.0/plug-ins

Exemple pour lancer xsane et avoir des traces: SANE_DEBUG_EPKOWA=CMD xsane

Exemple pour spécifier le scanner directement: SANE_DEBUG_EPKOWA=CMD xsane epkowa:interpreter


Avasys download URL:

 http://www.avasys.jp/english/linux_e/dl_scan.html