I need to enable/disable print button in my application based on status of available printers.

For USB drivers, I am checking sysfs ( /sys/class/usbmisc/lp0/dev ). But for Network drivers I didn't get such node. So I am using lpstate -p command to get status. If status is idle or ready, I accept it as network printer is available.

Is there a better way of checking network printer status??

  • Don't you also need to handle virtual printers such as Cups-PDF and Boomaga? – Stephen Kitt Aug 12 '15 at 18:48
  • No, only physical printer. – user746184 Aug 12 '15 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.