Check the ink level of your printer with linux

Ink


Description

Ink is a command line tool for checking the ink level of your locally connected printer on a system which runs Linux or Solaris 10 or OpenSolaris. Canon BJNP network printers are supported too. It makes use of libinklevel. A list of currently supported printers can be found here. You can download the sourcecode here. If you prefer another kind of user interface have a look at the libinklevel homepage for other frontends.

News

20/02/2010 Release of version 0.5.1. A new parameter for a threshold limiting the ink levels displayed to the ones below or equal to the threshold has been introduced. A man page has been added. The build system has been changed to autoconf and automake.
29/01/2009 Release of version 0.5.0. This version requires at least libinklevel version 0.8.0. Support for Canon BJNP network printers has been added. Support for Solaris 10 and OpenSolaris has been added.
28/05/2007 Release of version 0.4.1. A bug in the ink cartridge naming has been removed.
14/03/2007 Release of version 0.4.0. This release requires the newest libinklevel (v0.7.0 or higher). Two new parameters have been added: One for querying the version information of ink and libinklevel, and one for directly specifying the usb device the printer is connected to.
09/03/2007 Release of version 0.3.2rc4. Adaption to changes in current libinklevel. This version requires libinklevel version 0.6.6rc6 or higher.
05/10/2006 Release of version 0.3.2rc3. Error handling has been improved. This version requires libinklevel version 0.6.6rc5 or higher.
16/09/2006 Release of version 0.3.2rc2. Ink has been adapted to the changes in libinklevel. This version requires libinklevel version 0.6.6rc4 or higher.
06/09/2006 Release of version 0.3.2rc1. Ink has been adapted to the new interface of libinklevel. This version requires libinklevel version 0.6.6rc3 or higher.
03/04/2006 Release of version 0.3.1. A bug which prevented proper operation on PPC systems has been fixed.
26/02/2004 Project moved to Sourceforge.
03/12/2003 Release of version 0.3. Requires libinklevel version 0.6 or greater. Error handling has been improved.
07/09/2003 Release of version 0.2. Now also supports Epson printers.
25/08/2003 Initial version released and web page set up.

Printers supported

All printers supported by libinklevel attached via parallel port or usb are supported. Canon BJNP network printers are supported too.

Screenshot

Screenshot of ink in use

License

This software is licensed under the GPL version 2. It comes with no warranty.

Download

Stable releases

Installation and usage

You need gcc installed. libieee1284 (only on Linux) and libinklevel ≥ 0.8.0 are required.

tar xzf ink-0.5.1.tar.gz
cd ink-0.5.1
./configure
make
make install
				

On RPM based systems with the rpmbuild command available you can create a RPM package by running:

tar xzf ink-0.5.1.tar.gz
cd ink-0.5.1
./configure
make rpm
				

This will create a RPM file for you.

Run the program as follows:

ink -p <port> [-n <portnumber>] [-t <threshold>]
				

where port is either "parport" or "usb" and portnumber is the number of the port to which your printer is connected. The portnumber is optional and defaults to 0. The optional threshold limits the ink levels displayed to the ones below or equal to the given threshold. Alternatively you can run ink like that:

ink -d /dev/usb/lp0
				

where /dev/usb/lp0 is the device node your printer is attached to. Note: On Linux this works only for usb devices, not for parallel port devices. On Solaris 10 and OpenSolaris this works with parallel port devices too.

You can query the first BJNP Canon network printer found like this:

ink -p bjnp
				

You can query a BJNP Canon network printer also by specifying its URI or IP address like this:

ink -b bjnp://<URI or IP address>
				

You can query the version numbers of ink and libinklevel like this:

ink -v
				

You need read/write permission on the device the printer is connected to. See here for details.

Feedback

Send comments, suggestions, critics to Markus Heinz.