Verificando níveis de tinta no Linux
De Fórum Debian Wiki
Máquina de Teste:
Sistema: Debian
Impressora: Epson c67 USB
1 - Instale os seguintes pacotes pelo apt-get:
apt-get install libieee1284-3 libieee1284-3-dev
Não usa Debian ou não utilza o apt-get: http://cyberelk.net/tim/libieee1284/ Baixe sempre a versão estável.
2 - Debianos, os próximos pacotes não tem nos repositórios Debian officiais e também não tem nos não oficiais (eu fiz a busca no apt-get.org).
Baixe a lib LIBINKLEVEL em: http://libinklevel.sourceforge.net/ (Sempre na versão estável) e faça a instalação do seguinte modo:
tar xzvf libinklevel-0.6.5.tar.gz
cd libinklevel
make
make install
Se receber algum erro como este:
...
linux.c:11:22: ieee1284.h: Arquivo ou diretório não encontrado
linux.c: In function `get_device_id':
linux.c:29: error: storage size of `parports' isn't known
linux.c:52: warning: implicit declaration of function `ieee1284_find_ports'
linux.c:52: error: `E1284_OK' undeclared (first use in this function)
linux.c:52: error: (Each undeclared identifier is reported only once
linux.c:52: error: for each function it appears in.)
linux.c:54: warning: implicit declaration of function `ieee1284_get_deviceid'
linux.c:55: error: `F1284_FRESH' undeclared (first use in this function)
linux.c:29: warning: unused variable `parports'
make: ** [linux.o] Erro 1
...
É porque o primeiro pacote que pedi aqui não foi instalado ou algum erro do pacote libieee1284
3 - Baixe o pacote INK no site http://ink.sourceforge.net/ e faça a instalação:
tar xzvf ink-0.3.1.tar.gz
cd ink
make
make install
Instalado!
4 - Uso. Como tenho uma impressora USB usei:
ink -p usb
E para portas paralelas
ink -p parport
Você ainda pode especificar uma porte usando a opção -n; Essas são as únicas opções do programa, a saída é assim:
Baby:/home/redy/ink# ink -p usb
ink v0.3.1 (c) 2006 Markus Heinz
EPSON Stylus C67
Black: 99%
Cyan: 97%
Magenta: 10%
Yellow: 0%
Baby:/home/redy/ink#
