PDA

View Full Version : Stampante di rete che non funziona


balubeto
20-07-2006, 11:31
CIAO

Ho installato e configurato il modulo hplip da sorgenti ma, ora, non mi parte il demone hpiod all'avvio di Linux in modalita` testuale. Come faccio a farlo partire all'avvio della mia Linux-box e, ovviamente, a fermarlo quando la mia macchina si spegne o si riavvia sapendo che tale demone e` diretto da questo script:


PLUTO:~# cat /etc/init.d/hplip
#! /bin/bash
#
# Startup/shutdown script for HPLIP
#
# Note, this script file must start before cupsd.
#
# For chkconfig the HPLIP priority (ie: 50) must be less the cupsd
# priority (ie: 55).
#
# For LSB install_initd the cups script file should have "hplip" in the
# Should-Start field.
#
# chkconfig: 2345 50 10
# description: Start/stop script for HP Linux Imaging and Printing (HPLIP).
#
# (c) 2004 Copyright Hewlett-Packard Development Company, LP
#
### BEGIN INIT INFO
# Provides: hplip
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: Start/stop script for HP Linux Imaging and Printing (HPLIP)
### END INIT INFO

HPIODDIR=/usr/sbin
HPSSDDIR=/usr/share/hplip
RUNDIR=/var/run

if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
else

export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022

daemon() {
$* >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo -ne " [ OK ]\r"
else
echo -ne " [FAILED]\r"
fi
}

killproc() {
pid=`pidof -s $1`
pidfile=$RUNDIR/${1}.pid
if [ -z $pid ]; then
if [ -f $pidfile ]; then
read pid < $pidfile
kill $pid
fi
else
kill $pid
fi
retval=$?
if [ -f $pidfile ]; then
rm $pidfile
fi
if [ $retval -eq 0 ]; then
echo -ne " [ OK ]\r"
else
echo -ne " [FAILED]\r"
fi
}

fi

mystatus() {
pid=`pidof -s $1`
if [ -z $pid ]; then
pidfile=$RUNDIR/${1}.pid
if [ -f $pidfile ]; then
read pid < $pidfile
fi
fi

if [ -n "$pid" ]; then
echo $"$1 (pid $pid) is running..."
return 0
fi

echo $"$1 is stopped"
return 3
}

RETVAL=0

start() {
echo -n $"Starting hpiod: "
cd $HPIODDIR
daemon ./hpiod
RETVAL=$?
echo
[ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpiod
echo -n $"Starting hpssd: "
cd $HPSSDDIR
daemon ./hpssd.py
RETVAL=$?
echo
[ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpssd.py
# killall -HUP cupsd
if [ -f /var/lock/subsys/hpiod -a -f /var/lock/subsys/hpssd.py ]; then
touch /var/lock/subsys/hplip
return 0
else
return 1
fi
}

stop() {
echo -n $"Stopping hpiod: "
killproc hpiod
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/hpiod
echo -n $"Stopping hpssd: "
killproc hpssd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/hpssd.py
for pidfile in $RUNDIR/*; do
case "$( basename $pidfile )" in
hpguid-*.pid)
read pid < $pidfile
kill $pid
rm $pidfile
esac
done
if [ ! -f /var/lock/subsys/hpiod -o ! -f /var/lock/subsys/hpssd.py ]; then
rm -f /var/lock/subsys/hplip
fi
return $RETVAL
}

restart() {
stop
start
}

debug() {
# Allow core dumps.
ulimit -c unlimited

echo -n $"Starting hpiod: "
cd $HPIODDIR
./hpiod >/dev/null 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo -ne " [ OK ]\r"
else
echo -ne " [FAILED]\r"
fi
echo
[ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpiod
echo -n $"Starting hpssd: "
cd $HPSSDDIR
./hpssd.py >/dev/null 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo -ne " [ OK ]\r"
else
echo -ne " [FAILED]\r"
fi
echo
[ $RETVAL = 0 ] && [ -d /var/lock/subsys ] && touch /var/lock/subsys/hpssd.py
if [ -f /var/lock/subsys/hpiod -a -f /var/lock/subsys/hpssd.py ]; then
touch /var/lock/subsys/hplip
return 0
else
return 1
fi
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
mystatus hpiod
mystatus hpssd
;;
condrestart)
[ -f /var/lock/subsys/hpiod ] && [ -f /var/lock/subsys/hpssd.py ] && restart || :
;;
debug)
debug
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
exit 1
esac

exit $?


Ho provato a configurare Cups per poter stampare ma, quando faccio per stampare mi appare questo errore:

http://immagini.p2pforum.it/out.php/i36552_Errorecups.JPG

Durante la configurazione della stampante via shell, ho scritto hp-setup -a <ip address of printer> per aggiungere la stampante ma, quando ho dovuto scegliere il file ppd, ho dovuto scegliere il file HP-OfficeJet_7400-hpijs.ppd anche se ho una stampante HP Officejet 7410 All-in-One. Per caso, qualcuno ha il file ppd proprio per la mia stampante?

GRAZIE

CIAO

Uso la Debian Etch Testing.

WebWolf
20-07-2006, 12:51
Sul sito dell'hp (quello global, non su quello italiano) in 'download drivers' c'è il link linux xhe ti manda ad una pagina (sourceforge)in cui sono elencate le compatiilità con le stampanti hp.

Io ho recentemente installato delle 1022n, 1220n e 4050n e non ho mai avuto problemi.

Tutte installate con l'opzione -a [ip_address] da riga di comando.

Se non trovi il link provo a ricercarlo io.

Di solito occorre installare alcuni pacchetti aggiuntivi della distribuzione (almeno per Ubuntu è così).

Aggiunta:

... non vedo il link 'linux' ...
http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?product=391194&lc=en&cc=us&dlc=en&submit.y=0&submit.x=0&lang=en&cc=us

Il link comunque è questo:
http://hpinkjet.sourceforge.net/supportstatement.php