[ubuntu-uk] Ink level report .....
Mark
markymoo75 at gmail.com
Fri Nov 26 21:18:39 GMT 2010
On 26 November 2010 20:37, Barry Drake <bdrake at crosswire.org> wrote:
> On Fri, 2010-11-26 at 17:56 +0000, Barry Drake wrote:
> > 'mtink' looks as though it might work, but I wonder if anyone here knows
> > of something that will do the job on my sister's printer.
>
> I've just answered my own question. I talked her through installing
> mtink and it works well and shows all the ink levels correctly. When I
> come over, I'll write her a script to save her having to open a terminal
> and use 'sudo mtink'.
>
> Regards, Barry Drake.
>
> --
> Sent from my desktop using Ubuntu - the window-free environment
> that gives me real fresh air.
>
>
> --
> ubuntu-uk at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
> https://wiki.ubuntu.com/UKTeam/
>
Looks like you have it sussed but here is a somewhat over engineered script
I wrote for checking ink levels for a Canon attached :
user=$UID
if [ $user != 0 ]
then
zenity --error --text "You must run this script as root in order
to run the right programs"
exit
fi
function mainMenu {
install_pkgs
test_ink
}
function install_pkgs {
#this script requires ink libinklevel5
iink=$(dpkg -l | grep "ii ink")
if test ${#iink} -le 0
then
apt-get install --yes ink
fi
}
function test_ink {
ink_levels=$(ink -p usb)
zenity --info --text "$ink_levels"
}
mainMenu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-uk/attachments/20101126/094b88b5/attachment.htm
More information about the ubuntu-uk
mailing list