Ink – checking the ink level of your printers from CLI
2011/10/08 1 komentar
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
- 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>
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.
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.