Ink – checking the ink level of your printers from CLI

After trying a few tools for checking the ink level of my printers, the most convenient for me is command line tool Ink which make use of libinklevel. It’s quick and easy way to check ink level.

 

Installing Ink

On ubuntu system type this one line in Terminal:

sudo apt-get update && sudo apt-get install ink

If you are using other distro, sources and instructions for installation can be found here.

Basic usage of Ink

USB printers
  • first usb printer (type in Terminal):
ink -p usb
  • or specific usb printer
ink -d /dev/usb/lp0    #change /dev/usb/lp0 with your device>

I should change those catridges...lol

Canon Network Printers
  • first Canon Network printer ink level (type in Terminal)
ink -b bjnp
  • specific Network printer
ink -b bjnp://"hostname or ip address"

List of supported printers can be found here.

List of not supported printers can be found here.

NOTE: on some system you have to use sudo due to file (device) permissions.

Error message due to device permissions

If that’s the case, deploy chmod command and assign read and write permissions to all. Like this:

sudo chmod 666 /dev/usb/lp0 #change /dev/usb/lp0 with your device

Check out the whole process of installing, changing permissions and using ink in this video.

UPDATE TO ONEIRIC WILL CAUSE INK STOP WORKING: It turned out /dev/usb/lp0 was missing. This appears to be due to the module usblp no longer being loaded automatically when the printer is connected. It seems that CUPS is using new printer-ID-based URI “usb://Canon/iP4300?serial=923410”  so I’m stuck for now.

One Response to Ink – checking the ink level of your printers from CLI

  1. ssnjara says:

    UPDATE TO ONEIRIC WILL CAUSE INK STOP WORKING: It turned out /dev/usb/lp0 was missing. This appears to be due to the module usblp no longer being loaded automatically when the printer is connected. It seems that CUPS is using new printer-ID-based URI “usb://Canon/iP4300?serial=923410

Odgovori na ssnjara Otkaži odgovor