User Tools

Site Tools


it_services:pf:printing

This is an old revision of the document!


Printing

Printing is provided in two different ways:

  • For machines connected to the network via cable, print queues are provided by the CUPS server cups.hep.lu.se. Machines should connect to it to print.
    • Clusters and Workstations are automatically connected to all the printers served by it. No installation is needed.
    • Laptops with cable connection might install the printers following these instructions
  • Wireless printing is disabled for security reasons.For machines connected to the network via wireless, one must connect directly to each printer and configure it. * Click here for installation instructions

About the available printers

The following print queues are available from the Linux computers:

Printer Name Duplex Colour Paper size Location Notes hostname
lw1 Yes No A4 Room A404 lw1.hep.lu.se
clw2 Yes Yes A4 Room A404 clw2.hep.lu.se
Ricoh Yes Yes A3/A4 Entré - Fysikum Reception :!: Printing on this machine will be billed to our division. Use only if strictly needed. fysik-printer.fysik.lu.se
This machine is only accessible from workstations. To access it with other machines contact Florido.

The printer lw1, is the default printer. It will be used if no printer is specified.

How to print

Workstations and Clusters

Using a graphical interface

Nowadays most of printing from workstations can be done via graphical tools. The KDE and Gnome environments provide their own intuitive tools, so these will not be described here.

Using the command line

On clusters and servers this might not be straightforward. Therefore the following command line instructions apply.

List available printers
lpstat -a
tjatte:~> lpstat -a
clw1 accepterar begäran sedan tor 27 mar 2014 15.56.09
clw1_trans accepterar begäran sedan mån 31 mar 2014 06.33.55
clw2 accepterar begäran sedan mån 31 mar 2014 13.36.56
lw1 accepterar begäran sedan mån 31 mar 2014 11.08.59
lw4 accepterar begäran sedan mån 31 mar 2014 10.03.26
Ricoh accepterar begäran sedan tis 25 feb 2014 20.23.31
Standard usages

To print a document “file.ps” to the default printer, use

lpr file.ps

To print to another printer (newprinter in this example) use

lpr -P lw1 file.ps

To see what is in the print queue

lpq
lpq -P clw2

To remove all your printouts from the queue

lprm -
lprm - -P clw2
Duplex/simplex

Printers that are able to print duplex, do that by default, and are flipping the page along the long edge. To print in simplex (only on one side of the paper)

lpr -o sides=one-sided file.ps

To print on both sides and flip along the short edge

lpr -o sides=two-sided-short-edge file.ps

To print on both sides and flip along the long edge (default)

lpr -o sides=two-sided-long-edge file.ps
lpr -o page-ranges=4 file.ps
lpr -o page-ranges=1-8 file.ps
lpr -o page-ranges=1,3,6 file.ps
Pretty printing
lpr -p file.ps

or

lpr -o prettyprint file.ps

Specifies that the file should be formatted with a shaded header with the date, time, job name, and page number. This option is only useful when printing text files.

To print two pages on each side of the paper

lpr -o number-up=2 file.ps

And to get in even more on the paper

lpr -o number-up=4 file.ps

You can also use 8 and 16. But can you read it?

Rotate

To rotate the page 90 degrees and print it in landscape orientation

lpr -o landscape file.ps

In most cases it is better to create the file in landscape orientation.

Mirroring
lpr -o mirror file.ps

Might be useful if you want to print something that Leonardo D. has written. Combining options You can combine the options, like in the following example

lpr -P lw1 -o prettyprint -o number-up=2 file.ps
Other useful utilities

ps2ps can do a lot of tricks on a postscript-file. It is used in the background of the printing system to handle many of the options above, but can be used directly on a file. ps2ps can sometimes be used to “clean up” ps or eps files originating from other systems. psbook is useful to rearrange the pages in a ps-file in such a way that when printed, you can fold the papers around the middle, and you have got a book. Or at least a booklet. Se man psbook for more information. gv or ghostview, is the number one program to check a ps-file before printing it. It can save many trees

To check the print server status

On the Linux system the printing is handled by a central print-spooler. The spooler queues, format (if necessary) and send the file to the printer. The spooler is in our case called cups. In the normal case the file you want to print should be a postscript-file.

It is possible to print files that are not in postscript. One typical format is “text”, but even a lot of other formats is possible. The spooler takes care of the file, and try to do its best to convert it to postscript before it is sent to the printer. However, in most cases, I recommend that you convert the files to postscript yourself.

The print server status can only be seen when connected via cable.

Click this link: http://cups.hep.lu.se:631/


Installation

Check if you're connected via cable or wireless. Installation instructions are completely different.

Installation if connected via ethernet cable

