<div class="gmail_quote">On 26 November 2010 20:37, Barry Drake <span dir="ltr">&lt;<a href="mailto:bdrake@crosswire.org">bdrake@crosswire.org</a>&gt;</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>
&gt; &#39;mtink&#39; looks as though it might work, but I wonder if anyone here knows<br>
&gt; of something that will do the job on my sister&#39;s printer.<br>
<br>
</div>I&#39;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&#39;ll write her a script to save her having to open a terminal<br>
and use &#39;sudo mtink&#39;.<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: &#39;Times New Roman&#39;; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; ">

user=$UID
 if [ $user != 0 ] 
  then
    zenity --error --text &quot;You must run this script as root in order to run the right programs&quot;
  exit
 fi
 
function mainMenu {
        install_pkgs
        test_ink
        }

function install_pkgs {
        #this script requires ink libinklevel5
        iink=$(dpkg -l | grep &quot;ii  ink&quot;)
        if test  ${#iink} -le 0 
        then
        apt-get install --yes ink
        fi

        }

function test_ink {
        ink_levels=$(ink -p usb)
        zenity --info --text &quot;$ink_levels&quot;
        }

mainMenu</pre></span></div>