Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is the device name of a USB printer ?

34 views
Skip to first unread message

Guillaume Dargaud

unread,
Jul 24, 2012, 10:31:09 AM7/24/12
to
Hello all,

OK, this is not really a scripting question, but when you have a USB printer
defined with CUPS, what is the device name ?
There are several command line tools, such as 'ink' or 'escputil', that need
/dev/lp or such but I can't find it:
$ find /dev -name "*lp*"
reports nothing, and there's nothing interesting in /dev/bus/usb

Thanks
--
Guillaume Dargaud
http://www.gdargaud.net/

Lew Pitcher

unread,
Jul 24, 2012, 10:52:04 AM7/24/12
to
On Tuesday 24 July 2012 10:31, in comp.unix.shell,
use_the_co...@www.gdargaud.net wrote:

> Hello all,
>
> OK, this is not really a scripting question, but when you have a USB
> printer defined with CUPS, what is the device name ?
> There are several command line tools, such as 'ink' or 'escputil', that
> need /dev/lp or such but I can't find it:
> $ find /dev -name "*lp*"
> reports nothing, and there's nothing interesting in /dev/bus/usb

Assuming that you are using a kernel 2.6 or 3.x Linux based system,
dmesg | grep lp
should report something like
usblp0: USB Bidirectional printer dev 4 ...

If you don't see this sort of line, then the kernel didn't detect the usb
printers at all.

OTOH, if you /do/ see the above lines, then your system's udev rules should
have created a device entry for the device, probably under /dev/usb
~ $ ls -l /dev/usb
total 0
crw-rw---- 1 root lp 180, 0 2012-07-24 08:10 lp0

HTH
--
Lew Pitcher
"In Skills, We Trust"

Guillaume Dargaud

unread,
Jul 26, 2012, 10:06:27 AM7/26/12
to
> Assuming that you are using a kernel 2.6 or 3.x Linux based system,
> dmesg | grep lp
> should report something like
> usblp0: USB Bidirectional printer dev 4 ...

$ dmesg | grep lp
[ 8.621605] lp: driver loaded but no devices found

But, but... the printer did work fine for months. Until it ran out of ink.

> If you don't see this sort of line, then the kernel didn't detect the usb
> printers at all.

Something doesn't make sense here, unless the printer somehow disappears
when the ink's out. But I changed all ink cartridges and the ink LED is
still on. I wonder if it's defective.

Ben Bacarisse

unread,
Jul 26, 2012, 10:22:58 AM7/26/12
to
Does it show up using lsusb?

--
Ben.

Alan Curry

unread,
Aug 16, 2012, 11:30:10 PM8/16/12
to
In article <0.fc09a92ec2bc1c7b5f06.2012...@bsb.me.uk>,
Good question. Also, is the usblp kernel module loaded?

--
Alan Curry
0 new messages