I have a network printer. I can send a postscript file to the printer using nc, and the printer prints it:

cat tiger.eps | nc 9100

If I want to print from my applications (ie from Thunderbird, Chromium), I can print to file (.ps) and then send the file with nc, as shown above.

However, that is quite tedious. I would like to print directly from my application.

What do I have to do, so that applications are aware that there exists a printer at and can print directly to that printer ?

What is the easiest solution? Preferably, I would like to avoid having to install CUPS.

Also, what is the purpose of the PPD file ? Obviously I don't need it for printing via nc.

I am using Debian Wheezy, and LXDE desktop environment. But I am looking for a DE-agnostic solution.


You should check out LPRng (packaged as lprng in Debian); it supports remote printing using JetDirect (which is the protocol used over port 9100), with an /etc/printcap file like


where remote is the name your printer is given locally. See the documentation for details and caveats, and the Debian package's documentation too. You'll probably want to add some filtering with magicfilter for example.

Once everything is configured, you can use lp, lpq etc. on the command-line, and the printer should also be accessible from applications. One major exception is Gtk+ 3 and KDE applications, which don't support LPR-style printing at all; if you want integrated support there you'll need to install CUPS.

PPD files allow applications to take the printer's features and characteristics into account: available paper sizes, colour capabilites, duplex capabilities, available print resolutions, minimum margins etc.

  • I have installed lprng, set up /etc/printcap. I can print from the command line using: echo "hello" | lpr. But, I still don't see the printer in my GUI applications. I am using GTK2, not GTK3. – Martin Vegter Mar 9 '16 at 17:48
  • Did you check the Debian package's documentation? The first section there explains how to configure Gtk+ 2 applications; you'll need to restart them (just the individual applications, not the whole desktop) after adding gtk-print-backends = "file,lpr" to either /etc/gtk-2.0/gtkrc or ~/.gtkrc-2.0. – Stephen Kitt Mar 9 '16 at 22:10

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.