-
Notifications
You must be signed in to change notification settings - Fork 281
Setting Up A Raw Printer in Ubuntu Linux
#Setting Up A Raw Printer in Ubuntu Linux
This tutorial is for raw printers only. If unsure please see What is Raw Printing?
##Background
These steps will allow a USB or Network attached printer to receive raw commands through the Firefox web browser on Ubuntu Linux.
The sample.html provided with qz print is intended to run from the local file system, however newer Firefox versions may not run the applet unless it is hosted from a web server.
If you experience issues getting the applet to load, running a small LAMP server is recommended. This will run a portable web server on your Ubuntu Desktop. Installing and configuring LAMP is outside the scope of this tutorial.
##Steps
- Visit http://www.javatester.org/version.html to confirm Java is installed and running properly.
-
If Java is not installed, install OpenJDK Java 7 Runtime using the Ubuntu Software Center (or [click here] (http://apt.ubuntu.com/p/openjdk-7-jre)).
Note: Oracle Java can be used if necessary, but this process is outside the scope of this tutorial. More information on versions can be found here.
-
To enable Java in the Firefox web browser, install Icedtea Java 7 Plugin using the Ubuntu Software Center (or [click here] (http://apt.ubuntu.com/p/icedtea-7-plugin)).
Note: KDE Desktops may also need "xul-runner" installed.
-
If you are running an older version of Java (1.5, 1.6, etc), it has been reported that older versions of Java need to be removed completely for Java 7 to work properly in Ubuntu as the browser will fall back to the older version.
-
In OpenJDK,, the output normally seen in the Java Console is only visible when the web browser is launched from a terminal window.
In Ubuntu, open a new terminal > Firefox > Enter
-
Open System Settings > Printers
-
Click +Add
-
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. -
Click Forward
-
Driver: Select printer from Database > Generic > Forward
-
Models: Raw Queue
Drivers: Generic Raw Queue > Forward
-
Printer Name: (ie: zebra)
Description: Raw Zebra Printer
Location: Ubuntu PC
You may now print to your printer.
Note: If you receive a message "Printer 'zebra' not found", completely close and restart your web browser so that Java can see the newly added printer.
Continue to Getting Started With qz-print for printing a test page from Firefox.