Ok, I noticed several times that printerdrake could not find my network printer and that I have to enter the IP adresse manually, so I wonder why ? I notice also someti�es the same problem with diskdrake when it's about to show NFS server ... So I dig a little in /usr/lib/libDrakX/printer/detect.pm
Note : my broadcast is 192.168.1.255 and I have a network printer which IP is 192.168.1.40 1�/ Is the detection routine ( getIPsInLocalNetworks() ) is very right ? If I cut & paste it on shell, I have this : [EMAIL PROTECTED] admin]# ping -w 1 -b -n 192.168.1.255 | cut -f 4 -d ' ' | sed s/:// | egrep '^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+' | uniq | sort WARNING: pinging broadcast address If I omit the \\ for \ [EMAIL PROTECTED] admin]# ping -w 1 -b -n 192.168.1.255 | cut -f 4 -d ' ' | sed s/:// | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | uniq | sort WARNING: pinging broadcast address 192.168.1.10 192.168.1.101 192.168.1.102 192.168.1.103 192.168.1.104 192.168.1.105 192.168.1.151 192.168.1.152 192.168.1.153 192.168.1.154 192.168.1.160 192.168.1.254 192.168.1.40 As the warning is annoying and should not appear : [EMAIL PROTECTED] admin]# ping -w 1 -b -n 192.168.1.255 2>/dev/null | cut -f 4 -d ' ' | sed s/:// | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | uniq | sort 192.168.1.10 192.168.1.101 192.168.1.102 192.168.1.103 192.168.1.104 192.168.1.105 192.168.1.151 192.168.1.152 192.168.1.153 192.168.1.154 192.168.1.160 192.168.1.254 192.168.1.40 So this is fine. Now what's about the routine which scan the differents host ( whatNetPrinter ) ? nmap -r -P0 --host_timeout 400 --initial_rtt_timeout 200 -p 9100 192.168.1.40 First time I test I had nothing and nmap failed with "skipping host 192.168.1.40 due to host timeout" . When I removed --host_timeout 400, or If I do it a second time it works. So maybe host_timeout value should be increase ... Don't forget it's milliseconds ! But even by increasing these value, printerdrake still don't give me the list of network printer printers in my LAN. So what's wrong ? There's must be something wrong after ... I expect that printerdrake could give me the list of network printers in my LAN if I check autodetect printers and select TCP/IP/Socket printers ... And from this list I choose a printer and then configure it ... AM I wrong ? [EMAIL PROTECTED] admin]# nmap -r -P0 --host_timeout 400 --initial_rtt_timeout 200 -p 631,9100 192.168.1.40 Starting nmap 3.30 ( http://www.insecure.org/nmap/ ) at 2003-10-01 20:11 GMT Skipping host 192.168.1.40 due to host timeout Nmap run completed -- 1 IP address (1 host up) scanned in 0.567 seconds [EMAIL PROTECTED] admin]# nmap -r -P0 --host_timeout 400 --initial_rtt_timeout 200 -p 9100 192.168.1.40 Starting nmap 3.30 ( http://www.insecure.org/nmap/ ) at 2003-10-01 20:11 GMT Interesting ports on 192.168.1.40: Port State Service 9100/tcp open jetdirect Nmap run completed -- 1 IP address (1 host up) scanned in 0.019 seconds --- dams: au pire tu te sers de $_[0] mais je trouve que $::i c'est plus lisible #mandrakefr
