Getting access to the printer device without sudo

Having recently discovered libinklevel and ink, I’ve been using them to check the status of the ink levels on my Canon i950 printer, connected via USB to my Ubuntu Feisty Fawn box. I’ve been having to run the ink command using sudo so that libinklevel can access the raw device, /dev/usblp0. E.g.:

$ sudo ink -p usb

It’s tedious and easy to forget the sudo though.

Let’s have a look at the permissions on /dev/usblp0:

$ ls -l /dev/usblp0 
crw-rw---- 1 root lp 180, 0 Jul 18 06:03 /dev/usblp0

A ha. Users in the lp group can access the device. Let me add myself to the lp group then:

$ sudo -G lp -a marc
(Log out and back in so that my user picks up the new group - 
You can verify that you're in the group with the id command)
$ ink -p usb  
ink v0.4.1 © 2007 Markus Heinz

Canon i950

Cyan:                          40%
Light Cyan:                   100%
Black:                         10%
Yellow:                        70%
Magenta:                       10%
Light Magenta:                100%

Voila!

One thought on “Getting access to the printer device without sudo

  1. Pingback: Marc Abramowitz » inkblot: GNOME ink level utility

Leave a Reply

Your email address will not be published.