Skip to content

Setting Up A Raw Printer in Ubuntu Linux

Tres Finocchiaro edited this page Jan 18, 2023 · 16 revisions

Compatibility

This tutorial is for raw printers only. If unsure please see What is Raw Printing?

Background

These steps will allow a USB, Network, Serial or Parallel attached printer to receive raw commands through Java on Ubuntu Linux.

Steps

  1. Open Settings > Printers > Additional Printer Settings

    Screenshot 2023-01-18 at 2 03 22 AM
  2. Click +Add

  3. Set up the printer/port settings:

    For USB Printer:

    Devices: Enter URI

    Enter Device URI: usb://Zebra/LP2844 (example)

    Get this port by issuing the command lpinfo -v |grep usb:

    Note: You don't need the "? location=1a200000" information.

    For Network Printer:

    Devices: AppSocket/HP JetDirect

    Host: 192.168.254.254 (example)

    Port: 9100

    The Host IP address may be configured to use a different address, which is outside of the scope of this tutorial. If AppSocket is not listed, close and relaunch the Wizard and it should appear.

    For Serial Printer

    Devices: Enter URI

    Enter Device URI: serial:/dev/ttyS0 (or serial:/dev/ttyUSB0, etc)

    For USB serial, issue the command dmesg |grep tty

    Insufficient permissions fix: This command grants the logged in user write permission to all serial ports:

    sudo usermod -a -G dialout $USER;

    Note: 12.04 users may also need to remove [ModeManager] (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/662881) due to a specific bug, ttylUSB devices don't seem writable by CUPS, so try printToFile('/dev/ttyUSB0'); instead.

  4. Click Forward

  5. Driver: Select printer from Database > Generic > Forward

  6. Models: Raw Queue

    Drivers: Generic Raw Queue > Forward

    image
  7. Printer Name: (ie: my_raw_printer)

    Description: My Raw Printer

You may now print to your printer as a raw device.


To learn how to print from a webpage continue to Getting Started