Linux laptops and Apple or Windows machines would need to install all the printers manually.

GNU/Linux

Get to the print room where the printer is located and note the printer Model Name and hostnames. You will need those later.

There are four ways of installing the drivers:

Root privileges: not needed

use your printer system configurator to add the printer. It may vary depending on distributions.

When asked for the printer, choose to add a network printer and type in the URL:

ipp://cups.hep.lu.se:631/printers/<printername>

e.g.

ipp://cups.hep.lu.se:631/printers/lw1

Repeat the above for each printer you want to add.

This should not require drivers, as they are provided by the CUPS server.

Test with lpstat -a, you should see the list of configured printers.

Root privileges: needed

The printers can be added directly to the current cups configuration using a configuration file. :!: Be careful: backup /etc/cups/printers.conf before you proceed.

Follow these steps:

  1. become root and shut down cups (may vary depending on distribution):
    sudo service cups stop
  2. download this file (sorry I didn't have the time to craft this yet… stay tuned)
  3. merge or add the contents of the file at the end of your /etc/cups/printers.conf file and save.
  4. restart cups
    sudo service cups start
  5. test with lpstat -a, you should see the list of configured printers.
3) Hackish and Fastest

Root privileges: needed

:!: This solution might prevent you to use printers outside the Particle Physics division. Use it only if you know where to put your hands.

Follow these steps:

  1. become root and shut down cups (may vary depending on distribution):
    sudo service cups stop
  2. add this line to /etc/cups/client.conf (create it if it doesn't exist):
    ServerName cups.hep.lu.se
  3. test with lpstat -a, you should see the list of all configured printers.

If you use this, remember to comment out the ServerName line in client.conf and restart cups if you travel to a location outside Particle Physics.

4) Evil and Time-consuming

Root privileges: might be needed if you need to install new drivers

:?: Why is this evil? because this bypasses the print server. That means that is more likely to jam the print queue in the printer itself (will need a restart) and jam the printer itself if the driver is misconfigured (hopefully a restart will be enough LOL). Use at your own risk.

Install the printer drivers yourself, and then install the printer by getting its network address.

This may vary depending on the printer vendor, and Linux may or may not have the drivers.

In short, all you need to do is to provide the hostname of the printer. In most cases it will work if you use

socket://<printer FQDN>:9100

or

http://<printer FQDN>

e.g.

socket://lw1.hep.lu.se:9100
http://lw1.hep.lu.se

Windows

I will write them when I have time. For the moment being, the only thing I can suggest is:

  1. Go to Printers and Faxes and add a new printer
  2. When asked for a new printer, select network printer (TCP/IP)
  3. Add the printer this way:
    http://cups.hep.lu.se:631/printers/printername

    e.g.

    http://cups.hep.lu.se:631/printers/lw1
  4. You will be asked for drivers. If you're lucky, they're on Windows Update, if you're not, find them yourself by looking at the vendor's website.
  5. When the drivers have been installed, you should be able to use the printer.

MacOS X

No idea. OSX uses the same CUPS system as linux ,so I guess it's easy. If anybody wants to write this, contact me.


Installation if connected via Wireless

The best is to book a time with me if you need to install.

If you really want to do yourself:

Root/Admin privileges: might be needed if you need to install new drivers

Install the printer drivers yourself, and then install the printer by using its hostname. When choosing the printer driver, I suggest either PS or PCL. The result may vary depending on the printer.

This may vary depending on the printer vendor, and Linux may or may not have the drivers. A list of tested working drivers is provided here

All you need to do is to provide the hostname of the printer. In most cases it will work if you use

socket://<printer FQDN>:9100

or

http://<printer FQDN>

e.g.

socket://lw1.hep.lu.se:9100
http://clw2.hep.lu.se

Drivers

HP Laserjet 600 M601 M602 Black&White

Hostname: lw1.hep.lu.se

One must accept the license to download these drivers.

The main source is the HP page

  • For MS Windows: , Choose the proper Windows version. I recommend the PCL6 driver for maximum control on the device Win 7 64bit here or the Universal PS driver if you need to print PS or DVI documents as well Win 7 64bit here.
  • For Mac OS X : Get the
  • For GNU/Linux: Drivers should be in the distribution repositories, but if not, follow the instructions here: HPLIP driver

HP Laserjet 500 color M551

Hostname: clw2.hep.lu.se

One must accept the license to download these drivers.

  • For MS Windows: HP site
  • For Mac OS X: HP site
  • For GNU/Linux: Drivers should be in the distribution repositories, but if not, follow the instructions here: HPLIP driver
it_services/pf/printing.1465460288.txt.gz · Last modified: 2016/06/09 08:18 by florido