<div class="gmail_quote">On 26 November 2010 20:37, Barry Drake <span dir="ltr"><<a href="mailto:bdrake@crosswire.org">bdrake@crosswire.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, 2010-11-26 at 17:56 +0000, Barry Drake wrote:<br>
> 'mtink' looks as though it might work, but I wonder if anyone here knows<br>
> of something that will do the job on my sister's printer.<br>
<br>
</div>I've just answered my own question. I talked her through installing<br>
mtink and it works well and shows all the ink levels correctly. When I<br>
come over, I'll write her a script to save her having to open a terminal<br>
and use 'sudo mtink'.<br>
<br>
Regards, Barry Drake.<br>
<div><div></div><div class="h5"><br>
--<br>
Sent from my desktop using Ubuntu - the window-free environment<br>
that gives me real fresh air.<br>
<br>
<br>
--<br>
<a href="mailto:ubuntu-uk@lists.ubuntu.com">ubuntu-uk@lists.ubuntu.com</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk</a><br>
<a href="https://wiki.ubuntu.com/UKTeam/" target="_blank">https://wiki.ubuntu.com/UKTeam/</a><br>
</div></div></blockquote></div><br><div><br></div><div>Looks like you have it sussed but here is a somewhat over engineered script I wrote for checking ink levels for a Canon attached :</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; ">
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</pre></span></div>