Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 13/10/2011, à 07:49

Papy Octet

Pilotes Canon pour Linux, enfin !

Bonjour,
Une petite info rencontrée sur le net concernant Canon et ses imprimantes. IL N'Y A AUCUNE INTENTION PUBLICITAIRE ICI !
Je possède 2 imprimantes de cette marque et l'impression est très problématique sans les pilotes pour Linux. Un revirement de la société d'une telle ampleur mérite certainement qu'on en parle.

Canon s'est enfin décidé à ne plus ignorer le libre et va plus loin encore.
Il a ouvert un PPA pour TOUS LES DRIVERS DE SES IMPRIMANTES.

Le site des pilotes (drivers) pour les personnes intéressées ... comme moi wink

A+


AMD A6-3500 HD6530D 2.1 ghz Triple core FM1 3mb - CM GIGABYTE GA-A75M-UD2H - 8 GiO ram DDR3 - HDD 1TO WD GREEN + WD Gaviar Black 1TO + externe IOMEGA 500GiO - Carte écran nvidia GeForce 210 Silent avec 1GiO cache DDR3 - Ubuntu
Portable HP - Intel Centrino - 1 Go DDR2 - DD 120 Go - Mint 14
Imprim. Samsung ML-1670 et CLP-315, scanner Epson Perfection V30, ... Linuxgraphic.org, LibreOffice.org

Hors ligne

#2 Le 13/10/2011, à 15:56

compte supprimé

Re : Pilotes Canon pour Linux, enfin !

Salut;
Et aussi Brother, avec ce script de demonipuch

wget http://demonipuch.free.fr/brother.tar.gz
tar zxvf brother.tar.gz
cd brother
chmod +x install.sh
./install.sh

et ce script Conon et brother !de fabux ! ici !

#!/bin/bash
#
##### Variables #####
## Mise en forme texte
# Type d'écriture
OffColor=$(tput sgr0)

Gras=$(tput bold)
Surligne=$(tput smso)
SurligneOff=$(tput rmso)
Souligne=$(tput smul)
SouligneOff=$(tput rmul)

# Couleurs
Noir=$(tput setaf 0)
Rouge=$(tput setaf 1)
Vert=$(tput setaf 2)
Jaune=$(tput setaf 3)
Bleu=$(tput setaf 4)
Violet=$(tput setaf 5)
Turquoise=$(tput setaf 6)
Blanc=$(tput setaf 0)

FondNoir=$(tput setb 0)
FondJaune=$(tput setb 3)

## Variables Divers
# Nom de code d'Ubuntu
Codename=$(lsb_release -c | awk '{print $2}')
# Type d'architecture
Arch=$(uname -m)
# Dossier actuel
Pwd=$(dirname $0)
# Nom de l'utilisateuur
Qui=$(who -m | awk '{print $1}')

# Logs de l'installation
exec 9> ${Pwd}/install.log
exec 2>&9
BASH_XTRACEFD=9
set -x

# Définition des fonctions

verif_dep() {
Question=$(echo -e "${Vert}${Gras}Bonjour !!!${OffColor}"\\n\
"Avez vous lancé ce script en tant qu'${Bleu}${Gras}administrateur${OffColor} ?"\\n\
"La dépendance de ${Bleu}${Gras}Zenity${OffColor} est-elle satisfaite ?"\\n\
"Merci de répondre en appuyant la touche ${Rouge}${Gras}O${OffColor} ou ${Rouge}${Gras}N${OffColor}.")
echo -e "${Question}"

read -n1 -s -p "${Question}" Reponse
if [[ "${Reponse}" == [Oo] ]]
    then break
    else echo -e "Merci de regarder le fichier ${Bleu}README${OffColor}."\\n\
    "Au revoir."
    exit
fi
}

advert() {
zenity --info --title="Avertissement" \
--text="Vous allez lancer l'installation de votre imprimante depuis un script proposé par des contributeurs.

Si vous rencontrez un problème pendant l'utilisation de celui-ci, merci de poster le fichier <b>install.log</b> sur
<a href='http://forum.ubuntu-fr.org/viewtopic.php?pid=6417381'><b>le forum ubuntu-fr.org</b>.</a>"
}

select_marque() {
# Afficher la liste des modèles Brother
Marque=$(zenity --list --radiolist --width=400 --height=220 --title="Choix de la marque" \
--text="Choisissez votre marque d'imprimante :" \
--column="" \
--column="Marques" \
FALSE "Brother" \
FALSE "Canon")
if [[ ${Marque} == "Brother" ]]
    then wget -q http://demonipuch.free.fr/brother.tar.gz
    tar xvfz ./brother.tar.gz
    INSTALL_BRO
elif [[ ${Marque} == "Canon" ]]
then INSTALL_CAN
fi
# Quitter si aucun modèle séléctionné
if [[ -z ${Marque} ]]; then
    exit 0
fi
}

