While screwing around my garage, I've found an ancient matrix printer, Epson LX-1050. Ubuntu recognised it without problems, and I was able to print several pages using it via CUPS.

Now, for some reason, I want to use this printer the way it was designed back in 1994: to write directly to parallel port. I've tried the most simplistic approach that works to operate my USB 3G modem:

echo "Y helo thar" > /dev/lp0

I've got an error:

bash: /dev/lp0: Access denied

I've tried sudo'ing this command with no success. Also tried to mirror the DOS approach of copying file to LPT1:

cp /etc/hosts /dev/lp0

Again with no success.

Any suggestions that I can try to get this approach to work?

  • You should be able to write to that. Strange!
    – sinni800
    Jun 24 '11 at 17:43

I seem to have it figured out. Silly me. While googling examples of lpadmin usage, I've stubled upon this link: http://ubuntuforums.org/showthread.php?t=1437325

Permissions on dev/lp0 were:

c---rw---- 1 root lp 6, 0 2011-06-26 22:47 /dev/lp0

Group lp, from my knowledge, has only the lp user. After I performed

sudo chmod 666 /dev/lp0

the following command started working as intended, making printer to output symbols to paper:

echo "Y helo thar" > /dev/lp0

Well, I suppose that is a nice foolproof against someone accidentally writing to LPT port aside from printing daemon, but still it makes no sense for me, why is it disabled for root?


Probably the lp daemon (print spooler) has exclusive ownership of /dev/lp. Shutdown the spooler (read up on lpadmin and /usr/bin/disable).

  • While your idea is not entirely correct, it made me go and read up on how the printing in Linux works. Thanks.
    – xyzman
    Jun 26 '11 at 19:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.