How to send a zpl-file directly to usb printer

I have a ZEBRA ZT230 300dpi ZPL printer to which I m trying to send direct commands (without driver). I have the following simple zpl file:

^XA
^LH30,30
^FO20,10^AD^FDHello World^F5
^XZ

I have tried the commands:

cat label.zpl > /dev/bus/usb/001/004
cat label.zpl > /dev/usb/lp0

But in both cases I get bash: Permission denied

How can I send my file directly to the printer?

1 Answer

Add the user you do this with to be part of the GROUP /dev/usb/lp0 is set to.

ls -l /dev/usb/lp0

to get owner and group for /dev/usb/lp0. The group is likely to be lp. If your user is paul that would be

sudo usermod -a -G lp paul

You need to restart the session to make this active.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like