####Script installation imprimante Brother
INSTALL_BRO() {

avertissement() {
zenity --info --title="Avertissement" \
--text="Les procédures d'installations utilisées dans ce script sont celles décrites sur \
<a href='http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html'><b>le site de Brother</b></a>.

Si vous rencontrez un problème pendant l'utilisation du script, merci de poster le fichier <b>install.log</b> sur 
<a href='http://forum.ubuntu-fr.org/viewtopic.php?pid=6417381'><b>le forum ubuntu-fr</b></a>."
}


selection_modele() {
# Afficher la liste des modèles Brother
modele=$(zenity --list --radiolist --width=400 --height=220 \
--title="Installation des pilotes pour imprimantes Brother" \
--text="Choisissez votre modèle d'imprimante :" \
--column="" --column="Modèles" \
FALSE "DCP" \
FALSE "FAX" \
FALSE "HL" \
FALSE "MFC")
# Quitter si aucun modèle sélectionné
if [[ -z ${modele} ]]; then
    exit 0
fi
}

selection_imprimante() {
# Afficher la liste des imprimantes DCP
if [[ ${modele} == "DCP" ]]; then
imprimante=$(zenity --list --radiolist --width=400 --height=400 \
--title="Installation des pilotes pour imprimantes Brother" \
--text="Choisissez votre imprimante parmi la liste :" \
--column="" --column="Imprimantes DCP" \
FALSE "DCP-1000" \
FALSE "DCP-110C" \
FALSE "DCP-115C" \
FALSE "DCP-117C" \
FALSE "DCP-120C" \
FALSE "DCP-130C" \
FALSE "DCP-135C" \
FALSE "DCP-1400" \
FALSE "DCP-145C" \
FALSE "DCP-150C" \
FALSE "DCP-153C" \
FALSE "DCP-155C" \
FALSE "DCP-163C" \
FALSE "DCP-165C" \
FALSE "DCP-167C" \
FALSE "DCP-185C" \
FALSE "DCP-195C" \
FALSE "DCP-310CN" \
FALSE "DCP-315CN" \
FALSE "DCP-330C" \
FALSE "DCP-340CW" \
FALSE "DCP-350C" \
FALSE "DCP-353C" \
FALSE "DCP-357C" \
FALSE "DCP-365CN" \
FALSE "DCP-373CW" \
FALSE "DCP-375CW" \
FALSE "DCP-377CW" \
FALSE "DCP-383C" \
FALSE "DCP-385C" \
FALSE "DCP-387C" \
FALSE "DCP-395CN" \
FALSE "DCP-540CN" \
FALSE "DCP-560CN" \
FALSE "DCP-585CW" \
FALSE "DCP-6690CW" \
FALSE "DCP-7010" \
FALSE "DCP-7020" \
FALSE "DCP-7025" \
FALSE "DCP-7030" \
FALSE "DCP-7040" \
FALSE "DCP-7045N" \
FALSE "DCP-7055" \
FALSE "DCP-7057" \
FALSE "DCP-7060D" \
FALSE "DCP-7065DN" \
FALSE "DCP-7070DW" \
FALSE "DCP-750CW" \
FALSE "DCP-770CW" \
FALSE "DCP-8020" \
FALSE "DCP-8025D" \
FALSE "DCP-8040" \
FALSE "DCP-8045D" \
FALSE "DCP-8060" \
FALSE "DCP-8065DN" \
FALSE "DCP-8070D" \
FALSE "DCP-8080DN" \
FALSE "DCP-8085DN" \
FALSE "DCP-9010CN" \
FALSE "DCP-9040CN" \
FALSE "DCP-9042CDN" \
FALSE "DCP-9045CDN" \
FALSE "DCP-9055CDN" \
FALSE "DCP-9270CDN" \
FALSE "DCP-J125" \
FALSE "DCP-J315W" \
FALSE "DCP-J515W" \
FALSE "DCP-J525W" \
FALSE "DCP-J715W" \
FALSE "DCP-J725DW" \
FALSE "DCP-J925DW")
# Afficher la liste des imprimantes FAX
elif [[ ${modele} == "FAX" ]]; then
imprimante=$(zenity --list --radiolist --width=400 --height=400 \
--title="Installation des pilotes pour imprimantes Brother" \
--text="Choisissez votre imprimante parmi la liste :" 
--column="" --column="Imprimantes FAX" \
FALSE "FAX-1815C" \
FALSE "FAX-1820C" \
FALSE "FAX-1835C" \
FALSE "FAX-1840C" \
FALSE "FAX-1860C" \
FALSE "FAX-1920CN" \
FALSE "FAX-1940CN" \
FALSE "FAX-1960C" \
FALSE "FAX-2440C" \
FALSE "FAX-2480C" \
FALSE "FAX-2580C" \
FALSE "FAX-2820" \
FALSE "FAX-2850" \
FALSE "FAX-2900" \
FALSE "FAX-2920" \
FALSE "FAX-3800" \
FALSE "FAX-4100" \
FALSE "FAX-4750e" \
FALSE "FAX-5750e")
# Afficher la liste des imprimantes HL
elif [[ ${modele} == "HL" ]]; then
imprimante=$(zenity --list --radiolist --width=400 --height=400 \
--title="Installation des pilotes pour imprimantes Brother" \
--text="Choisissez votre imprimante parmis la liste :" \
--column="" --column="Imprimantes HL" \
FALSE "HL-1030" \
FALSE "HL-1230" \
FALSE "HL-1240" \
FALSE "HL-1250" \
FALSE "HL-1270" \
FALSE "HL-1430" \
FALSE "HL-1440" \
FALSE "HL-1450" \
FALSE "HL-1470N" \
FALSE "HL-1650" \
FALSE "HL-1670N" \
FALSE "HL-1850" \
FALSE "HL-1870N" \
FALSE "HL-2030" \
FALSE "HL-2040" \
FALSE "HL-2070N" \
FALSE "HL-2130" \
FALSE "HL-2140" \
FALSE "HL-2150N" \
FALSE "HL-2170W" \
FALSE "HL-2220" \
FALSE "HL-2230" \
FALSE "HL-2240" \
FALSE "HL-2240D" \
FALSE "HL-2250DN" \
FALSE "HL-2270DW" \
FALSE "HL-2280DW" \
FALSE "HL-3040CN" \
FALSE "HL-3070CW" \
FALSE "HL-4040CDN" \
FALSE "HL-4040CN" \
FALSE "HL-4050CDN" \
FALSE "HL-4070CDW" \
FALSE "HL-4140CN" \
FALSE "HL-4150CDN" \
FALSE "HL-4570CDW" \
FALSE "HL-4570CDWT" \
FALSE "HL-5030" \
FALSE "HL-5040" \
FALSE "HL-5050" \
FALSE "HL-5070N" \
FALSE "HL-5130" \
FALSE "HL-5140" \
FALSE "HL-5150D" \
FALSE "HL-5170DN" \
FALSE "HL-5240" \
FALSE "HL-5250DN" \
FALSE "HL-5270DN" \
FALSE "HL-5280DW" \
FALSE "HL-5340D" \
FALSE "HL-5350DN" \
FALSE "HL-5350DNLT" \
FALSE "HL-5370DW" \
FALSE "HL-5370DWT" \
FALSE "HL-5380DN" \
FALSE "HL-6050" \
FALSE "HL-6050D - HL-6050DN" \
FALSE "HL-7050 - HL-7050N" \
FALSE "HL-8050N")
# Afficher la liste des imprimantes MFC
elif [[ ${modele} == "MFC" ]]; then
imprimante=$(zenity --list --radiolist --width=400 --height=400 \
--title="Installation des pilotes pour imprimantes Brother" \
--text="Choisissez votre imprimante parmi la liste :" \
--column="" --column="Imprimantes MFC" \
FALSE "MFC-210C" \
FALSE "MFC-215C" \
FALSE "MFC-230C" \
FALSE "MFC-235C" \
FALSE "MFC-240C" \
FALSE "MFC-250C" \
FALSE "MFC-253CW" \
FALSE "MFC-255CW" \
FALSE "MFC-257CW" \
FALSE "MFC-260C" \
FALSE "MFC-290C" \
FALSE "MFC-295CN" \
FALSE "MFC-297C" \
FALSE "MFC-3220C" \
FALSE "MFC-3240C" \
FALSE "MFC-3320CN" \
FALSE "MFC-3340CN" \
FALSE "MFC-3360C" \
FALSE "MFC-3420C" \
FALSE "MFC-3820CN" \
FALSE "MFC-410CN" \
FALSE "MFC-420CN" \
FALSE "MFC-425CN" \
FALSE "MFC-440CN" \
FALSE "MFC-465CN" \
FALSE "MFC-4800" \
FALSE "MFC-490CW" \
FALSE "MFC-495CW" \
FALSE "MFC-5440CN" \
FALSE "MFC-5460CN" \
FALSE "MFC-5490CN" \
FALSE "MFC-5840CN" \
FALSE "MFC-5860CN" \
FALSE "MFC-5890CN" \
FALSE "MFC-5895CW" \
FALSE "MFC-620CN" \
FALSE "MFC-640CW" \
FALSE "MFC-6490CW" \
FALSE "MFC-660CN" \
FALSE "MFC-665CW" \
FALSE "MFC-6800" \
FALSE "MFC-680CN" \
FALSE "MFC-685CW" \
FALSE "MFC-6890CDW" \
FALSE "MFC-7220" \
FALSE "MFC-7225N" \
FALSE "MFC-7320" \
FALSE "MFC-7340" \
FALSE "MFC-7345N" \
FALSE "MFC-7360" \
FALSE "MFC-7360N" \
FALSE "MFC-7362N" \
FALSE "MFC-7420" \
FALSE "MFC-7440N" \
FALSE "MFC-7450" \
FALSE "MFC-7460DN" \
FALSE "MFC-7470D" \
FALSE "MFC-7820N" \
FALSE "MFC-7840N" \
FALSE "MFC-7840W" \
FALSE "MFC-7860DW" \
FALSE "MFC-790CW" \
FALSE "MFC-795CW" \
FALSE "MFC-820CW" \
FALSE "MFC-820CW" \
FALSE "MFC-8220" \
FALSE "MFC-8370DN" \
FALSE "MFC-8380DN" \
FALSE "MFC-8420" \
FALSE "MFC-8440" \
FALSE "MFC-845CW" \
FALSE "MFC-8460N" \
FALSE "MFC-8480DN" \
FALSE "MFC-8500" \
FALSE "MFC-8660DN" \
FALSE "MFC-8670DN" \
FALSE "MFC-8680DN" \
FALSE "MFC-8690DW" \
FALSE "MFC-8820D" \
FALSE "MFC-8840D" \
FALSE "MFC-885CW" \
FALSE "MFC-8860DN" \
FALSE "MFC-8870DW" \
FALSE "MFC-8880DN" \
FALSE "MFC-8890DW" \
FALSE "MFC-9010CN" \
FALSE "MFC-9030" \
FALSE "MFC-9070" \
FALSE "MFC-9120CN" \
FALSE "MFC-9160" \
FALSE "MFC-9180" \
FALSE "MFC-9320CW" \
FALSE "MFC-9420CN" \
FALSE "MFC-9440CN" \
FALSE "MFC-9450CDN" \
FALSE "MFC-9460CDN" \
FALSE "MFC-9465CDN" \
FALSE "MFC-9560CDW" \
FALSE "MFC-9660" \
FALSE "MFC-9700" \
FALSE "MFC-9760" \
FALSE "MFC-9800" \
FALSE "MFC-9840CDW" \
FALSE "MFC-9860" \
FALSE "MFC-9880" \
FALSE "MFC-990CW" \
FALSE "MFC-9970CDW" \
FALSE "MFC-J220" \
FALSE "MFC-J265W" \
FALSE "MFC-J270W" \
FALSE "MFC-J280W" \
FALSE "MFC-J410" \
FALSE "MFC-J410W" \
FALSE "MFC-J415W" \
FALSE "MFC-J425W" \
FALSE "MFC-J430W" \
FALSE "MFC-J435W" \
FALSE "MFC-J615W" \
FALSE "MFC-J625DW" \
FALSE "MFC-J630W" \
FALSE "MFC-J6510DW" \
FALSE "MFC-J6710DW" \
FALSE "MFC-J6910DW" \
FALSE "MFC-J825DW" \
FALSE "MFC-J835DW")
fi
# Quitter si aucune imprimante sélectionnée
if [[ -z ${imprimante} ]]; then
    exit 0
fi
}

selection_type_connexion() {
connexion=$(zenity --list --radiolist --width=400 --height=180 \
--title="Installation des pilotes pour imprimantes Brother" \
--text="Comment êtes-vous relié à votre imprimante?" \
--column="" --column="Type de connexion" \
FALSE "USB" \
FALSE "Réseau")
# Quitter si aucun choix sélectionné
if [[ -z ${connexion} ]]; then
    exit 0
fi
}

confirmation() {
confirmation=$(zenity --question --width=400 --height=100 \
--title="Installation des pilotes pour imprimantes Brother" \
--text="Lancer l'installation de l'imprimante <b>${imprimante}</b> 
connectée par <b>${connexion}</b>?")
if [[ $? == 1 ]]; then
    exit 0
fi
}

pre_requis() {
echo -e ${Bleu}"Installation des pré-requis"${OffColor}
# AppArmor
apparmor=$(which aa-complain)
if [[ -x ${apparmor} ]]; then
    echo -e ${Vert}"Profil CUPS AppArmor en mode complain"${OffColor}
    ${apparmor} cupsd
fi
# Créer un lien symbolique /etc/init.d/lpd ~> /etc/init.d/cups s'il n'existe pas (pour les modèles suivants)
for i in DCP-1000 DCP-1400 DCP-8020 DCP-8025D DCP-8040 DCP-8045D DCP-8060 DCP-8065DN FAX-2850 FAX-2900 FAX-3800 FAX-4100 FAX-4750e FAX-5750e HL-1030 HL-1230 HL-1240 HL-1250 HL-1270N HL-1430 HL-1440 HL-1450 HL-1470N HL-1650 HL-1670N HL-1850 HL-1870N HL-5030 HL-5040 HL-5050 HL-5070N HL-5130 HL-5140 HL-5150D HL-5170DN HL-5240 HL-5250DN HL-5270DN HL-5280DW HL-6050 HL-6050D MFC-4800 MFC-6800 MFC-8420 MFC-8440 MFC-8460N MFC-8500 MFC-8660DN MFC-8820D MFC-8840D MFC-8860DN MFC-8870DW MFC-9030 MFC-9070 MFC-9160 MFC-9180 MFC-9420CN MFC-9660 MFC-9700 MFC-9760 MFC-9800 MFC-9860 MFC-9880
do
if [[ ${imprimante} == $i ]] && [[ ! -L /etc/init.d/lpd ]]; then
    echo -e ${Vert}"Création d'un lien symbolique /etc/init.d/lpd ~> /etc/init.d/cups"${OffColor}
    ln -s /etc/init.d/cups /etc/init.d/lpd
fi
done
# Installer csh s'il n'est pas insallé (pour les modèles suivants)
for i in DCP-110C DCP-310CN DCP-315CN FAX-1815C FAX-1820C FAX-1835C FAX-1840C FAX-1920CN FAX-1940CN FAX-2440C MFC-210C MFC-3220C MFC-3240C MFC-3320CN MFC-3340CN MFC-3420C MFC-3820CN MFC-410CN MFC-420CN MFC-5440CN MFC-5840CN MFC-620CN
do
if [[ ${imprimante} == $i ]] && [[ ! -x /bin/csh ]]; then
    echo -e ${Vert}"Installation de csh"${OffColor}
    apt-get install csh
fi
done
# Créer le dossier /var/spool/lpd s'il n'existe pas
if [[ ! -d /var/spool/lpd ]]; then
    echo -e ${Vert}"Création du dossier /var/spool/lpd"${OffColor}
    mkdir /var/spool/lpd
fi
# Créer le dossier /usr/share/cups/model s'il n'existe pas
if [[ ! -d /usr/share/cups/model ]]; then
    echo -e ${Vert}"Création du dossier /usr/share/cups/model"${OffColor}
    mkdir /usr/share/cups/model
fi
# Installer ia32-libs s'il n'est pas installé (uniquement pour les systèmes 64 bits)
if [[ ${Arch} == "x86_64" ]] || [[ ${Arch} == "amd64" ]]; then
    dpkg -l ia32-libs > /dev/null
    if [[ $? != 0 ]]; then
        echo -e ${Vert}"Installation de ia32-libs"${OffColor}
        apt-get install ia32-libs
    fi
fi
# Installer sane-utils s'il n'est pas installé
dpkg -l sane-utils > /dev/null
if [[ $? != 0 ]]; then
    echo -e ${Vert}"Installation de sane-utils"${OffColor}
    apt-get install sane-utils
fi
}

installation_imprimante() {
# Existe-t-il un pilote d'impression?
grep "${imprimante}" ${Pwd}/brother/url_printer_drivers > /dev/null
if [[ $? == 0 ]]; then
    echo -e ${Bleu}"Installation des pilotes de l'imprimante"${OffColor}
# Installation pour MFC-8220
    if [[ ${imprimante} == "MFC-8220" ]]; then
        echo -e ${Vert}"Téléchargement du fichier BR8220_2_GPL.ppd.gz"${OffColor}
        wget -cP ${Pwd}/brother/Packages http://www.brother.com/pub/bsc/linux/dlf/BR8220_2_GPL.ppd.gz
        echo -e ${Vert}"Installation du fichier BR8220_2_GPL.ppd"${OffColor}
        gzip -fd ${Pwd}/brother/Packages/BR8220_2_GPL.ppd.gz
        if [[ -f /usr/share/cups/model/BR8220_2_GPL.ppd ]]; then
            mv /usr/share/cups/model/BR8220_2_GPL.ppd{,.backup}
        fi
        cp ${Pwd}/brother/Packages/BR8220_2_GPL.ppd /usr/share/cups/model
        ln -s /usr/share/cups/model/BR8220_2_GPL.ppd /usr/share/ppd/BR8220_2_GPL.ppd
# Installation pour HL-7050 et HL-7050N
    elif [[ ${imprimante} == "HL-7050 - HL-7050N" ]]; then
        echo -e ${Vert}"Téléchargement du fichier BR7050_2_GPL.ppd.gz"${OffColor}
        wget -cP ${Pwd}/brother/Packages http://www.brother.com/pub/bsc/linux/dlf/BR7050_2_GPL.ppd.gz
        echo -e ${Vert}"Installation du fichier BR7050_2_GPL.ppd"${OffColor}
        gzip -fd ${Pwd}/brother/Packages/BR7050_2_GPL.ppd.gz
        if [[ -f /usr/share/cups/model/BR7050_2_GPL.ppd ]]; then
            mv /usr/share/cups/model/BR7050_2_GPL.ppd{,.backup}
        fi
        cp ${Pwd}/brother/Packages/BR7050_2_GPL.ppd /usr/share/cups/model
        ln -s /usr/share/cups/model/BR7050_2_GPL.ppd /usr/share/ppd/BR7050_2_GPL.ppd
# Installation pour HL-8050N
    elif [[ ${imprimante} == "HL-8050N" ]]; then
        echo -e ${Vert}"Téléchargement du fichier BR8050_2_GPL.ppd.gz"${OffColor}
        wget -cP ${Pwd}/brother/Packages http://www.brother.com/pub/bsc/linux/dlf/BR8050_2_GPL.ppd.gz
        echo -e ${Vert}"Installation du fichier BR8050_2_GPL.ppd"${OffColor}
        gzip -fd ${Pwd}/brother/Packages/BR8050_2_GPL.ppd.gz
        if [[ -f /usr/share/cups/model/BR8050_2_GPL.ppd ]]; then
            mv /usr/share/cups/model/BR8050_2_GPL.ppd{,.backup}
        fi
        cp ${Pwd}/brother/Packages/BR8050_2_GPL.ppd /usr/share/cups/model
        ln -s /usr/share/cups/model/BR8050_2_GPL.ppd /usr/share/ppd/BR8050_2_GPL.ppd
    else
# Installation pour tous les autres modèles
        for url in $(grep -A 2 "${imprimante}" ${Pwd}/brother/url_printer_drivers | grep -v "${imprimante}")
        do
        echo -e ${Vert}"Téléchargement du paquet $(basename ${url})"${OffColor}
        wget -cP ${Pwd}/brother/Packages ${url}
        echo -e ${Vert}"Installation du paquet $(basename ${url})"${OffColor}
        dpkg -i --force-all "${Pwd}/brother/Packages/$(basename ${url})"
        done
    fi
#configuration_imprimante
fi
}

installation_scanner() {
# Existe-t-il un pilote scanner?
grep "${imprimante}" ${Pwd}/brother/url_scanner_drivers > /dev/null
if [[ $? == 0 ]]; then
    echo -e ${Bleu}"Installation des pilotes du scanner"${OffColor}
# Installation des pilotes 32 bits
    if [[ ${Arch} == "i386" ]] || [[ ${Arch} == "i686" ]]; then
        for url in $(grep -A 4 "${imprimante}" ${Pwd}/brother/url_scanner_drivers | grep "i386")
        do
        echo -e ${Vert}"Téléchargement du paquet $(basename ${url})"${OffColor}
        wget -cP ${Pwd}/brother/Packages ${url}
        echo -e ${Vert}"Installation du paquet $(basename ${url})"${OffColor}
        dpkg -i --force-all "${Pwd}/brother/Packages/$(basename ${url})"
        done
# Installation des pilotes 64 bits
    elif [[ ${Arch} == "x86_64" ]] || [[ ${Arch} == "amd64" ]]; then
        for url in $(grep -A 4 "${imprimante}" ${Pwd}/brother/url_scanner_drivers | grep "amd64")
        do
        echo -e ${Vert}"Téléchargement du paquet $(basename ${url})"${OffColor}
        wget -cP ${Pwd}/brother/Packages ${url}
        echo -e ${Vert}"Installation du paquet $(basename ${url})"${OffColor}
        dpkg -i --force-all "${Pwd}/brother/Packages/$(basename ${url})"
        done
    fi
configuration_scanner
fi
}

installation_fax() {
# Existe-t-il un pilote fax?
grep "${imprimante}" ${Pwd}/brother/url_fax_drivers > /dev/null
if [[ $? == 0 ]]; then
    echo -e ${Bleu}"Installation des pilotes du fax"${OffColor}
# Installation des pilotes du fax
    for url in $(grep -A 2 "${imprimante}" ${Pwd}/brother/url_fax_drivers | grep -v "${imprimante}")
    do
    echo -e ${Vert}"Téléchargement du paquet $(basename ${url})"${OffColor}
    wget -cP ${Pwd}/brother/Packages ${url}
    echo -e ${Vert}"Installation du paquet $(basename ${url})"${OffColor}
    dpkg -i --force-all "${Pwd}/brother/Packages/$(basename ${url})"
    done
configuration_fax
fi
}

configuration_imprimante() {
echo -e ${Bleu}"Configuration de l'imprimante"${OffColor}
}

configuration_scanner() {
#echo -e ${Bleu}"Configuration du scanner"${OffColor}
if [[ ${connexion} == "USB" ]]; then
    configuration_usb_scanner
# Scanner réseau
elif [[ ${connexion} == "Réseau" ]]; then
    configuration_network_scanner
fi
}

configuration_usb_scanner() {
echo -e ${Vert}"Configuration du scanner USB"${OffColor}
# On ajoute une règle udev
echo -e '# Brother\nATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"' | tee -a /etc/udev/rules.d/40-libsane.rules > /dev/null
service udev restart
}

configuration_network_scanner() {
echo -e ${Vert}"Configuration du scanner réseau"${OffColor}
demander_ip_scanner
# On ping l'adresse
echo -e ${Vert}"Ping de l'adresse : ${ip}"${OffColor}
ping_test=$(ping -c 4 ${ip} > /dev/null)
if [[ $? == 0 ]]; then
# Si l'hôte répond au ping, on ajoute une entrée pour le scanner...
# avec brsaneconfig
    if [[ -x /usr/bin/brsaneconfig ]]; then
        brsaneconfig -a name="Scanner" model="${imprimante}" ip=${ip}
# ou avec brsaneconfig2
    elif [[ -x /usr/bin/brsaneconfig2 ]]; then
        brsaneconfig2 -a name="Scanner" model="${imprimante}" ip=${ip}
# ou avec brsaneconfig3
    elif [[ -x /usr/bin/brsaneconfig3 ]]; then
        brsaneconfig3 -a name="Scanner" model="${imprimante}" ip=${ip}
# ou avec brsaneconfig4
    elif [[ -x /usr/bin/brsaneconfig4 ]]; then
        sed -i '/Support Model/a\
        0x029a, 117, 1, "MFC-8690DW", 133, 4\
        0x0279, 14, 2, "DCP-J525W"\
        0x027b, 13, 2, "DCP-J725DW"\
        0x027d, 13, 2, "DCP-J925DW"\
        0x027f, 14, 1, "MFC-J280W"\
        0x028f, 13, 1, "MFC-J425W"\
        0x0281, 13, 1, "MFC-J430W"\
        0x0280, 13, 1, "MFC-J435W"\
        0x0282, 13, 1, "MFC-J625DW"\
        0x0283, 13, 1, "MFC-J825DW"\
        0x028d, 13, 1, "MFC-J835DW"' /usr/local/Brother/sane/Brsane4.ini
        brsaneconfig4 -a name="Scanner" model="${imprimante}" ip=${ip}
    fi
else
    demander_ip_scanner
fi
}

demander_ip_scanner() {
# On demande l'adresse IP du scanner
ip=$(zenity --entry --title="Installation du scanner" \
--text="Entrez l'adresse IP de votre scanner :\n")
}


configuration_fax() {
echo -e ${Bleu}"Configuration du fax"${OffColor}
if [[ -e /usr/lib/cups/filter/brfaxfilter ]]; then
    chmod 755 /usr/lib/cups/filter/brfaxfilter
    /etc/init.d/cups restart
fi
}

avertissement
selection_modele
selection_imprimante
selection_type_connexion
confirmation
pre_requis
installation_imprimante
installation_scanner
installation_fax
}

######Script installation Canon
INSTALL_CAN() {

avertissement() {
zenity --question --text="Avertissement" \
--text="Les procédures d'installations utilisées dans ce script sont celles décrites sur :
<a href='https://launchpad.net/~michael-gruz/+archive/canon'><b>le ppa de michael-gruz canon</b></a>.

Si vous rencontrez un problème pendant l'utilisation du script, merci de consulter ce lien :
<a href='http://forum.ubuntu-fr.org/viewtopic.php?pid=6455411#p6455411?pid=6417381'><b>forum ubuntu-fr.org.</b></a>
Continuer?" || exit
}

telechargement() {
echo ${Bleu}"Téléchargement de la liste des imprimantes proposées par le PPA pour ${Codename} ${Arch}"${OffColor}
if [[ ${Arch} == "i386" ]] || [[ ${Arch} == "i686" ]]
then Pkg_list="http://ppa.launchpad.net/michael-gruz/canon/ubuntu/dists/${Codename}/main/binary-i386/Packages.bz2"
elif [[ ${Arch} = "x86_64" ]] || [[ ${Arch} == "amd64" ]]
then Pkg_list="http://ppa.launchpad.net/michael-gruz/canon/ubuntu/dists/${Codename}/main/binary-amd64/Packages.bz2"
fi
wget -q ${Pkg_list} -O Paquets_${Codename}_${Arch}.bz2
}

liste() {
bzcat Paquets_${Codename}_${Arch}.bz2 | grep "Package:" | sort -d | sed -e "s/Package: /FALSE /g" | sed -e "s/$/ /g" > liste_${Codename}_all
}

choix(){
Imprimante=$(zenity --list --radiolist --width=400 --height=400 --title="Installation des pilotes pour imprimantes Canon" \
--text="Choisissez votre type d'imprimante parmi la liste suivante:" \
--column="" \
--column="Imprimantes " \
$(grep -v "scangear" liste_${Codename}_all))
if [[ -z ${Imprimante} ]]
then exit 0
fi
}

confirmation() {
Confirmation=$(zenity --question --width=400 --height=100 \
--title="Installation des pilotes pour imprimantes Canon" \
--text="Lancer la mise en place du PPA michael-gruz suivi de l'installation de l'imprimante de type <b>$(echo ${Imprimante} | cut -d '-' -f2)</b>?")
if [[ $? == 1 ]]; then
        exit 0
fi
}

add_ppa() {
echo ${Bleu}"Ajout du PPA michael-gruz"${OffColor}
add-apt-repository ppa:michael-gruz/canon
apt-get update -q
}

installation() {
for Paquet in $(grep "$(echo ${Imprimante} | cut -d '-' -f2)" liste_${Codename}_all | sed -e 's/FALSE//g')
do
echo ${Bleu}"Ajout du paquet ${Vert}${Paquet}"${OffColor}
apt-get install -y --force-yes ${Paquet}
done
}

avertissement
telechargement
liste
choix
confirmation
add_ppa
installation
service udev restart
rm liste_${Codename}_all Paquets_${Codename}_${Arch}.bz2
zenity
${OffColor}
}

verif_dep
echo ${Pwd}/brother
advert
select_marque


echo -e ${Bleu}"Installation terminée."${OffColor}
chown -R ${Qui}:${Qui} ${Pwd}
sudo -k

exit 0

Dernière modification par Compte anonymisé (Le 13/10/2011, à 16:02)

#3 Le 13/10/2011, à 16:54

YannUbuntu

Re : Pilotes Canon pour Linux, enfin !

Bonjour
peut-on compter sur vous pour mettre à jour la Doc svp ? smile   http://doc.ubuntu-fr.org/imprimante


à consulter/améliorer: Guide du Débutant, Logiciels, Ecole, Travail, Maison

Hors ligne

#4 Le 13/10/2011, à 17:20

compte supprimé

Re : Pilotes Canon pour Linux, enfin !

@YannUbuntu;
Je pense qu'il faut attendre que l'epson soit intégré dans le script de fabux ici , les pilote de l'epson sont ici ! un coup de main pour finaliser le script et ajouter l'epson et bien venue !
1 - Brother
2 - Canon
3 - Epson .

Dernière modification par Compte anonymisé (Le 13/10/2011, à 17:21)

#5 Le 13/10/2011, à 22:26

arcar02

Re : Pilotes Canon pour Linux, enfin !

Bonjour

Cela veut dire que ma canon laserbase MF5730
Pourrai fonctionner sous linux ?

http://www.canon.fr/Support/Consumer_Pr … oad&page=1

a+

Hors ligne

#6 Le 15/06/2013, à 16:41

arundel

Re : Pilotes Canon pour Linux, enfin !

Merci pour l'info; j'ai passé deux heures à chercher une solution.  J'aurais du regarder les sites franco en premier wink

Hors ligne